34 #ifndef __GPUVECTOR_H__
35 #define __GPUVECTOR_H__
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
79 typedef viennacl::vector_base<T, std::size_t, std::ptrdiff_t> VCLVectorBase;
80 typedef viennacl::backend::mem_handle VCLMemoryArray;
105 CGPUVector(std::shared_ptr<VCLMemoryArray> mem,
index_t length,
index_t mem_offset=0);
108 CGPUVector(
const SGVector<T>& cpu_vec);
110 #ifndef SWIG // SWIG should skip this part
113 CGPUVector(
const EigenVectorXt& cpu_vec);
116 CGPUVector(
const EigenRowVectorXt& cpu_vec);
119 operator EigenVectorXt()
const;
122 operator EigenRowVectorXt()
const;
127 operator SGVector<T>()
const;
132 VCLVectorBase vcl_vector();
141 void set_const(T value);
144 void display_vector(
const char* name=
"vector")
const;
151 viennacl::const_entry_proxy<T> operator[](
index_t index)
const;
158 viennacl::entry_proxy<T> operator[](
index_t index);
165 std::shared_ptr<VCLMemoryArray> vector;
179 #endif // HAVE_VIENNACL
180 #endif // __GPUVECTOR_H__
all of classes and functions are contained in the shogun namespace