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 MatrixT > | |
long | read_matrix_market_file_impl (MatrixT &mat, const char *file, long index_base) |
Reads a sparse or dense matrix from a file (MatrixMarket format) More... | |
template<typename MatrixT > | |
long | read_matrix_market_file (MatrixT &mat, const char *file, long index_base=1) |
Reads a sparse matrix from a file (MatrixMarket format) More... | |
template<typename MatrixT > | |
long | read_matrix_market_file (MatrixT &mat, const std::string &file, long index_base=1) |
template<typename ScalarT > | |
long | read_matrix_market_file (std::vector< std::map< unsigned int, ScalarT > > &mat, const char *file, long index_base=1) |
template<typename ScalarT > | |
long | read_matrix_market_file (std::vector< std::map< unsigned int, ScalarT > > &mat, const std::string &file, long index_base=1) |
template<typename MatrixT > | |
void | write_matrix_market_file_impl (MatrixT const &mat, const char *file, long index_base) |
template<typename ScalarT > | |
void | write_matrix_market_file (std::vector< std::map< unsigned int, ScalarT > > const &mat, const char *file, long index_base=1) |
template<typename ScalarT > | |
void | write_matrix_market_file (std::vector< std::map< unsigned int, ScalarT > > const &mat, const std::string &file, long index_base=1) |
template<typename MatrixT > | |
void | write_matrix_market_file (MatrixT const &mat, const std::string &file, long index_base=1) |
Writes a sparse matrix to a file (MatrixMarket format) More... | |
Provides basic input-output functionality.
long viennacl::io::read_matrix_market_file | ( | MatrixT & | mat, |
const char * | file, | ||
long | index_base = 1 |
||
) |
Reads a sparse matrix from a file (MatrixMarket format)
mat | The matrix that is to be read (ublas-types and std::vector< std::map <unsigned int, ScalarT> > are supported) |
file | The filename |
index_base | The index base, typically 1 |
MatrixT | A generic matrix type. Type requirements: size1() returns number of rows, size2() returns number columns, operator() writes array entries, resize() allows resizing the matrix. |
Definition at line 339 of file matrix_market.hpp.
long viennacl::io::read_matrix_market_file | ( | MatrixT & | mat, |
const std::string & | file, | ||
long | index_base = 1 |
||
) |
Definition at line 347 of file matrix_market.hpp.
long viennacl::io::read_matrix_market_file | ( | std::vector< std::map< unsigned int, ScalarT > > & | mat, |
const char * | file, | ||
long | index_base = 1 |
||
) |
Definition at line 355 of file matrix_market.hpp.
long viennacl::io::read_matrix_market_file | ( | std::vector< std::map< unsigned int, ScalarT > > & | mat, |
const std::string & | file, | ||
long | index_base = 1 |
||
) |
Definition at line 364 of file matrix_market.hpp.
long viennacl::io::read_matrix_market_file_impl | ( | MatrixT & | mat, |
const char * | file, | ||
long | index_base | ||
) |
Reads a sparse or dense matrix from a file (MatrixMarket format)
Note: If the matrix in the MatrixMarket file is complex, only the real-valued part is loaded!
mat | The matrix that is to be read |
file | Filename from which the matrix should be read |
index_base | The index base, typically 1 |
MatrixT | A generic matrix type. Type requirements: size1() returns number of rows, size2() returns number columns, operator() writes array entries, resize() allows resizing the matrix. |
Definition at line 102 of file matrix_market.hpp.
void viennacl::io::write_matrix_market_file | ( | std::vector< std::map< unsigned int, ScalarT > > const & | mat, |
const char * | file, | ||
long | index_base = 1 |
||
) |
Definition at line 403 of file matrix_market.hpp.
void viennacl::io::write_matrix_market_file | ( | std::vector< std::map< unsigned int, ScalarT > > const & | mat, |
const std::string & | file, | ||
long | index_base = 1 |
||
) |
Definition at line 412 of file matrix_market.hpp.
void viennacl::io::write_matrix_market_file | ( | MatrixT const & | mat, |
const std::string & | file, | ||
long | index_base = 1 |
||
) |
Writes a sparse matrix to a file (MatrixMarket format)
mat | The matrix that is to be read (ublas-types and std::vector< std::map <unsigned int, ScalarT> > are supported) |
file | The filename |
index_base | The index base, typically 1 |
MatrixT | A generic matrix type. Type requirements: size1() returns number of rows, size2() returns number columns, operator() writes array entries, resize() allows resizing the matrix. |
Definition at line 429 of file matrix_market.hpp.
void viennacl::io::write_matrix_market_file_impl | ( | MatrixT const & | mat, |
const char * | file, | ||
long | index_base | ||
) |
Definition at line 375 of file matrix_market.hpp.