ViennaCL - The Vienna Computing Library  1.6.2
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::linalg::cuda::detail Namespace Reference

Helper functions for the CUDA linear algebra backend. More...

Namespaces

 fft
 

Classes

struct  type_to_type2
 
struct  type_to_type2< double >
 
struct  type_to_type2< float >
 

Functions

unsigned int make_options (vcl_size_t length, bool reciprocal, bool flip_sign)
 
void cuda_last_error_check (const char *message, const char *file, const int line)
 
template<typename ReturnT , typename NumericT >
ReturnT * cuda_arg (vector_base< NumericT > &obj)
 
template<typename ReturnT , typename NumericT >
const ReturnT * cuda_arg (vector_base< NumericT > const &obj)
 
template<typename NumericT >
NumericT * cuda_arg (matrix_base< NumericT > &obj)
 
template<typename NumericT >
const NumericT * cuda_arg (matrix_base< NumericT > const &obj)
 
template<typename ReturnT , typename ArgT >
viennacl::enable_if
< viennacl::is_scalar< ArgT >
::value, ReturnT * >::type 
cuda_arg (ArgT &obj)
 
template<typename ReturnT , typename ArgT >
viennacl::enable_if
< viennacl::is_scalar< ArgT >
::value, const ReturnT * >
::type 
cuda_arg (ArgT const &obj)
 
template<typename ReturnT >
ReturnT * cuda_arg (viennacl::backend::mem_handle::cuda_handle_type &h)
 
template<typename ReturnT >
ReturnT const * cuda_arg (viennacl::backend::mem_handle::cuda_handle_type const &h)
 
unsigned int cuda_arg (unsigned int val)
 
template<typename NumericT >
char cuda_arg (char val)
 
template<typename NumericT >
unsigned char cuda_arg (unsigned char val)
 
template<typename NumericT >
short cuda_arg (short val)
 
template<typename NumericT >
unsigned short cuda_arg (unsigned short val)
 
template<typename NumericT >
int cuda_arg (int val)
 
template<typename NumericT >
long cuda_arg (long val)
 
template<typename NumericT >
unsigned long cuda_arg (unsigned long val)
 
template<typename NumericT >
float cuda_arg (float val)
 
template<typename NumericT >
double cuda_arg (double val)
 
template<typename NumericT , typename OtherT >
viennacl::backend::mem_handle::cuda_handle_typearg_reference (viennacl::scalar< NumericT > &s, OtherT)
 
