Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
Functions | Variables
cusp::detail::device Namespace Reference

Functions

template<typename Matrix , typename Vector1 , typename Vector2 >
void MVmultiply (const Matrix &A, const Vector1 &B, Vector2 &C, cusp::sparse_format, cusp::array2d_format, cusp::array2d_format)
 
template<typename Matrix , typename Vector1 , typename Vector2 >
void OVmultiply (const Matrix &A, const Vector1 &B, Vector2 &C, cusp::sparse_format, cusp::array2d_format, cusp::array2d_format)
 
template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void MVmultiply (const Matrix1 &A, const Matrix2 &B, Matrix3 &C, cusp::array2d_format, cusp::array1d_format, cusp::array2d_format)
 
template<typename MV , typename MV1 , typename MV2 >
void MVdot (const MV &A, const MV1 &B, MV2 &C)
 
template<typename ValueType , typename MV1 , typename MV2 >
void axpby (const ValueType &A, const MV1 &X, const ValueType &B, const MV1 &Y, MV2 &Z)
 
template<typename Matrix , typename MatrixOrVector1 , typename MatrixOrVector2 >
void MVmultiply (const Matrix &A, const MatrixOrVector1 &B, MatrixOrVector2 &C)
 
template<typename Matrix , typename MatrixOrVector1 , typename MatrixOrVector2 >
void OVmultiply (const Matrix &A, const MatrixOrVector1 &B, MatrixOrVector2 &C)
 
template<typename IndexType , typename ValueType >
__global__ void row_axpby_kernel (const ValueType a, const ValueType b, const IndexType num_rows, const IndexType num_cols, const ValueType *x, const ValueType *y, ValueType *z)
 
template<typename IndexType , typename ValueType >
__global__ void col_axpby_kernel (const ValueType a, const ValueType b, const IndexType num_rows, const IndexType num_cols, const ValueType *x, const ValueType *y, ValueType *z)
 
template<typename IndexType , typename ValueType >
__global__ void row_spmm_dense_diag_kernel (const IndexType Anum_rows, const IndexType Anum_cols, const ValueType *Aval, const ValueType *x, ValueType *y)
 
template<typename IndexType , typename ValueType >
__global__ void col_spmm_dense_diag_kernel (const IndexType Anum_rows, const IndexType Anum_cols, const ValueType *Aval, const ValueType *x, ValueType *y)
 
template<typename IndexType , typename ValueType >
__global__ void row_spmm_MVdot_kernel (IndexType ROWS_PER_BLOCK, const IndexType Anum_rows, const IndexType Anum_cols, const ValueType *Aval, const ValueType *x, ValueType *temp)
 
template<typename IndexType , typename ValueType >
__global__ void col_spmm_MVdot_kernel (const IndexType Anum_rows, const IndexType Anum_cols, const ValueType *Aval, const ValueType *x, ValueType *temp)
 
template<typename IndexType , typename ValueType >
__global__ void row_reduce_kernel (const IndexType num_rows, const IndexType num_cols, const ValueType *temp, ValueType *y)
 
template<typename IndexType , typename ValueType >
__global__ void col_reduce_kernel (const IndexType num_rows, const IndexType num_cols, const ValueType *temp, ValueType *y)
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void __spmm_MVdot (const int numRHS, const Vector1 &A, const Vector2 &x, Vector3 &y, cusp::row_major)
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void __spmm_MVdot (const int numRHS, const Vector1 &A, const Vector2 &x, Vector3 &y, cusp::column_major)
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void __spmm_dense_diag (const Vector1 &A, const Vector2 &x, Vector3 &y, cusp::row_major)
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void __spmm_dense_diag (const Vector1 &A, const Vector2 &x, Vector3 &y, cusp::column_major)
 
template<typename ValueType , typename Vector1 , typename Vector2 >
void __spmm_axpby (const ValueType &a, const Vector1 &x, const ValueType &b, const Vector1 &y, Vector2 &z, cusp::row_major)
 
template<typename ValueType , typename Vector1 , typename Vector2 >
void __spmm_axpby (const ValueType &a, const Vector1 &x, const ValueType &b, const Vector1 &y, Vector2 &z, cusp::column_major)
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void spmm_MVdot (const Vector1 &A, const Vector2 &x, Vector3 &y)
 
