Loading...
Searching...
No Matches
asum: Sum vector
Dense LA » MAGMA BLAS and Auxiliary » Level 1: vectors operations, O(n) work

\(\sum_i |x_i|\) More...

## Functions

float | magma_cblas_scasum (magma_int_t n, const magmaFloatComplex *x, magma_int_t incx)
double | magma_cblas_dasum (magma_int_t n, const double *x, magma_int_t incx)
float | magma_cblas_sasum (magma_int_t n, const float *x, magma_int_t incx)
double | magma_cblas_dzasum (magma_int_t n, const magmaDoubleComplex *x, magma_int_t incx)
float | magma_scasum (magma_int_t n, magmaFloatComplex_const_ptr dx, magma_int_t incx, magma_queue_t queue)
double | magma_dasum (magma_int_t n, magmaDouble_const_ptr dx, magma_int_t incx, magma_queue_t queue)
float | magma_sasum (magma_int_t n, magmaFloat_const_ptr dx, magma_int_t incx, magma_queue_t queue)
double | magma_dzasum (magma_int_t n, magmaDoubleComplex_const_ptr dx, magma_int_t incx, magma_queue_t queue)

## Detailed Description

\(\sum_i |x_i|\)

## Function Documentation

## magma_cblas_scasum()

float magma_cblas_scasum | ( | magma_int_t | n,
|  | const magmaFloatComplex * | x,
|  | magma_int_t | incx )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

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

Parameters

  [in] | n | Number of elements in vector x. n >= 0.
  [in] | x | COMPLEX 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.

## magma_cblas_dasum()

double magma_cblas_dasum | ( | magma_int_t | n,
|  | const double * | x,
|  | magma_int_t | incx )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

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

Parameters

  [in] | n | Number of elements in vector x. n >= 0.
  [in] | x | DOUBLE PRECISION 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.

## magma_cblas_sasum()

float magma_cblas_sasum | ( | magma_int_t | n,
|  | const float * | x,
|  | magma_int_t | incx )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

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

Parameters

  [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.

## magma_cblas_dzasum()

double magma_cblas_dzasum | ( | magma_int_t | n,
|  | const magmaDoubleComplex * | x,
|  | magma_int_t | incx )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

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

Parameters

  [in] | n | Number of elements in vector x. n >= 0.
  [in] | x | COMPLEX_16 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.

## magma_scasum()

float magma_scasum | ( | magma_int_t | n,
|  | magmaFloatComplex_const_ptr | dx,
|  | magma_int_t | incx,
|  | magma_queue_t | queue )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

Parameters

  [in] | n | Number of elements in vector x. n >= 0.
  [in] | dx | COMPLEX 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] | queue | magma_queue_t Queue to execute in.

## magma_dasum()

double magma_dasum | ( | magma_int_t | n,
|  | magmaDouble_const_ptr | dx,
|  | magma_int_t | incx,
|  | magma_queue_t | queue )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

Parameters

  [in] | n | Number of elements in vector x. n >= 0.
  [in] | dx | DOUBLE PRECISION 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] | queue | magma_queue_t Queue to execute in.

## magma_sasum()

float magma_sasum | ( | magma_int_t | n,
|  | magmaFloat_const_ptr | dx,
|  | magma_int_t | incx,
|  | magma_queue_t | queue )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

Parameters

  [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.
  [in] | queue | magma_queue_t Queue to execute in.

## magma_dzasum()

double magma_dzasum | ( | magma_int_t | n,
|  | magmaDoubleComplex_const_ptr | dx,
|  | magma_int_t | incx,
|  | magma_queue_t | queue )

Returns
  Sum of absolute values of vector x; \( \sum_i | real(x_i) | + | imag(x_i) | \).

Parameters

  [in] | n | Number of elements in vector x. n >= 0.
  [in] | dx | COMPLEX_16 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] | queue | magma_queue_t Queue to execute in.