34 #ifndef __GPUMATRIX_H__
35 #define __GPUMATRIX_H__
48 template <
class,
class,
class,
class>
class matrix_base;
49 template <
class>
class const_entry_proxy;
50 template <
class>
class entry_proxy;
61 template <
class,
int,
int,
int,
int,
int>
class Matrix;
67 template <
class>
class SGMatrix;
80 template <
class T>
class CGPUMatrix
82 typedef viennacl::matrix_base<T, viennacl::column_major, std::size_t, std::ptrdiff_t> VCLMatrixBase;
83 typedef viennacl::backend::mem_handle VCLMemoryArray;
109 CGPUMatrix(std::shared_ptr<VCLMemoryArray> mem,
index_t nrows,
index_t ncols,
113 CGPUMatrix(
const SGMatrix<T>& cpu_mat);
115 #ifndef SWIG // SWIG should skip this part
117 CGPUMatrix(
const EigenMatrixXt& cpu_mat);
120 operator EigenMatrixXt()
const;
125 operator SGMatrix<T>()
const;
130 VCLMatrixBase vcl_matrix();
139 void set_const(T value);
142 void display_matrix(
const char* name=
"matrix")
const;
150 viennacl::const_entry_proxy<T> operator()(
index_t i,
index_t j)
const;
165 viennacl::const_entry_proxy<T> operator[](
index_t index)
const;
172 viennacl::entry_proxy<T> operator[](
index_t index);
179 std::shared_ptr<VCLMemoryArray> matrix;
196 #endif // HAVE_VIENNACL
197 #endif // __GPUMATRIX_H__
all of classes and functions are contained in the shogun namespace