![]() |
MAGMA
1.7.0
Matrix Algebra for GPU and Multicore Architectures
|
Functions | |
float | magma_cblas_sasum (magma_int_t n, const float *x, magma_int_t incx) |
Returns the sum of absolute values of vector x; i.e., one norm. More... | |
float | magma_cblas_sdot (magma_int_t n, const float *x, magma_int_t incx, const float *y, magma_int_t incy) |
Returns dot product of vectors x and y; \( x^H y \). More... | |
magma_int_t | magma_isamax (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx) |
Returns index of element of vector x having max. More... | |
magma_int_t | magma_isamin (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx) |
Returns index of element of vector x having min. More... | |
float | magma_sasum (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx) |
Returns the sum of absolute values of vector x; i.e., one norm. More... | |
void | magma_saxpy (magma_int_t n, float alpha, magmaFloat_const_ptr dx, magma_int_t incx, magmaFloat_ptr dy, magma_int_t incy) |
Constant times a vector plus a vector; \( y = \alpha x + y \). More... | |
void | magma_scopy (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx, magmaFloat_ptr dy, magma_int_t incy) |
Copy vector x to vector y; \( y = x \). More... | |
float | magma_sdot (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx, magmaFloat_const_ptr dy, magma_int_t incy) |
Returns dot product of vectors x and y; \( x^H y \). More... | |
float | magma_snrm2 (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx) |
Returns 2-norm of vector x. More... | |
void | magma_srot (magma_int_t n, magmaFloat_ptr dx, magma_int_t incx, magmaFloat_ptr dy, magma_int_t incy, float c, float s) |
Apply Givens plane rotation, where cos (c) is real and sin (s) is real. More... | |
void | magma_srotm (magma_int_t n, float *dx, magma_int_t incx, float *dy, magma_int_t incy, const float *param) |
Apply modified plane rotation. | |
void | magma_srotmg (float *d1, float *d2, float *x1, const float *y1, float *param) |
Generate modified plane rotation. | |
void | magma_sscal (magma_int_t n, float alpha, magmaFloat_ptr dx, magma_int_t incx) |
Scales a vector by a constant; \( x = \alpha x \). More... | |
void | magma_sswap (magma_int_t n, magmaFloat_ptr dx, magma_int_t incx, magmaFloat_ptr dy, magma_int_t incy) |
Swap vector x and y; \( x <-> y \). More... | |
void | magmablas_sswap_q (magma_int_t n, magmaFloat_ptr dx, magma_int_t incx, magmaFloat_ptr dy, magma_int_t incy, magma_queue_t queue) |
Purpose:Swap vector x and y; \( x <-> y \). More... | |
void | magmablas_sswap (magma_int_t n, magmaFloat_ptr dx, magma_int_t incx, magmaFloat_ptr dy, magma_int_t incy) |
float magma_cblas_sasum | ( | magma_int_t | n, |
const float * | x, | ||
magma_int_t | incx | ||
) |
Returns the sum of absolute values of vector x; i.e., one norm.
To avoid dependence on CBLAS and incompatability issues between BLAS libraries, MAGMA uses its own implementation, following BLAS reference.
[in] | n | Number of elements in vector x. n >= 0. |
[in] | x | REAL array on CPU host. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of x. incx > 0. |
float magma_cblas_sdot | ( | magma_int_t | n, |
const float * | x, | ||
magma_int_t | incx, | ||
const float * | y, | ||
magma_int_t | incy | ||
) |
Returns dot product of vectors x and y; \( x^H y \).
To avoid dependence on CBLAS and incompatability issues between BLAS libraries, MAGMA uses its own implementation, following BLAS reference.
[in] | n | Number of elements in vector x and y. n >= 0. |
[in] | x | REAL array on CPU host. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of x. incx > 0. |
[in] | y | REAL array on CPU host. The n element vector y of dimension (1 + (n-1)*incy). |
[in] | incy | Stride between consecutive elements of dy. incy > 0. |
magma_int_t magma_isamax | ( | magma_int_t | n, |
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx | ||
) |
Returns index of element of vector x having max.
absolute value; i.e., max (infinity) norm.
[in] | n | Number of elements in vector x. n >= 0. |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx > 0. |
magma_int_t magma_isamin | ( | magma_int_t | n, |
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx | ||
) |
Returns index of element of vector x having min.
absolute value.
[in] | n | Number of elements in vector x. n >= 0. |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx > 0. |
float magma_sasum | ( | magma_int_t | n, |
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx | ||
) |
Returns the sum of absolute values of vector x; i.e., one norm.
[in] | n | Number of elements in vector x. n >= 0. |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx > 0. |
void magma_saxpy | ( | magma_int_t | n, |
float | alpha, | ||
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_ptr | dy, | ||
magma_int_t | incy | ||
) |
Constant times a vector plus a vector; \( y = \alpha x + y \).
[in] | n | Number of elements in vectors x and y. n >= 0. |
[in] | alpha | Scalar \( \alpha \) |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx != 0. |
[in,out] | dy | REAL array on GPU device. The n element vector y of dimension (1 + (n-1)*incy). |
[in] | incy | Stride between consecutive elements of dy. incy != 0. |
void magma_scopy | ( | magma_int_t | n, |
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_ptr | dy, | ||
magma_int_t | incy | ||
) |
Copy vector x to vector y; \( y = x \).
[in] | n | Number of elements in vectors x and y. n >= 0. |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx != 0. |
[out] | dy | REAL array on GPU device. The n element vector y of dimension (1 + (n-1)*incy). |
[in] | incy | Stride between consecutive elements of dy. incy != 0. |
float magma_sdot | ( | magma_int_t | n, |
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_const_ptr | dy, | ||
magma_int_t | incy | ||
) |
Returns dot product of vectors x and y; \( x^H y \).
[in] | n | Number of elements in vector x and y. n >= 0. |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx != 0. |
[in] | dy | REAL array on GPU device. The n element vector y of dimension (1 + (n-1)*incy). |
[in] | incy | Stride between consecutive elements of dy. incy != 0. |
float magma_snrm2 | ( | magma_int_t | n, |
magmaFloat_const_ptr | dx, | ||
magma_int_t | incx | ||
) |
Returns 2-norm of vector x.
Avoids unnecesary over/underflow.
[in] | n | Number of elements in vector x and y. n >= 0. |
[in] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx > 0. |
void magma_srot | ( | magma_int_t | n, |
magmaFloat_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_ptr | dy, | ||
magma_int_t | incy, | ||
float | c, | ||
float | s | ||
) |
Apply Givens plane rotation, where cos (c) is real and sin (s) is real.
[in] | n | Number of elements in vector x and y. n >= 0. |
[in,out] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). On output, overwritten with c*x + s*y. |
[in] | incx | Stride between consecutive elements of dx. incx != 0. |
[in,out] | dy | REAL array on GPU device. The n element vector y of dimension (1 + (n-1)*incy). On output, overwritten with -conj(s)*x + c*y. |
[in] | incy | Stride between consecutive elements of dy. incy != 0. |
[in] | c | float. cosine. |
[in] | s | REAL. sine. c and s define a rotation [ c s ] where c*c + s*conj(s) = 1. [ -conj(s) c ] |
void magma_sscal | ( | magma_int_t | n, |
float | alpha, | ||
magmaFloat_ptr | dx, | ||
magma_int_t | incx | ||
) |
Scales a vector by a constant; \( x = \alpha x \).
[in] | n | Number of elements in vector x. n >= 0. |
[in] | alpha | Scalar \( \alpha \) |
[in,out] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx > 0. |
void magma_sswap | ( | magma_int_t | n, |
magmaFloat_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_ptr | dy, | ||
magma_int_t | incy | ||
) |
Swap vector x and y; \( x <-> y \).
[in] | n | Number of elements in vector x and y. n >= 0. |
[in,out] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx != 0. |
[in,out] | dy | REAL array on GPU device. The n element vector y of dimension (1 + (n-1)*incy). |
[in] | incy | Stride between consecutive elements of dy. incy != 0. |
void magmablas_sswap | ( | magma_int_t | n, |
magmaFloat_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_ptr | dy, | ||
magma_int_t | incy | ||
) |
void magmablas_sswap_q | ( | magma_int_t | n, |
magmaFloat_ptr | dx, | ||
magma_int_t | incx, | ||
magmaFloat_ptr | dy, | ||
magma_int_t | incy, | ||
magma_queue_t | queue | ||
) |
[in] | n | Number of elements in vector x and y. n >= 0. |
[in,out] | dx | REAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx). |
[in] | incx | Stride between consecutive elements of dx. incx != 0. |
[in,out] | dy | REAL array on GPU device. The n element vector y of dimension (1 + (n-1)*incy). |
[in] | incy | Stride between consecutive elements of dy. incy != 0. |
[in] | queue | magma_queue_t Queue to execute in. |