MAGMA  1.5.0
Matrix Algebra for GPU and Multicore Architectures
 All Functions Groups
single precision

Functions

magma_int_t magma_sgecsrmv (magma_trans_t transA, magma_int_t m, magma_int_t n, float alpha, float *d_val, magma_index_t *d_rowptr, magma_index_t *d_colind, float *d_x, float beta, float *d_y)
 This routine computes y = alpha * A * x + beta * y on the GPU. More...
 
magma_int_t magma_sgecsrmv_shift (magma_trans_t transA, magma_int_t m, magma_int_t n, float alpha, float lambda, float *d_val, magma_index_t *d_rowptr, magma_index_t *d_colind, float *d_x, float beta, int offset, int blocksize, magma_index_t *add_rows, float *d_y)
 This routine computes y = alpha * ( A -lambda I ) * x + beta * y on the GPU. More...
 
magma_int_t magma_sgeellmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t nnz_per_row, float alpha, float *d_val, magma_index_t *d_colind, float *d_x, float beta, float *d_y)
 This routine computes y = alpha * A * x + beta * y on the GPU. More...
 
magma_int_t magma_sgeellmv_shift (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t nnz_per_row, float alpha, float lambda, float *d_val, magma_index_t *d_colind, float *d_x, float beta, int offset, int blocksize, magma_index_t *add_rows, float *d_y)
 This routine computes y = alpha *( A - lambda I ) * x + beta * y on the GPU. More...
 
magma_int_t magma_sgeellrtmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t nnz_per_row, float alpha, float *d_val, magma_index_t *d_colind, magma_index_t *d_rowlength, float *d_x, float beta, float *d_y, magma_int_t alignment, magma_int_t blocksize)
 This routine computes y = alpha * A * x + beta * y on the GPU. More...
 
magma_int_t magma_sgeelltmv_shift (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t nnz_per_row, float alpha, float lambda, float *d_val, magma_index_t *d_colind, float *d_x, float beta, int offset, int blocksize, magma_index_t *add_rows, float *d_y)
 This routine computes y = alpha *( A - lambda I ) * x + beta * y on the GPU. More...
 
magma_int_t magma_sgesellpmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t blocksize, magma_int_t slices, magma_int_t alignment, float alpha, float *d_val, magma_index_t *d_colind, magma_index_t *d_rowptr, float *d_x, float beta, float *d_y)
 This routine computes y = alpha * A^t * x + beta * y on the GPU. More...
 
magma_int_t magma_sgesellcmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t blocksize, magma_int_t slices, magma_int_t alignment, float alpha, float *d_val, magma_index_t *d_colind, magma_index_t *d_rowptr, float *d_x, float beta, float *d_y)
 This routine computes y = alpha * A^t * x + beta * y on the GPU. More...
 
magma_int_t magma_smdotc (int n, int k, float *v, float *r, float *d1, float *d2, float *skp)
 Computes the scalar product of a set of vectors v_i such that. More...
 
magma_int_t magma_smgecsrmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t num_vecs, float alpha, float *d_val, magma_index_t *d_rowptr, magma_index_t *d_colind, float *d_x, float beta, float *d_y)
 This routine computes Y = alpha * A * X + beta * Y for X and Y sets of num_vec vectors on the GPU. More...
 
magma_int_t magma_smgeellmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t num_vecs, magma_int_t nnz_per_row, float alpha, float *d_val, magma_index_t *d_colind, float *d_x, float beta, float *d_y)
 This routine computes Y = alpha * A * X + beta * Y for X and Y sets of num_vec vectors on the GPU. More...
 
magma_int_t magma_smgeelltmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t num_vecs, magma_int_t nnz_per_row, float alpha, float *d_val, magma_index_t *d_colind, float *d_x, float beta, float *d_y)
 This routine computes Y = alpha * A * X + beta * Y for X and Y sets of num_vec vectors on the GPU. More...
 
magma_int_t magma_smgesellpmv (magma_trans_t transA, magma_int_t m, magma_int_t n, magma_int_t num_vecs, magma_int_t blocksize, magma_int_t slices, magma_int_t alignment, float alpha, float *d_val, magma_index_t *d_colind, magma_index_t *d_rowptr, float *d_x, float beta, float *d_y)
 This routine computes Y = alpha * A^t * X + beta * Y on the GPU. More...
 

Detailed Description

Function Documentation

