|
Allocate memory using the ArrayFire memory manager. More...
Functions | |
AFAPI af_err | af_alloc_device (void **ptr, const dim_t bytes) |
This device memory returned by this function can only be freed using af_free_device. More... | |
AFAPI void * | alloc (const size_t elements, const dtype type) |
Allocates memory using ArrayFire's memory manager. More... | |
template<typename T > | |
T * | alloc (const size_t elements) |
Allocates memory using ArrayFire's memory manager. More... | |
Allocate memory using the ArrayFire memory manager.
This function will allocate memory on the device and return a pointer to it. The memory is allocated using ArrayFire's memory manager which has some different characteristics to standard method of memory allocation
This device memory returned by this function can only be freed using af_free_device.
Allocates memory using ArrayFire's memory manager.
Allocate memory using the ArrayFire memory manager. This function will allocate memory on the device and return a pointer to it. The memory is allocated using ArrayFire's memory manager which has some different characteristics to standard method of memory allocation
[in] | elements | the number of elements to allocate |
[in] | type | is the type of the elements to allocate |
T* af::alloc | ( | const size_t | elements | ) |
Allocates memory using ArrayFire's memory manager.
Allocate memory using the ArrayFire memory manager. This function will allocate memory on the device and return a pointer to it. The memory is allocated using ArrayFire's memory manager which has some different characteristics to standard method of memory allocation
[in] | elements | the number of elements to allocate |
elements
* sizeof(type)