34 #ifndef __GPUMATRIX_H__
35 #define __GPUMATRIX_H__
47 template <
class,
class,
class,
class>
class matrix_base;
48 template <
class>
class const_entry_proxy;
49 template <
class>
class entry_proxy;
60 template <
class,
int,
int,
int,
int,
int>
class Matrix;
66 template <
class>
class SGMatrix;
79 template <
class T>
class CGPUMatrix
81 typedef viennacl::matrix_base<T, viennacl::column_major, std::size_t, std::ptrdiff_t> VCLMatrixBase;
82 typedef viennacl::backend::mem_handle VCLMemoryArray;
108 CGPUMatrix(std::shared_ptr<VCLMemoryArray> mem,
index_t nrows,
index_t ncols,
112 CGPUMatrix(
const SGMatrix<T>& cpu_mat);
114 #ifndef SWIG // SWIG should skip this part
116 CGPUMatrix(
const EigenMatrixXt& cpu_mat);
119 operator EigenMatrixXt()
const;
124 operator SGMatrix<T>()
const;
129 VCLMatrixBase vcl_matrix();
138 void set_const(T value);
141 void display_matrix(
const char* name=
"matrix")
const;
149 viennacl::const_entry_proxy<T> operator()(
index_t i,
index_t j)
const;
164 viennacl::const_entry_proxy<T> operator[](
index_t index)
const;
171 viennacl::entry_proxy<T> operator[](
index_t index);
178 std::shared_ptr<VCLMemoryArray> matrix;
195 #endif // HAVE_VIENNACL
196 #endif // __GPUMATRIX_H__
all of classes and functions are contained in the shogun namespace