#include <iostream>
#include <iomanip>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>
#include "viennacl/vector.hpp"
#include "viennacl/vector_proxy.hpp"
#include "viennacl/linalg/inner_prod.hpp"
#include "viennacl/linalg/norm_1.hpp"
#include "viennacl/linalg/norm_2.hpp"
#include "viennacl/linalg/norm_inf.hpp"
#include "viennacl/tools/random.hpp"
Go to the source code of this file.
Macros | |
#define | VIENNACL_WITH_UBLAS 1 |
Functions | |
template<typename ScalarType > | |
ScalarType | diff (ScalarType const &s1, ScalarType const &s2) |
template<typename ScalarType > | |
ScalarType | diff (ScalarType const &s1, viennacl::scalar< ScalarType > const &s2) |
template<typename ScalarType > | |
ScalarType | diff (ScalarType const &s1, viennacl::entry_proxy< ScalarType > const &s2) |
template<typename ScalarType , typename ViennaCLVectorType > | |
ScalarType | diff (ublas::vector< ScalarType > const &v1, ViennaCLVectorType const &vcl_vec) |
template<typename ScalarType , typename ViennaCLVectorType > | |
ScalarType | diff (ublas::vector_slice< ublas::vector< ScalarType > > const &v1, ViennaCLVectorType const &vcl_vec) |
template<typename T1 , typename T2 > | |
int | check (T1 const &t1, T2 const &t2, double epsilon) |
template<typename NumericT , typename Epsilon , typename UblasVectorType1 , typename UblasVectorType2 , typename UblasVectorType3 , typename UblasVectorType4 , typename ViennaCLVectorType1 , typename ViennaCLVectorType2 , typename ViennaCLVectorType3 , typename ViennaCLVectorType4 > | |
int | test (Epsilon const &epsilon, UblasVectorType1 &ublas_v1, UblasVectorType2 &ublas_v2, UblasVectorType3 &ublas_v3, UblasVectorType4 &ublas_v4, ViennaCLVectorType1 &vcl_v1, ViennaCLVectorType2 &vcl_v2, ViennaCLVectorType3 &vcl_v3, ViennaCLVectorType4 &vcl_v4) |
template<typename NumericT , typename Epsilon > | |
int | test (Epsilon const &epsilon) |
int | main () |
Tests the performance of multiple inner products with a common vector.
Definition in file vector_multi_inner_prod.cpp.
#define VIENNACL_WITH_UBLAS 1 |
Definition at line 41 of file vector_multi_inner_prod.cpp.
int check | ( | T1 const & | t1, |
T2 const & | t2, | ||
double | epsilon | ||
) |
Definition at line 127 of file vector_multi_inner_prod.cpp.
ScalarType diff | ( | ScalarType const & | s1, |
ScalarType const & | s2 | ||
) |
Definition at line 57 of file vector_multi_inner_prod.cpp.
ScalarType diff | ( | ScalarType const & | s1, |
viennacl::scalar< ScalarType > const & | s2 | ||
) |
Definition at line 68 of file vector_multi_inner_prod.cpp.
ScalarType diff | ( | ScalarType const & | s1, |
viennacl::entry_proxy< ScalarType > const & | s2 | ||
) |
Definition at line 79 of file vector_multi_inner_prod.cpp.
ScalarType diff | ( | ublas::vector< ScalarType > const & | v1, |
ViennaCLVectorType const & | vcl_vec | ||
) |
Definition at line 90 of file vector_multi_inner_prod.cpp.
ScalarType diff | ( | ublas::vector_slice< ublas::vector< ScalarType > > const & | v1, |
ViennaCLVectorType const & | vcl_vec | ||
) |
Definition at line 108 of file vector_multi_inner_prod.cpp.
int main | ( | ) |
Definition at line 536 of file vector_multi_inner_prod.cpp.
int test | ( | Epsilon const & | epsilon, |
UblasVectorType1 & | ublas_v1, | ||
UblasVectorType2 & | ublas_v2, | ||
UblasVectorType3 & | ublas_v3, | ||
UblasVectorType4 & | ublas_v4, | ||
ViennaCLVectorType1 & | vcl_v1, | ||
ViennaCLVectorType2 & | vcl_v2, | ||
ViennaCLVectorType3 & | vcl_v3, | ||
ViennaCLVectorType4 & | vcl_v4 | ||
) |
Definition at line 147 of file vector_multi_inner_prod.cpp.
int test | ( | Epsilon const & | epsilon | ) |
Definition at line 339 of file vector_multi_inner_prod.cpp.