Data Structures | Functions

viennacl::tools Namespace Reference

Data Structures

struct  MATRIX_ITERATOR_INCREMENTER
class  const_sparse_matrix_adapted_iterator
 A const iterator for sparse matrices of type std::vector<std::map<unsigned int, SCALARTYPE> > More...
class  const_sparse_matrix_adapter
 Adapts a constant sparse matrix type made up from std::vector<std::map<unsigned int, SCALARTYPE> > to basic ublas-compatibility. More...
class  sparse_matrix_adapted_iterator
 A non-const iterator for sparse matrices of type std::vector<std::map<unsigned int, SCALARTYPE> > More...
class  sparse_matrix_adapter
 Adapts a non-const sparse matrix type made up from std::vector<std::map<unsigned int, SCALARTYPE> > to basic ublas-compatibility. More...
struct  MATRIX_KERNEL_CLASS_DEDUCER
 Implementation of a helper meta class for deducing the correct kernels for the supplied matrix. More...
struct  MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_KERNEL_CLASS_DEDUCER< viennacl::matrix_range< T > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER
 deduces kernel type for C=A*B, where A, B, C are MatrixType1, MatrixType2 and MatrixType3 respectively More...
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_PROD_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_SIZE_DEDUCER
 Deduces the size of the resulting vector represented by a vector_expression from the operands. More...
struct  MATRIX_SIZE_DEDUCER< viennacl::vector< ScalarType, A1 >, viennacl::vector< ScalarType, A2 >, viennacl::op_prod >
struct  MATRIX_SIZE_DEDUCER< const viennacl::matrix_expression< const viennacl::matrix< ScalarType, F1, A1 >, const viennacl::matrix< ScalarType, F1, A1 >, op_trans >, const viennacl::matrix< ScalarType, F2, A2 >, viennacl::op_prod >
struct  MATRIX_SIZE_DEDUCER< const viennacl::matrix< ScalarType, F1, A1 >, const viennacl::matrix_expression< const viennacl::matrix< ScalarType, F2, A2 >, const viennacl::matrix< ScalarType, F2, A2 >, op_trans >, viennacl::op_prod >
struct  MATRIX_SOLVE_KERNEL_CLASS_DEDUCER
 deduces kernel type for A \ B, where A, B, C are MatrixType1 and MatrixType2 More...
struct  MATRIX_SOLVE_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_SOLVE_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_SOLVE_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::row_major, ALIGNMENT > >
struct  MATRIX_SOLVE_KERNEL_CLASS_DEDUCER< viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT >, viennacl::matrix< SCALARTYPE, viennacl::column_major, ALIGNMENT > >
struct  MATRIX_ITERATOR_INCREMENTER< viennacl::row_iteration, viennacl::matrix< SCALARTYPE, F, ALIGNMENT > >
 Supply suitable increment functions for the iterators: More...
struct  MATRIX_ITERATOR_INCREMENTER< viennacl::col_iteration, viennacl::matrix< SCALARTYPE, F, ALIGNMENT > >
struct  CHECK_SCALAR_TEMPLATE_ARGUMENT
 A guard that checks whether the floating point type of GPU types is either float or double. More...
struct  CHECK_SCALAR_TEMPLATE_ARGUMENT< float >
struct  CHECK_SCALAR_TEMPLATE_ARGUMENT< double >
struct  CONST_REMOVER
 Removes the const qualifier from a type. More...
struct  CONST_REMOVER< const T >
struct  VECTOR_EXTRACTOR_IMPL
 Extracts the vector type from one of the two arguments. Used for the vector_expression type. More...
struct  VECTOR_EXTRACTOR_IMPL< LHS, viennacl::vector< ScalarType, A > >
struct  VECTOR_EXTRACTOR_IMPL< viennacl::vector< ScalarType, A >, RHS >
struct  VECTOR_EXTRACTOR_IMPL< viennacl::vector< ScalarType, A >, viennacl::vector< ScalarType, A > >
struct  VECTOR_EXTRACTOR
struct  VECTOR_SIZE_DEDUCER
 Deduces the size of the resulting vector represented by a vector_expression from the operands. More...
