Public Member Functions |
|
| linear_memory (const boost::shared_ptr< allocator > _allocator=boost::make_shared< default_allocator >()) |
| | default constructor: does nothing
|
| | linear_memory (size_type i, const boost::shared_ptr< allocator > _allocator=boost::make_shared< default_allocator >()) |
| | constructor: reserves space for i elements
|
|
value_type * | release () |
| | releases ownership of pointer (for storage in memory class)
|
|
void | set_size (size_type s) |
| | sets the size (reallocates if necessary)
|
|
void | alloc () |
| | allocate space according to size()
|
| my_type & | operator= (const my_type &o) |
| | Copy linear_memory.
|
| template<class OM > |
| my_type & | operator= (const linear_memory< value_type, OM > &o) |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
| linear_memory (const my_type &o) |
| | construct from other linear memory
|
|
template<class OM > |
| | linear_memory (const linear_memory< V, OM > &o) |
| | construct from other linear memory
|
| reference_type | operator[] (const index_type &idx) |
| const_reference_type | operator[] (const index_type &idx) const |
| | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
| ~linear_memory () |
| | deallocates memory
|
|
void | set_strides (linear_memory< index_type, cuv::host_memory_space > &strides, const linear_memory< size_type, cuv::host_memory_space > &shape, row_major) |
| | set strides for this memory
|
|
void | set_strides (linear_memory< index_type, cuv::host_memory_space > &strides, const linear_memory< size_type, cuv::host_memory_space > &shape, column_major) |
| | set strides for this memory
|
| void | reverse () |
| | reverse the array (for transposing etc)
|
|
template<class value_type2 , class memory_space > |
| void | copy_from (const value_type2 *src, size_t size, memory_space m, cudaStream_t stream) |
|
template<class V2 , class OM > |
| void | copy_from (const linear_memory< V2, OM > &src, cudaStream_t stream) const |
| V * | ptr () |
| const V * | ptr () const |
| size_type | size () const |
| size_type | memsize () const |
|
void | reset (V *p, size_type s) |
| | reset information (use with care, for deserialization)
|
|
| memory (const boost::shared_ptr< allocator > &_allocator) |
| | default constructor (just sets ptr to NULL)
|
|
| memory (value_type *ptr, size_type size, const boost::shared_ptr< allocator > &_allocator, bool owned=true) |
| | construct with pointer (takes /ownership/ of this pointer and deletes it when destroyed!)
|
|
| ~memory () |
| | destructor (deallocates the memory)
|
|
void | dealloc () |
| | dellocate space
|
|
template<class value_type2 , class memory_space > |
| void | copy_from (V *dst, const value_type2 *src, size_t size, memory_space m, cudaStream_t stream) |
|
template<class value_type2 , class memory_space > |
| void | copy2d_from (V *dst, const value_type2 *src, size_t dpitch, size_t spitch, size_t h, size_t w, memory_space m, cudaStream_t stream) |
|
template<class value_type2 , class memory_space > |
| void | copy2d_from (const value_type2 *src, size_t dpitch, size_t spitch, size_t h, size_t w, memory_space m, cudaStream_t stream) |
template<class V, class M>
class cuv::linear_memory< V, M >
represents contiguous memory
Definition at line 217 of file memory.hpp.