MAGMA  2.7.1
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages
rotg: Generate Givens rotation

Functions

void magma_crotg (magmaFloatComplex *a, magmaFloatComplex *b, float *c, magmaFloatComplex *s, magma_queue_t queue)
 Generate a Givens plane rotation. More...
 
void magma_drotg (double *a, double *b, double *c, double *s, magma_queue_t queue)
 Generate a Givens plane rotation. More...
 
void magma_srotg (float *a, float *b, float *c, float *s, magma_queue_t queue)
 Generate a Givens plane rotation. More...
 
void magma_zrotg (magmaDoubleComplex *a, magmaDoubleComplex *b, double *c, magmaDoubleComplex *s, magma_queue_t queue)
 Generate a Givens plane rotation. More...
 

Detailed Description

Function Documentation

void magma_crotg ( magmaFloatComplex *  a,
magmaFloatComplex *  b,
float *  c,
magmaFloatComplex *  s,
magma_queue_t  queue 
)

Generate a Givens plane rotation.

The rotation annihilates the second entry of the vector, such that:

(  c  s ) * ( a ) = ( r )
( -s  c )   ( b )   ( 0 )

where \( c^2 + s^2 = 1 \) and \( r = a^2 + b^2 \). Further, this computes z such that

        { (sqrt(1 - z^2), z),    if |z| < 1,
(c,s) = { (0, 1),                if |z| = 1,
        { (1/z, sqrt(1 - z^2)),  if |z| > 1.
Parameters
[in]aOn input, entry to be modified. On output, updated to r by applying the rotation.
[in,out]bOn input, entry to be annihilated. On output, set to z.
[in]cOn output, cosine of rotation.
[in,out]sOn output, sine of rotation.
[in]queuemagma_queue_t Queue to execute in.
void magma_drotg ( double *  a,
double *  b,
double *  c,
double *  s,
magma_queue_t  queue 
)

Generate a Givens plane rotation.

The rotation annihilates the second entry of the vector, such that:

(  c  s ) * ( a ) = ( r )
( -s  c )   ( b )   ( 0 )

where \( c^2 + s^2 = 1 \) and \( r = a^2 + b^2 \). Further, this computes z such that

        { (sqrt(1 - z^2), z),    if |z| < 1,
(c,s) = { (0, 1),                if |z| = 1,
        { (1/z, sqrt(1 - z^2)),  if |z| > 1.
Parameters
[in]aOn input, entry to be modified. On output, updated to r by applying the rotation.
[in,out]bOn input, entry to be annihilated. On output, set to z.
[in]cOn output, cosine of rotation.
[in,out]sOn output, sine of rotation.
[in]queuemagma_queue_t Queue to execute in.
void magma_srotg ( float *  a,
float *  b,
float *  c,
float *  s,
magma_queue_t  queue 
)

Generate a Givens plane rotation.

The rotation annihilates the second entry of the vector, such that:

(  c  s ) * ( a ) = ( r )
( -s  c )   ( b )   ( 0 )

where \( c^2 + s^2 = 1 \) and \( r = a^2 + b^2 \). Further, this computes z such that

        { (sqrt(1 - z^2), z),    if |z| < 1,
(c,s) = { (0, 1),                if |z| = 1,
        { (1/z, sqrt(1 - z^2)),  if |z| > 1.
Parameters
[in]aOn input, entry to be modified. On output, updated to r by applying the rotation.
[in,out]bOn input, entry to be annihilated. On output, set to z.
[in]cOn output, cosine of rotation.
[in,out]sOn output, sine of rotation.
[in]queuemagma_queue_t Queue to execute in.
void magma_zrotg ( magmaDoubleComplex *  a,
magmaDoubleComplex *  b,
double *  c,
magmaDoubleComplex *  s,
magma_queue_t  queue 
)

Generate a Givens plane rotation.

The rotation annihilates the second entry of the vector, such that:

(  c  s ) * ( a ) = ( r )
( -s  c )   ( b )   ( 0 )

where \( c^2 + s^2 = 1 \) and \( r = a^2 + b^2 \). Further, this computes z such that

        { (sqrt(1 - z^2), z),    if |z| < 1,
(c,s) = { (0, 1),                if |z| = 1,
        { (1/z, sqrt(1 - z^2)),  if |z| > 1.
Parameters
[in]aOn input, entry to be modified. On output, updated to r by applying the rotation.
[in,out]bOn input, entry to be annihilated. On output, set to z.
[in]cOn output, cosine of rotation.
[in,out]sOn output, sine of rotation.
[in]queuemagma_queue_t Queue to execute in.