version 1.14, 2018/05/29 07:19:42
|
version 1.15, 2023/08/07 08:38:44
|
Line 8
|
Line 8
|
* Definition: |
* Definition: |
* =========== |
* =========== |
* |
* |
* SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S ) |
* SUBROUTINE ZDROT( N, ZX, INCX, ZY, INCY, C, S ) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* INTEGER INCX, INCY, N |
* INTEGER INCX, INCY, N |
* DOUBLE PRECISION C, S |
* DOUBLE PRECISION C, S |
* .. |
* .. |
* .. Array Arguments .. |
* .. Array Arguments .. |
* COMPLEX*16 CX( * ), CY( * ) |
* COMPLEX*16 ZX( * ), ZY( * ) |
* .. |
* .. |
* |
* |
* |
* |
Line 39
|
Line 39
|
*> N must be at least zero. |
*> N must be at least zero. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in,out] CX |
*> \param[in,out] ZX |
*> \verbatim |
*> \verbatim |
*> CX is COMPLEX*16 array, dimension at least |
*> ZX is COMPLEX*16 array, dimension at least |
*> ( 1 + ( N - 1 )*abs( INCX ) ). |
*> ( 1 + ( N - 1 )*abs( INCX ) ). |
*> Before entry, the incremented array CX must contain the n |
*> Before entry, the incremented array ZX must contain the n |
*> element vector cx. On exit, CX is overwritten by the updated |
*> element vector cx. On exit, ZX is overwritten by the updated |
*> vector cx. |
*> vector cx. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
Line 52
|
Line 52
|
*> \verbatim |
*> \verbatim |
*> INCX is INTEGER |
*> INCX is INTEGER |
*> On entry, INCX specifies the increment for the elements of |
*> On entry, INCX specifies the increment for the elements of |
*> CX. INCX must not be zero. |
*> ZX. INCX must not be zero. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in,out] CY |
*> \param[in,out] ZY |
*> \verbatim |
*> \verbatim |
*> CY is COMPLEX*16 array, dimension at least |
*> ZY is COMPLEX*16 array, dimension at least |
*> ( 1 + ( N - 1 )*abs( INCY ) ). |
*> ( 1 + ( N - 1 )*abs( INCY ) ). |
*> Before entry, the incremented array CY must contain the n |
*> Before entry, the incremented array ZY must contain the n |
*> element vector cy. On exit, CY is overwritten by the updated |
*> element vector cy. On exit, ZY is overwritten by the updated |
*> vector cy. |
*> vector cy. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
Line 68
|
Line 68
|
*> \verbatim |
*> \verbatim |
*> INCY is INTEGER |
*> INCY is INTEGER |
*> On entry, INCY specifies the increment for the elements of |
*> On entry, INCY specifies the increment for the elements of |
*> CY. INCY must not be zero. |
*> ZY. INCY must not be zero. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] C |
*> \param[in] C |
Line 91
|
Line 91
|
*> \author Univ. of Colorado Denver |
*> \author Univ. of Colorado Denver |
*> \author NAG Ltd. |
*> \author NAG Ltd. |
* |
* |
*> \date December 2016 |
|
* |
|
*> \ingroup complex16_blas_level1 |
*> \ingroup complex16_blas_level1 |
* |
* |
* ===================================================================== |
* ===================================================================== |
SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S ) |
SUBROUTINE ZDROT( N, ZX, INCX, ZY, INCY, C, S ) |
* |
* |
* -- Reference BLAS level1 routine (version 3.7.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..-- |
* December 2016 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER INCX, INCY, N |
INTEGER INCX, INCY, N |
DOUBLE PRECISION C, S |
DOUBLE PRECISION C, S |
* .. |
* .. |
* .. Array Arguments .. |
* .. Array Arguments .. |
COMPLEX*16 CX( * ), CY( * ) |
COMPLEX*16 ZX( * ), ZY( * ) |
* .. |
* .. |
* |
* |
* ===================================================================== |
* ===================================================================== |
Line 126
|
Line 123
|
* code for both increments equal to 1 |
* code for both increments equal to 1 |
* |
* |
DO I = 1, N |
DO I = 1, N |
CTEMP = C*CX( I ) + S*CY( I ) |
CTEMP = C*ZX( I ) + S*ZY( I ) |
CY( I ) = C*CY( I ) - S*CX( I ) |
ZY( I ) = C*ZY( I ) - S*ZX( I ) |
CX( I ) = CTEMP |
ZX( I ) = CTEMP |
END DO |
END DO |
ELSE |
ELSE |
* |
* |
Line 142
|
Line 139
|
IF( INCY.LT.0 ) |
IF( INCY.LT.0 ) |
$ IY = ( -N+1 )*INCY + 1 |
$ IY = ( -N+1 )*INCY + 1 |
DO I = 1, N |
DO I = 1, N |
CTEMP = C*CX( IX ) + S*CY( IY ) |
CTEMP = C*ZX( IX ) + S*ZY( IY ) |
CY( IY ) = C*CY( IY ) - S*CX( IX ) |
ZY( IY ) = C*ZY( IY ) - S*ZX( IX ) |
CX( IX ) = CTEMP |
ZX( IX ) = CTEMP |
IX = IX + INCX |
IX = IX + INCX |
IY = IY + INCY |
IY = IY + INCY |
END DO |
END DO |
END IF |
END IF |
RETURN |
RETURN |
|
* |
|
* End of ZDROT |
|
* |
END |
END |