All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vector-io.hpp File Reference
`#include <string>`
`#include <iostream>`
`#include <fstream>`
`#include "viennacl/tools/tools.hpp"`
`#include "viennacl/meta/result_of.hpp"`
`#include "viennacl/traits/size.hpp"`

Go to the source code of this file.

## Classes

class | my_inserter< MatrixType >

## Functions

template<typename MatrixType , typename ScalarType >
void | insert (MatrixType &matrix, long row, long col, ScalarType value)
template<typename VectorType >
void | resize_vector (VectorType &vec, unsigned int size)
template<typename VectorType >
bool | readVectorFromFile (const std::string &filename, VectorType &vec)
template<class MatrixType >
bool | readMatrixFromFile (const std::string &filename, MatrixType &matrix)

## Function Documentation

template<typename MatrixType , typename ScalarType >

void insert | ( | MatrixType & | matrix,
|  | long | row,
|  | long | col,
|  | ScalarType | value
| ) |  |

Definition at line 31 of file vector-io.hpp.

template<class MatrixType >

bool readMatrixFromFile | ( | const std::string & | filename,
|  | MatrixType & | matrix
| ) |  |

Definition at line 130 of file vector-io.hpp.

template<typename VectorType >

bool readVectorFromFile | ( | const std::string & | filename,
|  | VectorType & | vec
| ) |  |

Examples:
  iterative-armadillo.cpp, iterative-eigen.cpp, iterative-ublas.cpp, iterative.cpp, and multithreaded_cg.cpp.

Definition at line 104 of file vector-io.hpp.

template<typename VectorType >

void resize_vector | ( | VectorType & | vec,
|  | unsigned int | size
| ) |  |

Definition at line 98 of file vector-io.hpp.