57 AFAPI void deviceInfo(
char* d_name,
char* d_platform,
char *d_toolkit,
char* d_compute);
118 T*
alloc(
const size_t elements);
144 T*
pinned(
const size_t elements);
153 #if AF_API_VERSION >= 33 166 #if AF_API_VERSION >= 33 182 #if AF_API_VERSION >= 33 206 size_t *lock_bytes,
size_t *lock_buffers);
208 #if AF_API_VERSION >= 33 320 #if AF_API_VERSION >= 33 327 #if AF_API_VERSION >= 33 345 size_t *lock_bytes,
size_t *lock_buffers);
347 #if AF_API_VERSION >= 33 380 #if AF_API_VERSION >= 31 387 #if AF_API_VERSION >= 33 393 #if AF_API_VERSION >= 31 400 #if AF_API_VERSION >= 33 406 #if AF_API_VERSION >= 33 416 #if AF_API_VERSION >= 33 AFAPI af_err af_alloc_host(void **ptr, const dim_t bytes)
AFAPI void freePinned(const void *ptr)
Free pinned memory allocated by ArrayFire's memory manager.
Definition: algorithm.h:14
AFAPI af_err af_sync(const int device)
AFAPI void freeHost(const void *ptr)
Free memory allocated internally by ArrayFire.
AFAPI af_err af_get_device_ptr(void **ptr, const af_array arr)
Get the device pointer and lock the buffer in memory manager.
AFAPI af_err af_device_gc()
Call the garbage collection routine.
AFAPI void * pinned(const size_t elements, const dtype type)
Allocate pinned memory using ArrayFire's memory manager.
AFAPI af_err af_free_device(void *ptr)
This function will free a device pointer even if it has been previously locked.
AFAPI size_t getMemStepSize()
Get the resolution of memory chunks.
AFAPI af_err af_set_device(const int device)
AFAPI af_err af_alloc_pinned(void **ptr, const dim_t bytes)
AFAPI af_err af_info_string(char **str, const bool verbose)
Gets the output of af_info() as a string.
AFAPI af_err af_unlock_array(const af_array arr)
Unlock device buffer in the memory manager.
AFAPI void deviceGC()
Call the garbage collection function in the memory manager.
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.
AFAPI void setMemStepSize(const size_t size)
Set the resolution of memory chunks.
af_err
Definition: defines.h:63
AFAPI af_err af_free_host(void *ptr)
#define DEPRECATED(msg)
Definition: defines.h:37
AFAPI const char * infoString(const bool verbose=false)
AFAPI void * allocHost(const size_t elements, const dtype type)
Allocate memory on host.
long long dim_t
Definition: defines.h:50
AFAPI af_err af_get_mem_step_size(size_t *step_bytes)
Get the minimum memory chunk size.
AFAPI af_err af_get_device_count(int *num_of_devices)
#define AFAPI
Definition: defines.h:31
AFAPI void printMemInfo(const char *msg=NULL, const int device_id=-1)
Prints buffer details from the ArrayFire Device Manager.
AFAPI void sync(const int device=-1)
Blocks until the device is finished processing.
AFAPI af_err af_free_pinned(void *ptr)
AFAPI void free(const void *ptr)
Free device memory allocated by ArrayFire's memory manager.
AFAPI af_err af_lock_device_ptr(const af_array arr)
Lock the device buffer in the memory manager.
AFAPI af_err af_set_mem_step_size(const size_t step_bytes)
Set the minimum memory chunk size.
AFAPI bool isDoubleAvailable(const int device)
Queries the current device for double precision floating point support.
AFAPI af_err af_unlock_device_ptr(const af_array arr)
Unlock device buffer in the memory manager.
AFAPI void deviceInfo(char *d_name, char *d_platform, char *d_toolkit, char *d_compute)
Gets the information about device and platform as strings.
AFAPI af_err af_device_array(af_array *arr, const void *data, const unsigned ndims, const dim_t *const dims, const af_dtype type)
Create array from device memory.
AFAPI af_err af_get_device(int *device)
void * af_array
Definition: defines.h:222
AFAPI void * alloc(const size_t elements, const dtype type)
Allocates memory using ArrayFire's memory manager.
AFAPI void deviceMemInfo(size_t *alloc_bytes, size_t *alloc_buffers, size_t *lock_bytes, size_t *lock_buffers)
Gets information about the memory manager.
AFAPI af_err af_get_dbl_support(bool *available, const int device)
AFAPI int getDeviceCount()
Gets the number of devices.
AFAPI af_err af_device_mem_info(size_t *alloc_bytes, size_t *alloc_buffers, size_t *lock_bytes, size_t *lock_buffers)
Get memory information from the memory manager.
AFAPI af_err af_print_mem_info(const char *msg, const int device_id)
Prints buffer details from the ArrayFire Device Manager.
af_dtype
Definition: defines.h:195
AFAPI af_err af_device_info(char *d_name, char *d_platform, char *d_toolkit, char *d_compute)
Gets the information about device and platform as strings.
AFAPI af_err af_lock_array(const af_array arr)
Lock the device buffer in the memory manager.
af_dtype dtype
Definition: defines.h:400
AFAPI void setDevice(const int device)
Sets the current device.
AFAPI int getDevice()
Gets the current device ID.