magma_int_t magma_sgecsrmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
float  alpha,
float *  d_val,
magma_index_t *  d_rowptr,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes y = alpha * A * x + beta * y on the GPU.

The input format is CSR (val, row, col).

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
alphafloat scalar multiplier
d_valfloat* array containing values of A in CSR
d_rowptrmagma_int_t* rowpointer of A in CSR
d_colindmagma_int_t* columnindices of A in CSR
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_sgecsrmv_shift ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
float  alpha,
float  lambda,
float *  d_val,
magma_index_t *  d_rowptr,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
int  offset,
int  blocksize,
magma_index_t *  add_rows,
float *  d_y 
)

This routine computes y = alpha * ( A -lambda I ) * x + beta * y on the GPU.

It is a shifted version of the CSR-SpMV.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
alphafloat scalar multiplier
lambdafloat scalar multiplier
d_valfloat* array containing values of A in CSR
d_rowptrmagma_int_t* rowpointer of A in CSR
d_colindmagma_int_t* columnindices of A in CSR
d_xfloat* input vector x
betafloat scalar multiplier
offsetmagma_int_t in case not the main diagonal is scaled
blocksizemagma_int_t in case of processing multiple vectors
add_rowsmagma_int_t* in case the matrixpowerskernel is used
d_yfloat* output vector y
magma_int_t magma_sgeellmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nnz_per_row,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes y = alpha * A * x + beta * y on the GPU.

Input format is ELLPACK.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
nnz_per_rowmagma_int_t number of elements in the longest row
alphafloat scalar multiplier
d_valfloat* array containing values of A in ELLPACK
d_colindmagma_int_t* columnindices of A in ELLPACK
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_sgeellmv_shift ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nnz_per_row,
float  alpha,
float  lambda,
float *  d_val,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
int  offset,
int  blocksize,
magma_index_t *  add_rows,
float *  d_y 
)

This routine computes y = alpha *( A - lambda I ) * x + beta * y on the GPU.

Input format is ELLPACK. It is the shifted version of the ELLPACK SpMV.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
nnz_per_rowmagma_int_t number of elements in the longest row
alphafloat scalar multiplier
lambdafloat scalar multiplier
d_valfloat* array containing values of A in ELLPACK
d_colindmagma_int_t* columnindices of A in ELLPACK
d_xfloat* input vector x
betafloat scalar multiplier
offsetmagma_int_t in case not the main diagonal is scaled
blocksizemagma_int_t in case of processing multiple vectors
add_rowsmagma_int_t* in case the matrixpowerskernel is used
d_yfloat* input/output vector y
magma_int_t magma_sgeellrtmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nnz_per_row,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
magma_index_t *  d_rowlength,
float *  d_x,
float  beta,
float *  d_y,
magma_int_t  alignment,
magma_int_t  blocksize 
)

This routine computes y = alpha * A * x + beta * y on the GPU.

Input format is ELLRT. The ideas are taken from "Improving the performance of the sparse matrix vector product with GPUs", (CIT 2010), and modified to provide correct values.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows
nmagma_int_t number of columns
nnz_per_rowmagma_int_t max number of nonzeros in a row
alphafloat scalar alpha
d_valfloat* val array
d_colindmagma_int_t* col indices
d_rowlengthmagma_int_t* number of elements in each row
d_xfloat* input vector x
betafloat scalar beta
d_yfloat* output vector y
blocksizemagma_int_t threads per block
alignmentmagma_int_t threads assigned to each row
magma_int_t magma_sgeelltmv_shift ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  nnz_per_row,
float  alpha,
float  lambda,
float *  d_val,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
int  offset,
int  blocksize,
magma_index_t *  add_rows,
float *  d_y 
)

This routine computes y = alpha *( A - lambda I ) * x + beta * y on the GPU.

Input format is ELL.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
nnz_per_rowmagma_int_t number of elements in the longest row
alphafloat scalar multiplier
lambdafloat scalar multiplier
d_valfloat* array containing values of A in ELL
d_colindmagma_int_t* columnindices of A in ELL
d_xfloat* input vector x
betafloat scalar multiplier
offsetmagma_int_t in case not the main diagonal is scaled
blocksizemagma_int_t in case of processing multiple vectors
add_rowsmagma_int_t* in case the matrixpowerskernel is used
d_yfloat* input/output vector y
magma_int_t magma_sgesellcmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  blocksize,
magma_int_t  slices,
magma_int_t  alignment,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
magma_index_t *  d_rowptr,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes y = alpha * A^t * x + beta * y on the GPU.

