Loading...
Searching...
No Matches
rotg: Generate Givens rotation
Dense LA » MAGMA BLAS and Auxiliary » Level 1: vectors operations, O(n) work

## Functions

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

## Detailed Description

## Function Documentation

## magma_crotg()

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] | a | On input, entry to be modified. On output, updated to r by applying the rotation.
  [in,out] | b | On input, entry to be annihilated. On output, set to z.
  [in] | c | On output, cosine of rotation.
  [in,out] | s | On output, sine of rotation.
  [in] | queue | magma_queue_t Queue to execute in.

## magma_drotg()

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] | a | On input, entry to be modified. On output, updated to r by applying the rotation.
  [in,out] | b | On input, entry to be annihilated. On output, set to z.
  [in] | c | On output, cosine of rotation.
  [in,out] | s | On output, sine of rotation.
  [in] | queue | magma_queue_t Queue to execute in.

## magma_srotg()

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] | a | On input, entry to be modified. On output, updated to r by applying the rotation.
  [in,out] | b | On input, entry to be annihilated. On output, set to z.
  [in] | c | On output, cosine of rotation.
  [in,out] | s | On output, sine of rotation.
  [in] | queue | magma_queue_t Queue to execute in.

## magma_zrotg()

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] | a | On input, entry to be modified. On output, updated to r by applying the rotation.
  [in,out] | b | On input, entry to be annihilated. On output, set to z.
  [in] | c | On output, cosine of rotation.
  [in,out] | s | On output, sine of rotation.
  [in] | queue | magma_queue_t Queue to execute in.