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
generator_blas2.cpp File Reference
#include <iostream>
#include <boost/numeric/ublas/io.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include "viennacl/vector.hpp"
#include "viennacl/matrix.hpp"
#include "viennacl/linalg/prod.hpp"
#include "viennacl/linalg/reduce.hpp"
#include "viennacl/device_specific/code_generator.hpp"
#include "viennacl/scheduler/io.hpp"

Go to the source code of this file.

Macros

#define VIENNACL_WITH_UBLAS   1
 
#define CHECK_RESULT(cpu, gpu, op)
 

Functions

template<typename ScalarType , typename VCLMatrixType >
ScalarType diff (ublas::matrix< ScalarType > &mat1, VCLMatrixType &mat2)
 
template<typename ScalarType , unsigned int Alignment>
ScalarType diff (ublas::vector< ScalarType > &v1, viennacl::vector< ScalarType, Alignment > &v2)
 
template<typename NumericT , class Layout , typename Epsilon >
int test (Epsilon const &epsilon)
 
int main ()
 

Macro Definition Documentation

#define CHECK_RESULT (   cpu,
  gpu,
  op 
)
Value:
if ( double delta = fabs ( diff ( cpu, gpu) ) > epsilon ) {\
std::cout << "# Error at operation: " #op << std::endl;\
std::cout << " diff: " << delta << std::endl;\
retval = EXIT_FAILURE;\
}\
ScalarType diff(ublas::matrix< ScalarType > &mat1, VCLMatrixType &mat2)

Definition at line 44 of file generator_blas2.cpp.

#define VIENNACL_WITH_UBLAS   1

Definition at line 32 of file generator_blas2.cpp.

Function Documentation

template<typename ScalarType , typename VCLMatrixType >
ScalarType diff ( ublas::matrix< ScalarType > &  mat1,
VCLMatrixType &  mat2 
)

Definition at line 56 of file generator_blas2.cpp.

template<typename ScalarType , unsigned int Alignment>
ScalarType diff ( ublas::vector< ScalarType > &  v1,
viennacl::vector< ScalarType, Alignment > &  v2 
)

Definition at line 78 of file generator_blas2.cpp.

int main ( )

Definition at line 206 of file generator_blas2.cpp.

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

Definition at line 92 of file generator_blas2.cpp.