struct  VECTOR_SIZE_DEDUCER< const viennacl::vector< ScalarType, A >, RHS, viennacl::op_prod >
struct  VECTOR_SIZE_DEDUCER< const viennacl::vector< ScalarType, A >, RHS, viennacl::op_div >
struct  VECTOR_SIZE_DEDUCER< const viennacl::matrix< ScalarType, F, Amat >, const viennacl::vector< ScalarType, A >, viennacl::op_prod >
struct  VECTOR_SIZE_DEDUCER< const viennacl::circulant_matrix< ScalarType, Amat >, const viennacl::vector< ScalarType, A >, viennacl::op_prod >
struct  VECTOR_SIZE_DEDUCER< const viennacl::compressed_matrix< ScalarType, Amat >, const viennacl::vector< ScalarType, A >, viennacl::op_prod >
struct  VECTOR_SIZE_DEDUCER< const viennacl::coordinate_matrix< ScalarType, Amat >, const viennacl::vector< ScalarType, A >, viennacl::op_prod >
struct  VECTOR_SIZE_DEDUCER< const viennacl::matrix_expression< const viennacl::matrix< ScalarType, F, Amat >, const viennacl::matrix< ScalarType, F, Amat >, op_trans >, const viennacl::vector< ScalarType, A >, viennacl::op_prod >
struct  CPU_SCALAR_TYPE_DEDUCER
 Obtain the cpu scalar type from a type, including a GPU type like viennacl::scalar<T> More...
struct  CPU_SCALAR_TYPE_DEDUCER< float >
struct  CPU_SCALAR_TYPE_DEDUCER< double >
struct  CPU_SCALAR_TYPE_DEDUCER< viennacl::scalar< T > >
struct  CPU_SCALAR_TYPE_DEDUCER< viennacl::vector< T, A > >
struct  CPU_SCALAR_TYPE_DEDUCER< viennacl::matrix< T, F, A > >
struct  CPU_SCALAR_TYPE_DEDUCER< viennacl::matrix_expression< const matrix< T, F, A >, const matrix< T, F, A >, op_trans > >

Functions

std::string readTextFromFile (const std::string &filename)
 Reads a text from a file into a std::string.
std::string strReplace (const std::string &text, std::string to_search, std::string to_replace)
 Replaces all occurances of a substring by another stringstream.
template<class INT_TYPE >
INT_TYPE roundUpToNextMultiple (INT_TYPE to_reach, INT_TYPE base)
 Rounds an integer to the next multiple of another integer.
std::string make_double_kernel (std::string const &source, std::string platform_info)
 Create a double precision kernel out of a single precision kernel.

Function Documentation

std::string viennacl::tools::make_double_kernel ( std::string const &  source,
std::string  platform_info 
) [inline]

Create a double precision kernel out of a single precision kernel.

Parameters:
source The source string
platform_info An info string that contains the OpenCL platform vendor
Returns:
The double precision kernel
std::string viennacl::tools::readTextFromFile ( const std::string &  filename  )  [inline]

Reads a text from a file into a std::string.

Parameters:
filename The filename
Returns:
The text read from the file
INT_TYPE viennacl::tools::roundUpToNextMultiple ( INT_TYPE  to_reach,
INT_TYPE  base 
)

Rounds an integer to the next multiple of another integer.

Template Parameters:
INT_TYPE The integer type
Parameters:
to_reach The integer to be rounded up (ceil operation)
base The base
Returns:
The smallest multiple of 'base' such that to_reach <= base
std::string viennacl::tools::strReplace ( const std::string &  text,
std::string  to_search,
std::string  to_replace 
) [inline]

Replaces all occurances of a substring by another stringstream.

Parameters:
text The string to search in
to_search The substring to search for
to_replace The replacement for found substrings
Returns:
The resulting string