version 1.10, 2012/12/14 14:22:02
|
version 1.16, 2023/08/07 08:38:43
|
Line 2
|
Line 2
|
* |
* |
* =========== DOCUMENTATION =========== |
* =========== DOCUMENTATION =========== |
* |
* |
* Online html documentation available at |
* Online html documentation available at |
* http://www.netlib.org/lapack/explore-html/ |
* http://www.netlib.org/lapack/explore-html/ |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
* |
* |
* SUBROUTINE DSCAL(N,DA,DX,INCX) |
* SUBROUTINE DSCAL(N,DA,DX,INCX) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* DOUBLE PRECISION DA |
* DOUBLE PRECISION DA |
* INTEGER INCX,N |
* INTEGER INCX,N |
Line 17
|
Line 17
|
* .. Array Arguments .. |
* .. Array Arguments .. |
* DOUBLE PRECISION DX(*) |
* DOUBLE PRECISION DX(*) |
* .. |
* .. |
* |
* |
* |
* |
*> \par Purpose: |
*> \par Purpose: |
* ============= |
* ============= |
Line 25
|
Line 25
|
*> \verbatim |
*> \verbatim |
*> |
*> |
*> DSCAL scales a vector by a constant. |
*> DSCAL scales a vector by a constant. |
*> uses unrolled loops for increment equal to one. |
*> uses unrolled loops for increment equal to 1. |
|
*> \endverbatim |
|
* |
|
* Arguments: |
|
* ========== |
|
* |
|
*> \param[in] N |
|
*> \verbatim |
|
*> N is INTEGER |
|
*> number of elements in input vector(s) |
|
*> \endverbatim |
|
*> |
|
*> \param[in] DA |
|
*> \verbatim |
|
*> DA is DOUBLE PRECISION |
|
*> On entry, DA specifies the scalar alpha. |
|
*> \endverbatim |
|
*> |
|
*> \param[in,out] DX |
|
*> \verbatim |
|
*> DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ) |
|
*> \endverbatim |
|
*> |
|
*> \param[in] INCX |
|
*> \verbatim |
|
*> INCX is INTEGER |
|
*> storage spacing between elements of DX |
*> \endverbatim |
*> \endverbatim |
* |
* |
* Authors: |
* Authors: |
* ======== |
* ======== |
* |
* |
*> \author Univ. of Tennessee |
*> \author Univ. of Tennessee |
*> \author Univ. of California Berkeley |
*> \author Univ. of California Berkeley |
*> \author Univ. of Colorado Denver |
*> \author Univ. of Colorado Denver |
*> \author NAG Ltd. |
*> \author NAG Ltd. |
* |
|
*> \date November 2011 |
|
* |
* |
*> \ingroup double_blas_level1 |
*> \ingroup double_blas_level1 |
* |
* |
Line 53
|
Line 77
|
* ===================================================================== |
* ===================================================================== |
SUBROUTINE DSCAL(N,DA,DX,INCX) |
SUBROUTINE DSCAL(N,DA,DX,INCX) |
* |
* |
* -- Reference BLAS level1 routine (version 3.4.0) -- |
* -- Reference BLAS level1 routine -- |
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- |
* -- Reference BLAS is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* November 2011 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
DOUBLE PRECISION DA |
DOUBLE PRECISION DA |
Line 70
|
Line 93
|
* |
* |
* .. Local Scalars .. |
* .. Local Scalars .. |
INTEGER I,M,MP1,NINCX |
INTEGER I,M,MP1,NINCX |
|
* .. Parameters .. |
|
DOUBLE PRECISION ONE |
|
PARAMETER (ONE=1.0D+0) |
* .. |
* .. |
* .. Intrinsic Functions .. |
* .. Intrinsic Functions .. |
INTRINSIC MOD |
INTRINSIC MOD |
* .. |
* .. |
IF (N.LE.0 .OR. INCX.LE.0) RETURN |
IF (N.LE.0 .OR. INCX.LE.0 .OR. DA.EQ.ONE) RETURN |
IF (INCX.EQ.1) THEN |
IF (INCX.EQ.1) THEN |
* |
* |
* code for increment equal to 1 |
* code for increment equal to 1 |
Line 107
|
Line 133
|
END DO |
END DO |
END IF |
END IF |
RETURN |
RETURN |
|
* |
|
* End of DSCAL |
|
* |
END |
END |