ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
matrix_product_float_double.hpp File Reference
#include <cstddef>
#include "viennacl/matrix.hpp"
#include "viennacl/matrix_proxy.hpp"
#include "viennacl/linalg/prod.hpp"
#include "boost/numeric/ublas/matrix.hpp"
#include "boost/numeric/ublas/matrix_proxy.hpp"
#include "boost/numeric/ublas/io.hpp"
#include "viennacl/tools/random.hpp"

Go to the source code of this file.

Classes

struct  matrix_maker< UBlasType, F >
 
struct  matrix_maker< boost::numeric::ublas::matrix< T >, F >
 
struct  matrix_maker< boost::numeric::ublas::matrix_range< MatrixT >, F >
 
struct  matrix_maker< boost::numeric::ublas::matrix_slice< MatrixT >, F >
 

Macros

#define BOOST_UBLAS_NDEBUG
 
#define TEST_LAYOUT(Clayout, Alayout, Blayout, composite)
 
#define DECLARE(NAME, size1, size2)
 
#define TEST_ALL_LAYOUTS(C_TYPE, A_TYPE, B_TYPE)
 

Functions

template<typename ScalarType , typename VCLMatrixType >
ScalarType diff (boost::numeric::ublas::matrix< ScalarType > const &mat1, VCLMatrixType const &mat2)
 
template<typename T , typename CType , typename AType , typename BType >
int test_layout (CType &C, AType const &A, AType const &AT, BType const &B, BType const &BT, boost::numeric::ublas::matrix< T > const &ground, T epsilon, bool with_composite)
 
template<typename T , typename RefAType , typename RefBType , typename RefCType >
int test_all_layouts (std::size_t CM, std::size_t CN, RefCType &cC, std::size_t AM, std::size_t AK, RefAType &cA, RefAType &cAT, std::size_t BK, std::size_t BN, RefBType &cB, RefBType &cBT, T epsilon)
 
template<class MatrixType >
void init_rand (MatrixType &A)
 
template<typename T >
int run_test (T epsilon)
 

Macro Definition Documentation

#define BOOST_UBLAS_NDEBUG

Definition at line 22 of file matrix_product_float_double.hpp.

#define DECLARE (   NAME,
  size1,
  size2 
)
Value:
matrix_type NAME ## _matrix(matrix_holder_ ## size1, matrix_holder_ ## size2);\
init_rand(NAME ## _matrix);\
matrix_type NAME ## T_matrix = boost::numeric::ublas::trans(NAME ## _matrix);\
\
matrix_type NAME ## _range_holder(range_holder_ ## size1, range_holder_ ## size2);\
init_rand(NAME ## _range_holder);\
matrix_range_type NAME ## _range(NAME ## _range_holder, range_ ## size1, range_ ## size2);\
matrix_type NAME ## T_range_holder = boost::numeric::ublas::trans(NAME ## _range_holder);\
matrix_range_type NAME ## T_range(NAME ## T_range_holder, range_ ## size2, range_ ## size1);\
\
matrix_type NAME ## _slice_holder(slice_holder_ ## size1, slice_holder_ ## size2);\
init_rand(NAME ## _slice_holder);\
matrix_slice_type NAME ## _slice(NAME ## _slice_holder, slice_ ## size1, slice_ ## size2);\
matrix_type NAME ## T_slice_holder = boost::numeric::ublas::trans(NAME ## _slice_holder);\
matrix_slice_type NAME ## T_slice(NAME ## T_slice_holder, slice_ ## size2, slice_ ## size1);\
void trans(matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > const &proxy, matrix_base< NumericT > &temp_trans)
vcl_size_t size1(MatrixType const &mat)
Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.)
Definition: size.hpp:163
result_of::size_type< MatrixType >::type size2(MatrixType const &mat)
Generic routine for obtaining the number of columns of a matrix (ViennaCL, uBLAS, etc...
Definition: size.hpp:201
void init_rand(MatrixType &A)
#define TEST_ALL_LAYOUTS (   C_TYPE,
  A_TYPE,
  B_TYPE 
)
Value:
std::cout << ">> " #C_TYPE " = " #A_TYPE "." #B_TYPE << std::endl;\
if (test_all_layouts<T>(C_TYPE ## _holder_M, C_TYPE ## _holder_N, C_ ## C_TYPE,\
A_TYPE ## _holder_M, A_TYPE ## _holder_K, A_ ## A_TYPE, AT_ ## A_TYPE,\
B_TYPE ## _holder_K, B_TYPE ## _holder_N, B_ ## B_TYPE, BT_ ## B_TYPE, epsilon) != EXIT_SUCCESS)\
return EXIT_FAILURE;\
#define TEST_LAYOUT (   Clayout,
  Alayout,
  Blayout,
  composite 
)
Value:
std::cout << "> " #Clayout " = " #Alayout "." #Blayout << std::endl; \
if (test_layout(C ## Clayout, A ## Alayout, AT ## Alayout, B ## Blayout, BT ## Blayout, ground, epsilon, composite) != EXIT_SUCCESS) \
return EXIT_FAILURE; \
int test_layout(CType &C, AType const &A, AType const &AT, BType const &B, BType const &BT, boost::numeric::ublas::matrix< T > const &ground, T epsilon, bool with_composite)

Function Documentation

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

Definition at line 37 of file matrix_product_float_double.hpp.

template<class MatrixType >
void init_rand ( MatrixType &  A)

Definition at line 211 of file matrix_product_float_double.hpp.

template<typename T >
int run_test ( epsilon)

Definition at line 223 of file matrix_product_float_double.hpp.

template<typename T , typename RefAType , typename RefBType , typename RefCType >
int test_all_layouts ( std::size_t  CM,
std::size_t  CN,
RefCType &  cC,
std::size_t  AM,
std::size_t  AK,
RefAType &  cA,
RefAType &  cAT,
std::size_t  BK,
std::size_t  BN,
RefBType &  cB,
RefBType &  cBT,
epsilon 
)

Definition at line 158 of file matrix_product_float_double.hpp.

template<typename T , typename CType , typename AType , typename BType >
int test_layout ( CType &  C,
AType const &  A,
AType const &  AT,
BType const &  B,
BType const &  BT,
boost::numeric::ublas::matrix< T > const &  ground,
epsilon,
bool  with_composite 
)

Definition at line 107 of file matrix_product_float_double.hpp.