template<typename Vector1 , typename Vector2 , typename Vector3 >
void spmm_dense_diag (const Vector1 &A, const Vector2 &x, Vector3 &y)
 
template<typename ValueType , typename Vector1 , typename Vector2 >
void spmm_axpby (const ValueType &a, const Vector1 &x, const ValueType &b, const Vector1 &y, Vector2 &z)
 
template<typename IndexType , typename ValueType >
__global__ void row_spmm_csr_scalar_kernel (const IndexType Anum_rows, const IndexType xnum_row, const IndexType xnum_cols, const IndexType *Ar, const IndexType *Ac, const ValueType *Aval, const ValueType *x, ValueType *y)
 
template<typename IndexType , typename ValueType >
__global__ void column_spmm_csr_scalar_kernel (const IndexType Anum_rows, const IndexType xnum_rows, const IndexType xnum_cols, const IndexType *Ar, const IndexType *Ac, const ValueType *Aval, const ValueType *x, ValueType *y)
 
template<typename Matrix1 , typename Vector2 , typename Vector3 >
void __spmm_csr_scalar (const Matrix1 &A, const Vector2 &x, Vector3 &y, cusp::row_major)
 
template<typename Matrix1 , typename Vector2 , typename Vector3 >
void __spmm_csr_scalar (const Matrix1 &A, const Vector2 &x, Vector3 &y, cusp::column_major)
 
template<typename Matrix1 , typename Vector2 , typename Vector3 >
void spmm_csr_scalar (const Matrix1 &A, const Vector2 &x, Vector3 &y)
 
template<typename IndexType , typename ValueType , unsigned MAX_NNZ_PER_ROW>
__global__ void spmm_csr_vector_kernel_row (const IndexType Anum_rows, const IndexType xnum_rows, const IndexType xnum_cols, const IndexType *Ar, const IndexType *Ac, const ValueType *Aval, const ValueType *x, ValueType *y)
 
template<typename Matrix , typename Vector2 , typename Vector3 >
void __spmm_csr_vector (const Matrix &A, const Vector2 &x, Vector3 &y, cusp::row_major)
 