template<typename NumericT , typename OtherT >
viennacl::backend::mem_handle::cuda_handle_type
const & 
arg_reference (viennacl::scalar< NumericT > const &s, OtherT)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, char const & >
::type 
arg_reference (ArgT, char const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, unsigned char
const & >::type 
arg_reference (ArgT, unsigned char const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, short const & >
::type 
arg_reference (ArgT, short const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, unsigned
short const & >::type 
arg_reference (ArgT, unsigned short const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, int const & >
::type 
arg_reference (ArgT, int const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, unsigned int
const & >::type 
arg_reference (ArgT, unsigned int const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, long const & >
::type 
arg_reference (ArgT, long const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, unsigned long
const & >::type 
arg_reference (ArgT, unsigned long const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, float const & >
::type 
arg_reference (ArgT, float const &val)
 
template<typename ArgT >
viennacl::enable_if
< viennacl::is_cpu_scalar
< ArgT >::value, double const & >
::type 
arg_reference (ArgT, double const &val)
 
template<typename TagT >
bool is_unit_solve (TagT const &tag)
 
bool is_unit_solve (viennacl::linalg::unit_lower_tag)
 
bool is_unit_solve (viennacl::linalg::unit_upper_tag)
 
template<typename TagT >
bool is_upper_solve (TagT const &tag)
 
bool is_upper_solve (viennacl::linalg::upper_tag)
 
bool is_upper_solve (viennacl::linalg::unit_upper_tag)
 
template<typename Matrix1T , typename Matrix2T , typename SolverTagT >
void inplace_solve_impl (Matrix1T const &A, Matrix2T &B, SolverTagT const &tag)
 
unsigned int get_option_for_solver_tag (viennacl::linalg::upper_tag)
 
unsigned int get_option_for_solver_tag (viennacl::linalg::unit_upper_tag)
 
unsigned int get_option_for_solver_tag (viennacl::linalg::lower_tag)
 
unsigned int get_option_for_solver_tag (viennacl::linalg::unit_lower_tag)
 
template<typename MatrixT , typename VectorT >
void inplace_solve_vector_impl (MatrixT const &mat, VectorT &vec, unsigned int options)
 
template<typename MatrixT1 , typename MatrixT2 , typename MatrixT3 , typename ScalarT >
void prod_slow_kernel (const MatrixT1 &A, bool transposed_A, const MatrixT2 &B, bool transposed_B, MatrixT3 &C, ScalarT alpha, ScalarT beta)
 
template<typename MatrixT1 , typename MatrixT2 , typename MatrixT3 , typename ScalarT >
void prod_fast_kernel (const MatrixT1 &A, const MatrixT2 &B, MatrixT3 &C, ScalarT alpha, ScalarT beta, std::string kernel_name)
 
template<typename MatrixT1 , typename MatrixT2 , typename MatrixT3 , typename ScalarT >
void prod (const MatrixT1 &A, bool transposed_A, const MatrixT2 &B, bool transposed_B, MatrixT3 &C, ScalarT alpha, ScalarT beta)
 
template<typename NumericT >
__global__ void level_scheduling_substitute_kernel (const unsigned int *row_index_array, const unsigned int *row_indices, const unsigned int *column_indices, const NumericT *elements, NumericT *vec, unsigned int size)
 
template<typename NumericT >
void level_scheduling_substitute (vector< NumericT > &vec, viennacl::backend::mem_handle const &row_index_array, viennacl::backend::mem_handle const &row_buffer, viennacl::backend::mem_handle const &col_buffer, viennacl::backend::mem_handle const &element_buffer, vcl_size_t num_rows)
 
template<typename NumericT >
__global__ void csr_row_info_extractor_kernel (const unsigned int *row_indices, const unsigned int *column_indices, const NumericT *elements, NumericT *result, unsigned int size, unsigned int option)
 
template<typename NumericT , unsigned int AligmentV>
void row_info (compressed_matrix< NumericT, AligmentV > const &mat, vector_base< NumericT > &vec, viennacl::linalg::detail::row_info_types info_selector)
 
template<typename NumericT , unsigned int AlignmentV>
void block_inplace_solve (const matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > &L, viennacl::backend::mem_handle const &block_indices, vcl_size_t num_blocks, vector_base< NumericT > const &, vector_base< NumericT > &vec, viennacl::linalg::unit_lower_tag)
 
template<typename NumericT , unsigned int AlignmentV>
void block_inplace_solve (const matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > &U, viennacl::backend::mem_handle const &block_indices, vcl_size_t num_blocks, vector_base< NumericT > const &U_diagonal, vector_base< NumericT > &vec, viennacl::linalg::upper_tag)
 
template<typename NumericT >
__global__ void coo_row_info_extractor (const unsigned int *coords, const NumericT *elements, const unsigned int *group_boundaries, NumericT *result, unsigned int option)
 
template<typename NumericT , unsigned int AlignmentV>
void row_info (coordinate_matrix< NumericT, AlignmentV > const &mat, vector_base< NumericT > &vec, viennacl::linalg::detail::row_info_types info_selector)
 

Detailed Description

Helper functions for the CUDA linear algebra backend.

Function Documentation

template<typename NumericT , typename OtherT >
viennacl::backend::mem_handle::cuda_handle_type& viennacl::linalg::cuda::detail::arg_reference ( viennacl::scalar< NumericT > &  s,
OtherT   
)

Definition at line 137 of file common.hpp.

template<typename NumericT , typename OtherT >
viennacl::backend::mem_handle::cuda_handle_type const& viennacl::linalg::cuda::detail::arg_reference ( viennacl::scalar< NumericT > const &  s,
OtherT   
)

Definition at line 140 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, char const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
char const &  val 
)

Definition at line 146 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, unsigned char const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
unsigned char const &  val 
)

Definition at line 151 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, short const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
short const &  val 
)

Definition at line 156 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, unsigned short const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
unsigned short const &  val 
)

Definition at line 161 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, int const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
int const &  val 
)

Definition at line 166 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, unsigned int const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
unsigned int const &  val 
)

Definition at line 171 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, long const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
long const &  val 
)

Definition at line 176 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, unsigned long const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
unsigned long const &  val 
)

Definition at line 181 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, float const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
float const &  val 
)

Definition at line 186 of file common.hpp.

template<typename ArgT >
viennacl::enable_if< viennacl::is_cpu_scalar<ArgT>::value, double const &>::type viennacl::linalg::cuda::detail::arg_reference ( ArgT  ,
double const &  val 
)

Definition at line 191 of file common.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::cuda::detail::block_inplace_solve ( const matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > &  L,
viennacl::backend::mem_handle const &  block_indices,
vcl_size_t  num_blocks,
vector_base< NumericT > const &  ,
vector_base< NumericT > &  vec,
viennacl::linalg::unit_lower_tag   
)

Definition at line 817 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::cuda::detail::block_inplace_solve ( const matrix_expression< const compressed_matrix< NumericT, AlignmentV >, const compressed_matrix< NumericT, AlignmentV >, op_trans > &  U,
viennacl::backend::mem_handle const &  block_indices,
vcl_size_t  num_blocks,
vector_base< NumericT > const &  U_diagonal,
vector_base< NumericT > &  vec,
viennacl::linalg::upper_tag   
)

