ViennaCL - The Vienna Computing Library  1.5.2
Namespaces | Functions
viennacl::io Namespace Reference

Provides basic input-output functionality. More...

Namespaces

 detail
 Implementation details for IO functionality. Usually not of interest for a library user.
 
 tag
 Namespace holding the various XML tag definitions for the kernel parameter tuning facility.
 
 val
 Namespace holding the various XML strings for the kernel parameter tuning facility.
 

Functions

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) More...
 
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) More...
 
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) More...
 

Detailed Description

Provides basic input-output functionality.

Function Documentation

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::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 
)