ViennaCL - The Vienna Computing Library  1.6.0
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vector_float_double.cpp File Reference
#include <iostream>
#include <iomanip>
#include <cmath>
#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/linalg/maxmin.hpp"
#include "Random.hpp"

Go to the source code of this file.

Macros

#define BOOST_UBLAS_NDEBUG
 
#define VIENNACL_WITH_UBLAS   1
 
#define GENERATE_UNARY_OP_TEST(FUNCNAME)
 

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 T1 , typename T2 >
int check (T1 const &t1, T2 const &t2, double epsilon)
 
template<typename NumericT , typename Epsilon , typename UblasVectorType , typename ViennaCLVectorType1 , typename ViennaCLVectorType2 >
int test (Epsilon const &epsilon, UblasVectorType &ublas_v1, UblasVectorType &ublas_v2, ViennaCLVectorType1 &vcl_v1, ViennaCLVectorType2 &vcl_v2)
 
template<typename NumericT , typename Epsilon >
int test (Epsilon const &epsilon)
 
int main ()
 

Detailed Description

Tests vector operations (BLAS level 1) for floating point arithmetic.

Test:
Tests vector operations (BLAS level 1) for floating point arithmetic.

Definition in file vector_float_double.cpp.

Macro Definition Documentation

#define BOOST_UBLAS_NDEBUG

Definition at line 32 of file vector_float_double.cpp.

#define GENERATE_UNARY_OP_TEST (   FUNCNAME)
#define VIENNACL_WITH_UBLAS   1

Definition at line 46 of file vector_float_double.cpp.

Function Documentation

template<typename T1 , typename T2 >
int check ( T1 const &  t1,
T2 const &  t2,
double  epsilon 
)

Definition at line 116 of file vector_float_double.cpp.

template<typename ScalarType >
ScalarType diff ( ScalarType const &  s1,
ScalarType const &  s2 
)

Definition at line 64 of file vector_float_double.cpp.

template<typename ScalarType >
ScalarType diff ( ScalarType const &  s1,
viennacl::scalar< ScalarType > const &  s2 
)

Definition at line 75 of file vector_float_double.cpp.

template<typename ScalarType >
ScalarType diff ( ScalarType const &  s1,
viennacl::entry_proxy< ScalarType > const &  s2 
)

Definition at line 86 of file vector_float_double.cpp.

template<typename ScalarType , typename ViennaCLVectorType >
ScalarType diff ( ublas::vector< ScalarType > const &  v1,
ViennaCLVectorType const &  vcl_vec 
)

Definition at line 97 of file vector_float_double.cpp.

int main ( )

Definition at line 1902 of file vector_float_double.cpp.

template<typename NumericT , typename Epsilon , typename UblasVectorType , typename ViennaCLVectorType1 , typename ViennaCLVectorType2 >
int test ( Epsilon const &  epsilon,
UblasVectorType &  ublas_v1,
UblasVectorType &  ublas_v2,
ViennaCLVectorType1 &  vcl_v1,
ViennaCLVectorType2 &  vcl_v2 
)

Definition at line 134 of file vector_float_double.cpp.

template<typename NumericT , typename Epsilon >
int test ( Epsilon const &  epsilon)

Definition at line 1749 of file vector_float_double.cpp.