CUV
0.9.201304091348
|
specialization of template allocator for host_memory_space More...
#include <accessors.hpp>
Public Member Functions | |
void | alloc (value_type **ptr, size_type size) const |
Allocate memory for host matrices. | |
void | alloc2d (value_type **ptr, size_type &pitch, size_type height, size_type width) const |
Allocate 2D memory. | |
void | dealloc (value_type **ptr) const |
allocate memory | |
void | alloc (const value_type **ptr, size_type size) const |
Allocate memory for host matrices - const allocator should never be called! | |
void | dealloc (const value_type **ptr) const |
Deallocate memory for host matrices- const allocator should never be called! | |
void | copy (value_type *dst, const value_type *src, size_type size, host_memory_space) |
copy from host to host | |
template<class value_type2 > | |
void | copy (value_type *dst, const value_type2 *src, size_type size, host_memory_space) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.copy from host to host (different memory types) | |
void | copy (value_type *dst, const value_type *src, size_type size, dev_memory_space) |
copy from device to host | |
void | copy (const value_type *dst, const value_type *src, size_type size, host_memory_space) const |
throw assertion (should never be called) | |
void | copy (const value_type *dst, const value_type *src, size_type size, dev_memory_space) const |
throw assertion (should never be called) | |
void | copy2d (value_type *dst, const value_type *src, size_type dpitch, size_type spitch, size_type h, size_type w, host_memory_space) |
copy from host_memory_space | |
void | copy2d (value_type *dst, const value_type *src, size_type dpitch, size_type spitch, size_type h, size_type w, dev_memory_space) |
copy from dev_memory_space |
specialization of template allocator for host_memory_space
The gcc compiler can deal directly with this, so we do not need to hide the implementation in a .cu file.
Definition at line 104 of file accessors.hpp.
void cuv::allocator< value_type, size_type, host_memory_space >::alloc | ( | value_type ** | ptr, |
size_type | size | ||
) | const |
Allocate memory for host matrices.
ptr | Address of pointer which will be set to allocated memory |
size | Size of array which should be allocated |
This is the instance of the alloc function that is called by host vectors.
|
inline |
Allocate memory for host matrices - const allocator should never be called!
ptr | Address of pointer which will be set to allocated memory |
size | Size of array which should be allocated |
This is the instance of the alloc function that is called by const host vectors.
Definition at line 139 of file accessors.hpp.
void cuv::allocator< value_type, size_type, host_memory_space >::alloc2d | ( | value_type ** | ptr, |
size_type & | pitch, | ||
size_type | height, | ||
size_type | width | ||
) | const |
Allocate 2D memory.
ptr | Address of pointer which will be set to allocated memory |
pitch | OUT size of one "line" in memory in bytes |
height | number of lines in memory |
width | number elements in one line |
void cuv::allocator< value_type, size_type, host_memory_space >::dealloc | ( | value_type ** | ptr | ) | const |
allocate memory
Deallocate memory for host matrices
ptr | Address of pointer that will be freed |
This is the instance of the dealloc function that is called by host vectors.
|
inline |
Deallocate memory for host matrices- const allocator should never be called!
ptr | Address of pointer that will be freed |
This is the instance of the dealloc function that is called by host vectors.
Definition at line 149 of file accessors.hpp.