Environment callbacks#

Typedefs

typedef void (*wholememory_create_memory_context_func_t)(void **memory_context, void *global_context)#

Function pointer to create temporary memory context.

typedef void (*wholememory_destroy_memory_context_func_t)(void *memory_context, void *global_context)#
typedef void *(*wholememory_malloc_func_t)(wholememory_tensor_description_t *desc, wholememory_memory_allocation_type_t memory_allocation_type, void *memory_context, void *global_context)#
typedef void (*wholememory_free_func_t)(void *memory_context, void *global_context)#

Enums

enum wholememory_memory_allocation_type_t#

Function pointers for memory allocation. Input tensor memory should be allocated and use void* pointer to the memory and wholememory_array_description_t or wholememory_matrix_description_t to specify the shape Output tensor with fixed size should be the same as Input tensor. Output tensor with shape determined by Op should has void* memory_context input and allocated by wholememory_malloc_func_t functions.

Values:

enumerator WHOLEMEMORY_MA_NONE#
enumerator WHOLEMEMORY_MA_DEVICE#
enumerator WHOLEMEMORY_MA_HOST#
enumerator WHOLEMEMORY_MA_PINNED#

Functions

cudaDeviceProp *get_device_prop(int dev_id)#
struct wholememory_temp_memory_func_t#
#include <env_func_ptrs.h>

Public Members

wholememory_create_memory_context_func_t create_memory_context_fn#
wholememory_destroy_memory_context_func_t destroy_memory_context_fn#
wholememory_malloc_func_t malloc_fn#
wholememory_free_func_t free_fn#
void *global_context#
struct wholememory_output_memory_func_t#
#include <env_func_ptrs.h>

Public Members

wholememory_malloc_func_t malloc_fn#
wholememory_free_func_t free_fn#
void *global_context#
struct wholememory_env_func_t#
#include <env_func_ptrs.h>

Public Members

wholememory_temp_memory_func_t temporary_fns#
wholememory_output_memory_func_t output_fns#