34 #ifndef __GPUVECTOR_H__
35 #define __GPUVECTOR_H__
45 #ifndef SWIG // SWIG should skip this part
48 template <
class,
class,
class>
class vector_base;
49 template <
class>
class const_entry_proxy;
50 template <
class>
class entry_proxy;
60 template <
class,
int,
int,
int,
int,
int>
class Matrix;
77 template <
class T>
class CGPUVector
80 typedef viennacl::vector_base<T, std::size_t, std::ptrdiff_t> VCLVectorBase;
81 typedef viennacl::backend::mem_handle VCLMemoryArray;
91 template <
typename ST>
using container_type = CGPUVector<ST>;
109 CGPUVector(std::shared_ptr<VCLMemoryArray> mem,
index_t length,
index_t mem_offset=0);
112 CGPUVector(
const SGVector<T>& cpu_vec);
116 CGPUVector(
const EigenVectorXt& cpu_vec);
119 CGPUVector(
const EigenRowVectorXt& cpu_vec);
122 operator EigenVectorXt()
const;
125 operator EigenRowVectorXt()
const;
127 #endif // HAVE_EIGEN3
130 inline VCLVectorBase data()
142 operator SGVector<T>()
const;
147 VCLVectorBase vcl_vector();
156 void set_const(T value);
159 void display_vector(
const char* name=
"vector")
const;
166 viennacl::const_entry_proxy<T> operator[](
index_t index)
const;
173 viennacl::entry_proxy<T> operator[](
index_t index);
180 std::shared_ptr<VCLMemoryArray> vector;
195 #endif // HAVE_VIENNACL
196 #endif // __GPUVECTOR_H__
all of classes and functions are contained in the shogun namespace