Input format is SELLC/SELLP.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
blocksizemagma_int_t number of rows in one ELL-slice
slicesmagma_int_t number of slices in matrix
alignmentmagma_int_t number of threads assigned to one row (=1)
alphafloat scalar multiplier
d_valfloat* array containing values of A in SELLC/P
d_colindmagma_int_t* columnindices of A in SELLC/P
d_rowptrmagma_int_t* rowpointer of SELLP
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_sgesellpmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  blocksize,
magma_int_t  slices,
magma_int_t  alignment,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
magma_index_t *  d_rowptr,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes y = alpha * A^t * x + beta * y on the GPU.

Input format is SELLP.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
blocksizemagma_int_t number of rows in one ELL-slice
slicesmagma_int_t number of slices in matrix
alignmentmagma_int_t number of threads assigned to one row
alphafloat scalar multiplier
d_valfloat* array containing values of A in SELLP
d_colindmagma_int_t* columnindices of A in SELLP
d_rowptrmagma_int_t* rowpointer of SELLP
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_smdotc ( int  n,
int  k,
float *  v,
float *  r,
float *  d1,
float *  d2,
float *  skp 
)

Computes the scalar product of a set of vectors v_i such that.

skp = ( <v_0,r>, <v_1,r>, .. )

Returns the vector skp.

Parameters
nint length of v_i and r
kint

vectors v_i

Parameters
vfloat* v = (v_0 .. v_i.. v_k)
rfloat* r
d1float* workspace
d2float* workspace
skpfloat* vector[k] of scalar products (<v_i,r>...)
magma_int_t magma_smgecsrmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  num_vecs,
float  alpha,
float *  d_val,
magma_index_t *  d_rowptr,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes Y = alpha * A * X + beta * Y for X and Y sets of num_vec vectors on the GPU.

Input format is CSR.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
num_vecsmama_int_t number of vectors
alphafloat scalar multiplier
d_valfloat* array containing values of A in CSR
d_rowptrmagma_int_t* rowpointer of A in CSR
d_colindmagma_int_t* columnindices of A in CSR
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_smgeellmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  num_vecs,
magma_int_t  nnz_per_row,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes Y = alpha * A * X + beta * Y for X and Y sets of num_vec vectors on the GPU.

Input format is ELLPACK.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
num_vecsmama_int_t number of vectors
nnz_per_rowmagma_int_t number of elements in the longest row
alphafloat scalar multiplier
d_valfloat* array containing values of A in ELLPACK
d_colindmagma_int_t* columnindices of A in ELLPACK
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_smgeelltmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  num_vecs,
magma_int_t  nnz_per_row,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes Y = alpha * A * X + beta * Y for X and Y sets of num_vec vectors on the GPU.

Input format is ELL.

Parameters
transAmagma_trans_t transposition parameter for A
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
num_vecsmama_int_t number of vectors
nnz_per_rowmagma_int_t number of elements in the longest row
alphafloat scalar multiplier
d_valfloat* array containing values of A in ELL
d_colindmagma_int_t* columnindices of A in ELL
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y
magma_int_t magma_smgesellpmv ( magma_trans_t  transA,
magma_int_t  m,
magma_int_t  n,
magma_int_t  num_vecs,
magma_int_t  blocksize,
magma_int_t  slices,
magma_int_t  alignment,
float  alpha,
float *  d_val,
magma_index_t *  d_colind,
magma_index_t *  d_rowptr,
float *  d_x,
float  beta,
float *  d_y 
)

This routine computes Y = alpha * A^t * X + beta * Y on the GPU.

Input format is SELLP. Note, that the input format for X is row-major while the output format for Y is column major!

Parameters
transAmagma_trans_t transpose A?
mmagma_int_t number of rows in A
nmagma_int_t number of columns in A
num_vecsmagma_int_t number of columns in X and Y
blocksizemagma_int_t number of rows in one ELL-slice
slicesmagma_int_t number of slices in matrix
alignmentmagma_int_t number of threads assigned to one row
alphafloat scalar multiplier
d_valfloat* array containing values of A in SELLP
d_colindmagma_int_t* columnindices of A in SELLP
d_rowptrmagma_int_t* rowpointer of SELLP
d_xfloat* input vector x
betafloat scalar multiplier
d_yfloat* input/output vector y