ViennaCL - The Vienna Computing Library  1.2.0
Namespaces | Data Structures | Functions
viennacl::io Namespace Reference

Namespaces

namespace  tag
namespace  val

Data Structures

struct  parameter_database
 A XML parameter database using PugiXML. Allows to add tests for different devices and the like. More...
struct  first_letter_of_type
 Helper meta class that returns the first letter of a particular type (float or double) More...
struct  first_letter_of_type< float >
struct  first_letter_of_type< double >
struct  program_for_vcltype
struct  program_for_vcltype< viennacl::vector< T, ALIGNMENT > >
struct  program_for_vcltype< viennacl::matrix< T, row_major, ALIGNMENT > >
struct  program_for_vcltype< viennacl::matrix< T, column_major, ALIGNMENT > >
struct  program_for_vcltype< viennacl::compressed_matrix< T, ALIGNMENT > >
struct  to_string
 Helper meta-class that converts a type to a string. More...
struct  to_string< float >
struct  to_string< double >

Functions

template<typename SCALARTYPE , unsigned int ALIGNMENT>
void set_kernel_params (std::string program_name, std::string kernel_name, unsigned int glob, unsigned int loc)
template<typename VclBasicType >
void tune_impl (parameter_database &paras, std::string parent)
template<typename VclBasicType >
void read_kernel_parameters (std::string filename)
 The interface function for reading kernel parameters.
template<typename MatrixType >
long read_matrix_market_file_impl (MatrixType &mat, const char *file, long index_base)
 Reads a sparse or dense matrix from a file (MatrixMarket format)
template<typename MatrixType >
long read_matrix_market_file (MatrixType &mat, const char *file, long index_base=1)
 Reads a sparse matrix from a file (MatrixMarket format)
template<typename MatrixType >
long read_matrix_market_file (MatrixType &mat, const std::string &file, long index_base=1)
template<typename ScalarType >
long read_matrix_market_file (std::vector< std::map< unsigned int, ScalarType > > &mat, const char *file, long index_base=1)
template<typename ScalarType >
long read_matrix_market_file (std::vector< std::map< unsigned int, ScalarType > > &mat, const std::string &file, long index_base=1)
template<typename MatrixType >
void write_matrix_market_file_impl (MatrixType const &mat, const char *file, long index_base)
template<typename ScalarType >
void write_matrix_market_file (std::vector< std::map< unsigned int, ScalarType > > const &mat, const char *file, long index_base=1)
template<typename ScalarType >
void write_matrix_market_file (std::vector< std::map< unsigned int, ScalarType > > const &mat, const std::string &file, long index_base=1)
template<typename MatrixType >
void write_matrix_market_file (MatrixType const &mat, const std::string &file, long index_base=1)
 Writes a sparse matrix to a file (MatrixMarket format)

Function Documentation

void viennacl::io::read_kernel_parameters ( std::string  filename)

The interface function for reading kernel parameters.

Template Parameters
VclBasicTypeThe ViennaCL type for which parameters should be read
Parameters
filenameRelative filename to the XML file where the parameters are located in
long viennacl::io::read_matrix_market_file ( MatrixType &  mat,
const char *  file,
long  index_base = 1 
)

Reads a sparse matrix from a file (MatrixMarket format)

Parameters
matThe matrix that is to be read (ublas-types and std::vector< std::map <unsigned int, ScalarType> > are supported)
fileThe filename
index_baseThe index base, typically 1
Template Parameters
MatrixTypeA generic matrix type. Type requirements: size1() returns number of rows, size2() returns number columns, operator() writes array entries, resize() allows resizing the matrix.
Returns
Returns nonzero if file is read correctly
long viennacl::io::read_matrix_market_file ( MatrixType &  mat,
const std::string &  file,
long  index_base = 1 
)
long viennacl::io::read_matrix_market_file ( std::vector< std::map< unsigned int, ScalarType > > &  mat,
const char *  file,
long  index_base = 1 
)
long viennacl::io::read_matrix_market_file ( std::vector< std::map< unsigned int, ScalarType > > &  mat,
const std::string &  file,
long  index_base = 1 
)
long viennacl::io::read_matrix_market_file_impl ( MatrixType &  mat,
const char *  file,
long  index_base 
)

Reads a sparse or dense matrix from a file (MatrixMarket format)

Parameters
matThe matrix that is to be read
fileFilename from which the matrix should be read
index_baseThe index base, typically 1
Template Parameters
MatrixTypeA generic matrix type. Type requirements: size1() returns number of rows, size2() returns number columns, operator() writes array entries, resize() allows resizing the matrix.
Returns
Returns nonzero if file is read correctly
void viennacl::io::set_kernel_params ( std::string  program_name,
std::string  kernel_name,
unsigned int  glob,
unsigned int  loc 
)
void viennacl::io::tune_impl ( parameter_database &  paras,
std::string  parent 
)
void viennacl::io::write_matrix_market_file ( std::vector< std::map< unsigned int, ScalarType > > const &  mat,
const char *  file,
long  index_base = 1 
)
void viennacl::io::write_matrix_market_file ( std::vector< std::map< unsigned int, ScalarType > > const &  mat,
const std::string &  file,
long  index_base = 1 
)
void viennacl::io::write_matrix_market_file ( MatrixType const &  mat,
const std::string &  file,
long  index_base = 1 
)

Writes a sparse matrix to a file (MatrixMarket format)

Parameters
matThe matrix that is to be read (ublas-types and std::vector< std::map <unsigned int, ScalarType> > are supported)
fileThe filename
index_baseThe index base, typically 1
Template Parameters
MatrixTypeA generic matrix type. Type requirements: size1() returns number of rows, size2() returns number columns, operator() writes array entries, resize() allows resizing the matrix.
Returns
Returns nonzero if file is read correctly
void viennacl::io::write_matrix_market_file_impl ( MatrixType const &  mat,
const char *  file,
long  index_base 
)