29 #define GENERIC inline __device__ __host__
30 #define GPUAPI inline __device__
32 #define GENERIC inline
91 template<
class Item,
typename _Scalar =
typename Item::scalar_t,
int _CHUNK_SIZE = Item::CHUNK_SIZE >
94 static const int CHUNK_SIZE = _CHUNK_SIZE;
97 typedef _Scalar scalar_t;
122 :_array(array),_block_count(block_count){}
136 size_t block_idx = i / CHUNK_SIZE;
137 size_t idx = i % CHUNK_SIZE;
138 scalar_t * blockaddr = (scalar_t*) (
get() + block_idx);
139 return * (Item *) ( blockaddr + idx );
147 return _block_count ;
153 return _block_count * CHUNK_SIZE;
176 return get() + _block_count;
183 typedef double scalar_t;
185 GENERIC double& value(){
return _value[0]; }