MAGMA  2.3.0
Matrix Algebra for GPU and Multicore Architectures
 All Classes Files Functions Friends Groups Pages

\( ||x||_2 \) More...

Functions

float magma_cblas_scnrm2 (magma_int_t n, const magmaFloatComplex *x, magma_int_t incx)
 Returns 2-norm of vector x. More...
 
double magma_cblas_dnrm2 (magma_int_t n, const double *x, magma_int_t incx)
 Returns 2-norm of vector x. More...
 
float magma_cblas_snrm2 (magma_int_t n, const float *x, magma_int_t incx)
 Returns 2-norm of vector x. More...
 
double magma_cblas_dznrm2 (magma_int_t n, const magmaDoubleComplex *x, magma_int_t incx)
 Returns 2-norm of vector x. More...
 
float magma_scnrm2 (magma_int_t n, magmaFloatComplex_const_ptr dx, magma_int_t incx, magma_queue_t queue)
 
double magma_dnrm2 (magma_int_t n, magmaDouble_const_ptr dx, magma_int_t incx, magma_queue_t queue)
 
float magma_snrm2 (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx, magma_queue_t queue)
 
double magma_dznrm2 (magma_int_t n, magmaDoubleComplex_const_ptr dx, magma_int_t incx, magma_queue_t queue)
 

Detailed Description

\( ||x||_2 \)

Function Documentation

float magma_cblas_scnrm2 ( magma_int_t  n,
const magmaFloatComplex *  x,
magma_int_t  incx 
)

Returns 2-norm of vector x.

Avoids unnecesary over/underflow.

To avoid dependence on CBLAS and incompatability issues between BLAS libraries, MAGMA uses its own implementation, following BLAS reference.

Parameters
[in]nNumber of elements in vector x. n >= 0.
[in]xCOMPLEX array on CPU host. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of x. incx > 0.
double magma_cblas_dnrm2 ( magma_int_t  n,
const double *  x,
magma_int_t  incx 
)

Returns 2-norm of vector x.

Avoids unnecesary over/underflow.

To avoid dependence on CBLAS and incompatability issues between BLAS libraries, MAGMA uses its own implementation, following BLAS reference.

Parameters
[in]nNumber of elements in vector x. n >= 0.
[in]xDOUBLE PRECISION array on CPU host. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of x. incx > 0.
float magma_cblas_snrm2 ( magma_int_t  n,
const float *  x,
magma_int_t  incx 
)

Returns 2-norm of vector x.

Avoids unnecesary over/underflow.

To avoid dependence on CBLAS and incompatability issues between BLAS libraries, MAGMA uses its own implementation, following BLAS reference.

Parameters
[in]nNumber of elements in vector x. n >= 0.
[in]xREAL array on CPU host. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of x. incx > 0.
double magma_cblas_dznrm2 ( magma_int_t  n,
const magmaDoubleComplex *  x,
magma_int_t  incx 
)

Returns 2-norm of vector x.

Avoids unnecesary over/underflow.

To avoid dependence on CBLAS and incompatability issues between BLAS libraries, MAGMA uses its own implementation, following BLAS reference.

Parameters
[in]nNumber of elements in vector x. n >= 0.
[in]xCOMPLEX_16 array on CPU host. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of x. incx > 0.
float magma_scnrm2 ( magma_int_t  n,
magmaFloatComplex_const_ptr  dx,
magma_int_t  incx,
magma_queue_t  queue 
)
Returns
2-norm of vector x; \( \text{sqrt}( x^H x ) \). Avoids unnecesary over/underflow.
Parameters
[in]nNumber of elements in vector x and y. n >= 0.
[in]dxCOMPLEX array on GPU device. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of dx. incx > 0.
[in]queuemagma_queue_t Queue to execute in.
double magma_dnrm2 ( magma_int_t  n,
magmaDouble_const_ptr  dx,
magma_int_t  incx,
magma_queue_t  queue 
)
Returns
2-norm of vector x; \( \text{sqrt}( x^H x ) \). Avoids unnecesary over/underflow.
Parameters
[in]nNumber of elements in vector x and y. n >= 0.
[in]dxDOUBLE PRECISION array on GPU device. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of dx. incx > 0.
[in]queuemagma_queue_t Queue to execute in.
float magma_snrm2 ( magma_int_t  n,
magmaFloat_const_ptr  dx,
magma_int_t  incx,
magma_queue_t  queue 
)
Returns
2-norm of vector x; \( \text{sqrt}( x^H x ) \). Avoids unnecesary over/underflow.
Parameters
[in]nNumber of elements in vector x and y. n >= 0.
[in]dxREAL array on GPU device. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of dx. incx > 0.
[in]queuemagma_queue_t Queue to execute in.
double magma_dznrm2 ( magma_int_t  n,
magmaDoubleComplex_const_ptr  dx,
magma_int_t  incx,
magma_queue_t  queue 
)
Returns
2-norm of vector x; \( \text{sqrt}( x^H x ) \). Avoids unnecesary over/underflow.
Parameters
[in]nNumber of elements in vector x and y. n >= 0.
[in]dxCOMPLEX_16 array on GPU device. The n element vector x of dimension (1 + (n-1)*incx).
[in]incxStride between consecutive elements of dx. incx > 0.
[in]queuemagma_queue_t Queue to execute in.