Definition at line 836 of file sparse_matrix_operations.hpp.

template<typename NumericT >
__global__ void viennacl::linalg::cuda::detail::coo_row_info_extractor ( const unsigned int *  coords,
const NumericT *  elements,
const unsigned int *  group_boundaries,
NumericT *  result,
unsigned int  option 
)

Definition at line 935 of file sparse_matrix_operations.hpp.

template<typename NumericT >
__global__ void viennacl::linalg::cuda::detail::csr_row_info_extractor_kernel ( const unsigned int *  row_indices,
const unsigned int *  column_indices,
const NumericT *  elements,
NumericT *  result,
unsigned int  size,
unsigned int  option 
)

Definition at line 47 of file sparse_matrix_operations.hpp.

template<typename ReturnT , typename NumericT >
ReturnT* viennacl::linalg::cuda::detail::cuda_arg ( vector_base< NumericT > &  obj)

Definition at line 55 of file common.hpp.

template<typename ReturnT , typename NumericT >
const ReturnT* viennacl::linalg::cuda::detail::cuda_arg ( vector_base< NumericT > const &  obj)

Definition at line 61 of file common.hpp.

template<typename NumericT >
NumericT* viennacl::linalg::cuda::detail::cuda_arg ( matrix_base< NumericT > &  obj)

Definition at line 67 of file common.hpp.

template<typename NumericT >
const NumericT* viennacl::linalg::cuda::detail::cuda_arg ( matrix_base< NumericT > const &  obj)

Definition at line 73 of file common.hpp.

template<typename ReturnT , typename ArgT >
viennacl::enable_if< viennacl::is_scalar<ArgT>::value, ReturnT *>::type viennacl::linalg::cuda::detail::cuda_arg ( ArgT &  obj)

Definition at line 82 of file common.hpp.

template<typename ReturnT , typename ArgT >
viennacl::enable_if< viennacl::is_scalar<ArgT>::value, const ReturnT *>::type viennacl::linalg::cuda::detail::cuda_arg ( ArgT const &  obj)

Definition at line 90 of file common.hpp.

template<typename ReturnT >
ReturnT* viennacl::linalg::cuda::detail::cuda_arg ( viennacl::backend::mem_handle::cuda_handle_type h)

Definition at line 96 of file common.hpp.

template<typename ReturnT >
ReturnT const* viennacl::linalg::cuda::detail::cuda_arg ( viennacl::backend::mem_handle::cuda_handle_type const &  h)

Definition at line 102 of file common.hpp.

unsigned int viennacl::linalg::cuda::detail::cuda_arg ( unsigned int  val)
inline

Definition at line 119 of file common.hpp.

template<typename NumericT >
char viennacl::linalg::cuda::detail::cuda_arg ( char  val)

Definition at line 121 of file common.hpp.

template<typename NumericT >
unsigned char viennacl::linalg::cuda::detail::cuda_arg ( unsigned char  val)

Definition at line 122 of file common.hpp.

template<typename NumericT >
short viennacl::linalg::cuda::detail::cuda_arg ( short  val)

Definition at line 124 of file common.hpp.

template<typename NumericT >
unsigned short viennacl::linalg::cuda::detail::cuda_arg ( unsigned short  val)

Definition at line 125 of file common.hpp.

template<typename NumericT >
int viennacl::linalg::cuda::detail::cuda_arg ( int  val)

Definition at line 127 of file common.hpp.

template<typename NumericT >
long viennacl::linalg::cuda::detail::cuda_arg ( long  val)

Definition at line 130 of file common.hpp.

template<typename NumericT >
unsigned long viennacl::linalg::cuda::detail::cuda_arg ( unsigned long  val)

Definition at line 131 of file common.hpp.

template<typename NumericT >
float viennacl::linalg::cuda::detail::cuda_arg ( float  val)

Definition at line 133 of file common.hpp.

template<typename NumericT >
double viennacl::linalg::cuda::detail::cuda_arg ( double  val)

Definition at line 134 of file common.hpp.

void viennacl::linalg::cuda::detail::cuda_last_error_check ( const char *  message,
const char *  file,
const int  line 
)
inline

Definition at line 43 of file common.hpp.

unsigned int viennacl::linalg::cuda::detail::get_option_for_solver_tag ( viennacl::linalg::upper_tag  )
inline

Definition at line 348 of file direct_solve.hpp.

unsigned int viennacl::linalg::cuda::detail::get_option_for_solver_tag ( viennacl::linalg::unit_upper_tag  )
inline

Definition at line 349 of file direct_solve.hpp.

unsigned int viennacl::linalg::cuda::detail::get_option_for_solver_tag ( viennacl::linalg::lower_tag  )
inline

