All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
matrix_vector.cpp File Reference
`#include <iostream>`
`#include <vector>`
`#include "viennacl/scalar.hpp"`
`#include "viennacl/matrix.hpp"`
`#include "viennacl/vector.hpp"`
`#include "viennacl/linalg/prod.hpp"`
`#include "viennacl/linalg/norm_2.hpp"`
`#include "viennacl/linalg/direct_solve.hpp"`
`#include "viennacl/linalg/lu.hpp"`
`#include "viennacl/linalg/sum.hpp"`
`#include "viennacl/tools/random.hpp"`

Go to the source code of this file.

## Functions

template<typename ScalarType >
ScalarType | diff (ScalarType &s1, viennacl::scalar< ScalarType > &s2)
template<typename ScalarType , typename VCLVectorType >
ScalarType | diff (std::vector< ScalarType > const &v1, VCLVectorType const &v2)
template<typename ScalarType , typename VCLMatrixType >
ScalarType | diff (std::vector< std::vector< ScalarType > > const &mat1, VCLMatrixType const &mat2)
template<typename NumericT , typename Epsilon , typename STLMatrixType , typename STLVectorType , typename VCLMatrixType , typename VCLVectorType1 , typename VCLVectorType2 >
int | test_prod_rank1 (Epsilon const &epsilon, STLMatrixType &std_m1, STLVectorType &std_v1, STLVectorType &std_v2, STLMatrixType &std_m2, VCLMatrixType &vcl_m1, VCLVectorType1 &vcl_v1, VCLVectorType2 &vcl_v2, VCLMatrixType &vcl_m2)
template<typename NumericT >
void | inplace_solve_upper (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > &b, bool unit_diagonal)
template<typename NumericT >
void | inplace_solve (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > &b, viennacl::linalg::upper_tag)
template<typename NumericT >
void | inplace_solve (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > &b, viennacl::linalg::unit_upper_tag)
template<typename NumericT >
void | inplace_solve_lower (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > &b, bool unit_diagonal)
template<typename NumericT >
void | inplace_solve (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > &b, viennacl::linalg::lower_tag)
template<typename NumericT >
void | inplace_solve (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > &b, viennacl::linalg::unit_lower_tag)
template<typename NumericT , typename TagT >
std::vector< NumericT > | solve (std::vector< std::vector< NumericT > > const &A, std::vector< NumericT > const &b, TagT)
template<typename NumericT , typename Epsilon , typename STLMatrixType , typename STLVectorType , typename VCLMatrixType , typename VCLVectorType1 >
int | test_solve (Epsilon const &epsilon, STLMatrixType &std_m1, STLVectorType &std_v1, VCLMatrixType &vcl_m1, VCLVectorType1 &vcl_v1)
template<typename NumericT , typename F , typename Epsilon >
int | test (Epsilon const &epsilon)
int | main ()

## Detailed Description

Tests routines for matrix-vector operaions (BLAS level 2) using floating point arithmetic.

Test:
  Tests routines for matrix-vector operaions (BLAS level 2) using floating point arithmetic.

Definition in file matrix_vector.cpp.

## Function Documentation

template<typename ScalarType >

ScalarType diff | ( | ScalarType & | s1,
|  | viennacl::scalar< ScalarType > & | s2
| ) |  |

Definition at line 47 of file matrix_vector.cpp.

template<typename ScalarType , typename VCLVectorType >

ScalarType diff | ( | std::vector< ScalarType > const & | v1,
|  | VCLVectorType const & | v2
| ) |  |

Definition at line 56 of file matrix_vector.cpp.

template<typename ScalarType , typename VCLMatrixType >

ScalarType diff | ( | std::vector< std::vector< ScalarType > > const & | mat1,
|  | VCLMatrixType const & | mat2
| ) |  |

Definition at line 77 of file matrix_vector.cpp.

template<typename NumericT >

void inplace_solve | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > & | b,
|  | viennacl::linalg::upper_tag |
| ) |  |

Definition at line 434 of file matrix_vector.cpp.

template<typename NumericT >

void inplace_solve | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > & | b,
|  | viennacl::linalg::unit_upper_tag |
| ) |  |

Definition at line 440 of file matrix_vector.cpp.

template<typename NumericT >

void inplace_solve | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > & | b,
|  | viennacl::linalg::lower_tag |
| ) |  |

Definition at line 458 of file matrix_vector.cpp.

template<typename NumericT >

void inplace_solve | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > & | b,
|  | viennacl::linalg::unit_lower_tag |
| ) |  |

Definition at line 464 of file matrix_vector.cpp.

template<typename NumericT >

void inplace_solve_lower | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > & | b,
|  | bool | unit_diagonal
| ) |  |

Definition at line 447 of file matrix_vector.cpp.

template<typename NumericT >

void inplace_solve_upper | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > & | b,
|  | bool | unit_diagonal
| ) |  |

Definition at line 422 of file matrix_vector.cpp.

int main | ( |  | ) |

Definition at line 1253 of file matrix_vector.cpp.

template<typename NumericT , typename TagT >

std::vector<NumericT> solve | ( | std::vector< std::vector< NumericT > > const & | A,
|  | std::vector< NumericT > const & | b,
|  | TagT |
| ) |  |

Definition at line 471 of file matrix_vector.cpp.

template<typename NumericT , typename F , typename Epsilon >

int test | ( | Epsilon const & | epsilon | ) |

Definition at line 606 of file matrix_vector.cpp.

template<typename NumericT , typename Epsilon , typename STLMatrixType , typename STLVectorType , typename VCLMatrixType , typename VCLVectorType1 , typename VCLVectorType2 >

int test_prod_rank1 | ( | Epsilon const & | epsilon,
|  | STLMatrixType & | std_m1,
|  | STLVectorType & | std_v1,
|  | STLVectorType & | std_v2,
|  | STLMatrixType & | std_m2,
|  | VCLMatrixType & | vcl_m1,
|  | VCLVectorType1 & | vcl_v1,
|  | VCLVectorType2 & | vcl_v2,
|  | VCLMatrixType & | vcl_m2
| ) |  |

Definition at line 104 of file matrix_vector.cpp.

template<typename NumericT , typename Epsilon , typename STLMatrixType , typename STLVectorType , typename VCLMatrixType , typename VCLVectorType1 >

int test_solve | ( | Epsilon const & | epsilon,
|  | STLMatrixType & | std_m1,
|  | STLVectorType & | std_v1,
|  | VCLMatrixType & | vcl_m1,
|  | VCLVectorType1 & | vcl_v1
| ) |  |

Definition at line 481 of file matrix_vector.cpp.