rotg

Computes the parameters for a Givens rotation.

Syntax

void rotg(queue &exec_queue, buffer<T, 1> &a, buffer<T, 1> &b, buffer<T_real, 1> &c, buffer<T, 1> &s)

rotg supports the following precisions and devices.

T

T_real

Devices Supported

float

float

Host, CPU, and GPU

double

double

Host, CPU, and GPU

std::complex<float>

float

Host, CPU, and GPU

std::complex<double>

double

Host, CPU, and GPU

Description

Given the Cartesian coordinates (a, b) of a point, the rotg routines return the parameters c, s, r, and z associated with the Givens rotation. The parameters c and s define a unitary matrix such that:

image0

The parameter z is defined such that if |a| > |b|, z is s; otherwise if c is not 0 z is 1/c; otherwise z is 1.

Input Parameters

exec_queue

The queue where the routine should be executed

a

Buffer holding the x-coordinate of the point.

b

Buffer holding the y-coordinate of the point.

Output Parameters

a

Buffer holding the parameter r associated with the Givens rotation.

b

Buffer holding the parameter z associated with the Givens rotation.

c

Buffer holding the parameter c associated with the Givens rotation.

s

Buffer holding the parameter s associated with the Givens rotation.