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);
115 CGPUVector(
const EigenVectorXt& cpu_vec);
118 CGPUVector(
const EigenRowVectorXt& cpu_vec);
121 operator EigenVectorXt()
const;
124 operator EigenRowVectorXt()
const;
128 inline VCLVectorBase data()
140 operator SGVector<T>()
const;
145 VCLVectorBase vcl_vector();
154 void set_const(T value);
157 void display_vector(
const char* name=
"vector")
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> vector;
193 #endif // HAVE_VIENNACL
194 #endif // __GPUVECTOR_H__
all of classes and functions are contained in the shogun namespace