Definition at line 350 of file direct_solve.hpp.

unsigned int viennacl::linalg::cuda::detail::get_option_for_solver_tag ( viennacl::linalg::unit_lower_tag  )
inline

Definition at line 351 of file direct_solve.hpp.

template<typename Matrix1T , typename Matrix2T , typename SolverTagT >
void viennacl::linalg::cuda::detail::inplace_solve_impl ( Matrix1T const &  A,
Matrix2T &  B,
SolverTagT const &  tag 
)

Definition at line 189 of file direct_solve.hpp.

template<typename MatrixT , typename VectorT >
void viennacl::linalg::cuda::detail::inplace_solve_vector_impl ( MatrixT const &  mat,
VectorT &  vec,
unsigned int  options 
)

Definition at line 354 of file direct_solve.hpp.

template<typename TagT >
bool viennacl::linalg::cuda::detail::is_unit_solve ( TagT const &  tag)

Definition at line 177 of file direct_solve.hpp.

bool viennacl::linalg::cuda::detail::is_unit_solve ( viennacl::linalg::unit_lower_tag  )
inline

Definition at line 179 of file direct_solve.hpp.

bool viennacl::linalg::cuda::detail::is_unit_solve ( viennacl::linalg::unit_upper_tag  )
inline

Definition at line 180 of file direct_solve.hpp.

template<typename TagT >
bool viennacl::linalg::cuda::detail::is_upper_solve ( TagT const &  tag)

Definition at line 183 of file direct_solve.hpp.

bool viennacl::linalg::cuda::detail::is_upper_solve ( viennacl::linalg::upper_tag  )
inline

Definition at line 185 of file direct_solve.hpp.

bool viennacl::linalg::cuda::detail::is_upper_solve ( viennacl::linalg::unit_upper_tag  )
inline

Definition at line 186 of file direct_solve.hpp.

template<typename NumericT >
void viennacl::linalg::cuda::detail::level_scheduling_substitute ( vector< NumericT > &  vec,
viennacl::backend::mem_handle const &  row_index_array,
viennacl::backend::mem_handle const &  row_buffer,
viennacl::backend::mem_handle const &  col_buffer,
viennacl::backend::mem_handle const &  element_buffer,
vcl_size_t  num_rows 
)

Definition at line 68 of file misc_operations.hpp.

template<typename NumericT >
__global__ void viennacl::linalg::cuda::detail::level_scheduling_substitute_kernel ( const unsigned int *  row_index_array,
const unsigned int *  row_indices,
const unsigned int *  column_indices,
const NumericT *  elements,
NumericT *  vec,
unsigned int  size 
)

Definition at line 42 of file misc_operations.hpp.

unsigned int viennacl::linalg::cuda::detail::make_options ( vcl_size_t  length,
bool  reciprocal,
bool  flip_sign 
)
inline

Definition at line 38 of file common.hpp.

template<typename MatrixT1 , typename MatrixT2 , typename MatrixT3 , typename ScalarT >
void viennacl::linalg::cuda::detail::prod ( const MatrixT1 &  A,
bool  transposed_A,
const MatrixT2 &  B,
bool  transposed_B,
MatrixT3 &  C,
ScalarT  alpha,
ScalarT  beta 
)
template<typename MatrixT1 , typename MatrixT2 , typename MatrixT3 , typename ScalarT >
void viennacl::linalg::cuda::detail::prod_fast_kernel ( const MatrixT1 &  A,
const MatrixT2 &  B,
MatrixT3 &  C,
ScalarT  alpha,
ScalarT  beta,
std::string  kernel_name 
)

Definition at line 2309 of file matrix_operations.hpp.

template<typename MatrixT1 , typename MatrixT2 , typename MatrixT3 , typename ScalarT >
void viennacl::linalg::cuda::detail::prod_slow_kernel ( const MatrixT1 &  A,
bool  transposed_A,
const MatrixT2 &  B,
bool  transposed_B,
MatrixT3 &  C,
ScalarT  alpha,
ScalarT  beta 
)

Definition at line 1532 of file matrix_operations.hpp.

template<typename NumericT , unsigned int AligmentV>
void viennacl::linalg::cuda::detail::row_info ( compressed_matrix< NumericT, AligmentV > const &  mat,
vector_base< NumericT > &  vec,
viennacl::linalg::detail::row_info_types  info_selector 
)

Definition at line 100 of file sparse_matrix_operations.hpp.

template<typename NumericT , unsigned int AlignmentV>
void viennacl::linalg::cuda::detail::row_info ( coordinate_matrix< NumericT, AlignmentV > const &  mat,
vector_base< NumericT > &  vec,
viennacl::linalg::detail::row_info_types  info_selector 
)

Definition at line 1062 of file sparse_matrix_operations.hpp.