template<typename IndexType , typename ValueType , unsigned int VECTORS_PER_BLOCK, unsigned int THREADS_PER_VECTOR>
 __launch_bounds__ (VECTORS_PER_BLOCK *THREADS_PER_VECTOR, 1) __global__ void spmm_csr_vector_kernel_col(const IndexType Anum_rows
 
 for (IndexType row=vector_id;row< Anum_rows;row+=num_vectors)
 
template<bool UseCache, unsigned int THREADS_PER_VECTOR, typename Matrix , typename Vector2 , typename Vector3 >
void __spmm_csr_vector_col (const Matrix &A, const Vector2 &x, Vector3 &y)
 
template<typename Matrix , typename Vector2 , typename Vector3 >
void __spmm_csr_vector (const Matrix &A, const Vector2 &x, Vector3 &y, cusp::column_major)
 
template<typename Matrix , typename Vector2 , typename Vector3 >
void spmm_csr_vector (const Matrix &A, const Vector2 &x, Vector3 &y)
 

Variables

const IndexType xnum_rows
 
const IndexType const IndexType xnum_cols
 
const IndexType const IndexType const IndexType * Ap
 
const IndexType const IndexType const IndexType const IndexType * Aj
 
const IndexType const IndexType const IndexType const IndexType const ValueType * Ax
 
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType * x
 
const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType ValueType * y
 
__shared__ volatile IndexType ptrs [VECTORS_PER_BLOCK][2]
 
const IndexType THREADS_PER_BLOCK = VECTORS_PER_BLOCK * THREADS_PER_VECTOR
 
const IndexType thread_id = THREADS_PER_BLOCK * blockIdx.x + threadIdx.x
 
const IndexType thread_lane = threadIdx.x & (THREADS_PER_VECTOR - 1)
 
const IndexType vector_id = thread_id / THREADS_PER_VECTOR
 
const IndexType vector_lane = threadIdx.x / THREADS_PER_VECTOR
 
const IndexType num_vectors = VECTORS_PER_BLOCK * gridDim.x
 

Function Documentation

◆ MVmultiply() [1/3]

template<typename Matrix , typename Vector1 , typename Vector2 >
void cusp::detail::device::MVmultiply ( const Matrix &  A,
const Vector1 &  B,
Vector2 &  C,
cusp::sparse_format  ,
cusp::array2d_format  ,
cusp::array2d_format   
)

Definition at line 43 of file detail/device/MVmultiply.h.

◆ OVmultiply() [1/2]

template<typename Matrix , typename Vector1 , typename Vector2 >
void cusp::detail::device::OVmultiply ( const Matrix &  A,
const Vector1 &  B,
Vector2 &  C,
cusp::sparse_format  ,
cusp::array2d_format  ,
cusp::array2d_format   
)

Definition at line 62 of file detail/device/MVmultiply.h.

◆ MVmultiply() [2/3]

template<typename Matrix1 , typename Matrix2 , typename Matrix3 >
void cusp::detail::device::MVmultiply ( const Matrix1 &  A,
const Matrix2 &  B,
Matrix3 &  C,
cusp::array2d_format  ,
cusp::array1d_format  ,
cusp::array2d_format   
)

Definition at line 81 of file detail/device/MVmultiply.h.

◆ MVdot()

template<typename MV , typename MV1 , typename MV2 >
void cusp::detail::device::MVdot ( const MV &  A,
const MV1 &  B,
MV2 &  C 
)

Definition at line 101 of file detail/device/MVmultiply.h.

◆ axpby()

template<typename ValueType , typename MV1 , typename MV2 >
void cusp::detail::device::axpby ( const ValueType &  A,
const MV1 &  X,
const ValueType &  B,
const MV1 &  Y,
MV2 &  Z 
)

Definition at line 116 of file detail/device/MVmultiply.h.

◆ MVmultiply() [3/3]

template<typename Matrix , typename MatrixOrVector1 , typename MatrixOrVector2 >
void cusp::detail::device::MVmultiply ( const Matrix &  A,
const MatrixOrVector1 &  B,
MatrixOrVector2 &  C 
)

Definition at line 132 of file detail/device/MVmultiply.h.

◆ OVmultiply() [2/2]

template<typename Matrix , typename MatrixOrVector1 , typename MatrixOrVector2 >
void cusp::detail::device::OVmultiply ( const Matrix &  A,
const MatrixOrVector1 &  B,
MatrixOrVector2 &  C 
)

Definition at line 145 of file detail/device/MVmultiply.h.

◆ row_axpby_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::row_axpby_kernel ( const ValueType  a,
const ValueType  b,
const IndexType  num_rows,
const IndexType  num_cols,
const ValueType *  x,
const ValueType *  y,
ValueType *  z 
)

Definition at line 32 of file array2d.h.

◆ col_axpby_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::col_axpby_kernel ( const ValueType  a,
const ValueType  b,
const IndexType  num_rows,
const IndexType  num_cols,
const ValueType *  x,
const ValueType *  y,
ValueType *  z 
)

Definition at line 47 of file array2d.h.

◆ row_spmm_dense_diag_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::row_spmm_dense_diag_kernel ( const IndexType  Anum_rows,
const IndexType  Anum_cols,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  y 
)

Definition at line 62 of file array2d.h.

◆ col_spmm_dense_diag_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::col_spmm_dense_diag_kernel ( const IndexType  Anum_rows,
const IndexType  Anum_cols,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  y 
)

Definition at line 77 of file array2d.h.

◆ row_spmm_MVdot_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::row_spmm_MVdot_kernel ( IndexType  ROWS_PER_BLOCK,
const IndexType  Anum_rows,
const IndexType  Anum_cols,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  temp 
)

Definition at line 92 of file array2d.h.

◆ col_spmm_MVdot_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::col_spmm_MVdot_kernel ( const IndexType  Anum_rows,
const IndexType  Anum_cols,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  temp 
)

Definition at line 135 of file array2d.h.

◆ row_reduce_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::row_reduce_kernel ( const IndexType  num_rows,
const IndexType  num_cols,
const ValueType *  temp,
ValueType *  y 
)

Definition at line 173 of file array2d.h.

◆ col_reduce_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::col_reduce_kernel ( const IndexType  num_rows,
const IndexType  num_cols,
const ValueType *  temp,
ValueType *  y 
)

Definition at line 212 of file array2d.h.

◆ __spmm_MVdot() [1/2]

template<typename Vector1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_MVdot ( const int  numRHS,
const Vector1 &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::row_major   
)

Definition at line 247 of file array2d.h.

◆ __spmm_MVdot() [2/2]

template<typename Vector1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_MVdot ( const int  numRHS,
const Vector1 &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::column_major   
)

Definition at line 305 of file array2d.h.

◆ __spmm_dense_diag() [1/2]

template<typename Vector1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_dense_diag ( const Vector1 &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::row_major   
)

Definition at line 351 of file array2d.h.

◆ __spmm_dense_diag() [2/2]

template<typename Vector1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_dense_diag ( const Vector1 &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::column_major   
)

Definition at line 377 of file array2d.h.

◆ __spmm_axpby() [1/2]

template<typename ValueType , typename Vector1 , typename Vector2 >
void cusp::detail::device::__spmm_axpby ( const ValueType &  a,
const Vector1 &  x,
const ValueType &  b,
const Vector1 &  y,
Vector2 &  z,
cusp::row_major   
)

Definition at line 412 of file array2d.h.

◆ __spmm_axpby() [2/2]

template<typename ValueType , typename Vector1 , typename Vector2 >
void cusp::detail::device::__spmm_axpby ( const ValueType &  a,
const Vector1 &  x,
const ValueType &  b,
const Vector1 &  y,
Vector2 &  z,
cusp::column_major   
)

Definition at line 439 of file array2d.h.

◆ spmm_MVdot()

template<typename Vector1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::spmm_MVdot ( const Vector1 &  A,
const Vector2 &  x,
Vector3 &  y 
)

Definition at line 473 of file array2d.h.

◆ spmm_dense_diag()

template<typename Vector1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::spmm_dense_diag ( const Vector1 &  A,
const Vector2 &  x,
Vector3 &  y 
)

Definition at line 484 of file array2d.h.

◆ spmm_axpby()

template<typename ValueType , typename Vector1 , typename Vector2 >
void cusp::detail::device::spmm_axpby ( const ValueType &  a,
const Vector1 &  x,
const ValueType &  b,
const Vector1 &  y,
Vector2 &  z 
)

Definition at line 495 of file array2d.h.

◆ row_spmm_csr_scalar_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::row_spmm_csr_scalar_kernel ( const IndexType  Anum_rows,
const IndexType  xnum_row,
const IndexType  xnum_cols,
const IndexType *  Ar,
const IndexType *  Ac,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  y 
)

Definition at line 34 of file csr.h.

◆ column_spmm_csr_scalar_kernel()

template<typename IndexType , typename ValueType >
__global__ void cusp::detail::device::column_spmm_csr_scalar_kernel ( const IndexType  Anum_rows,
const IndexType  xnum_rows,
const IndexType  xnum_cols,
const IndexType *  Ar,
const IndexType *  Ac,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  y 
)

Definition at line 70 of file csr.h.

◆ __spmm_csr_scalar() [1/2]

template<typename Matrix1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_csr_scalar ( const Matrix1 &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::row_major   
)

Definition at line 109 of file csr.h.

◆ __spmm_csr_scalar() [2/2]

template<typename Matrix1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_csr_scalar ( const Matrix1 &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::column_major   
)

Definition at line 136 of file csr.h.

◆ spmm_csr_scalar()

template<typename Matrix1 , typename Vector2 , typename Vector3 >
void cusp::detail::device::spmm_csr_scalar ( const Matrix1 &  A,
const Vector2 &  x,
Vector3 &  y 
)

Definition at line 161 of file csr.h.

◆ spmm_csr_vector_kernel_row()

template<typename IndexType , typename ValueType , unsigned MAX_NNZ_PER_ROW>
__global__ void cusp::detail::device::spmm_csr_vector_kernel_row ( const IndexType  Anum_rows,
const IndexType  xnum_rows,
const IndexType  xnum_cols,
const IndexType *  Ar,
const IndexType *  Ac,
const ValueType *  Aval,
const ValueType *  x,
ValueType *  y 
)

Definition at line 130 of file csr_vector.h.

◆ __spmm_csr_vector() [1/2]

template<typename Matrix , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_csr_vector ( const Matrix &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::row_major   
)

Definition at line 190 of file csr_vector.h.

◆ __launch_bounds__()

template<typename IndexType , typename ValueType , unsigned int VECTORS_PER_BLOCK, unsigned int THREADS_PER_VECTOR>
cusp::detail::device::__launch_bounds__ ( VECTORS_PER_BLOCK *  THREADS_PER_VECTOR,
 
) const

◆ for()

cusp::detail::device::for ( )

Definition at line 279 of file csr_vector.h.

◆ __spmm_csr_vector_col()

template<bool UseCache, unsigned int THREADS_PER_VECTOR, typename Matrix , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_csr_vector_col ( const Matrix &  A,
const Vector2 &  x,
Vector3 &  y 
)

Definition at line 426 of file csr_vector.h.

◆ __spmm_csr_vector() [2/2]

template<typename Matrix , typename Vector2 , typename Vector3 >
void cusp::detail::device::__spmm_csr_vector ( const Matrix &  A,
const Vector2 &  x,
Vector3 &  y,
cusp::column_major   
)

Definition at line 449 of file csr_vector.h.

◆ spmm_csr_vector()

template<typename Matrix , typename Vector2 , typename Vector3 >
void cusp::detail::device::spmm_csr_vector ( const Matrix &  A,
const Vector2 &  x,
Vector3 &  y 
)

Definition at line 474 of file csr_vector.h.

Variable Documentation

◆ xnum_rows

const IndexType cusp::detail::device::xnum_rows

Definition at line 260 of file csr_vector.h.

◆ xnum_cols

const IndexType const IndexType cusp::detail::device::xnum_cols

Definition at line 260 of file csr_vector.h.

◆ Ap

const IndexType const IndexType const IndexType* cusp::detail::device::Ap

Definition at line 260 of file csr_vector.h.

◆ Aj

const IndexType const IndexType const IndexType const IndexType* cusp::detail::device::Aj

Definition at line 260 of file csr_vector.h.

◆ Ax

const IndexType const IndexType const IndexType const IndexType const ValueType* cusp::detail::device::Ax

Definition at line 260 of file csr_vector.h.

◆ x

const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType* cusp::detail::device::x

Definition at line 260 of file csr_vector.h.

◆ y

const IndexType const IndexType const IndexType const IndexType const ValueType const ValueType ValueType* cusp::detail::device::y
Initial value:
{
__shared__ volatile ValueType sdata[VECTORS_PER_BLOCK * THREADS_PER_VECTOR + THREADS_PER_VECTOR / 2]

Definition at line 267 of file csr_vector.h.

◆ ptrs

__shared__ volatile IndexType cusp::detail::device::ptrs[VECTORS_PER_BLOCK][2]

Definition at line 269 of file csr_vector.h.

◆ THREADS_PER_BLOCK

const IndexType cusp::detail::device::THREADS_PER_BLOCK = VECTORS_PER_BLOCK * THREADS_PER_VECTOR

Definition at line 271 of file csr_vector.h.

◆ thread_id

const IndexType cusp::detail::device::thread_id = THREADS_PER_BLOCK * blockIdx.x + threadIdx.x

Definition at line 273 of file csr_vector.h.

◆ thread_lane

const IndexType cusp::detail::device::thread_lane = threadIdx.x & (THREADS_PER_VECTOR - 1)

Definition at line 274 of file csr_vector.h.

◆ vector_id

const IndexType cusp::detail::device::vector_id = thread_id / THREADS_PER_VECTOR

Definition at line 275 of file csr_vector.h.

◆ vector_lane

const IndexType cusp::detail::device::vector_lane = threadIdx.x / THREADS_PER_VECTOR

Definition at line 276 of file csr_vector.h.

◆ num_vectors

const IndexType cusp::detail::device::num_vectors = VECTORS_PER_BLOCK * gridDim.x

Definition at line 277 of file csr_vector.h.