interface InferenceEngine::IAllocator¶
Detailed Documentation¶
Allocator concept to be used for memory management and is used as part of the Blob.
Methods¶
virtual void \*void \*LockOp lock(, ) = 0
Maps handle to heap memory accessible by any memory manipulation routines.
Parameters:
handle |
Handle to the allocated memory to be locked |
op |
Operation to lock memory for |
Returns:
Generic pointer to memory
virtual voidvoid \* unlock() = 0
Unmaps memory by handle with multiple sequential mappings of the same handle.
The multiple sequential mappings of the same handle are suppose to get the same result while there isn’t a ref counter supported.
Parameters:
handle |
Handle to the locked memory to unlock |
virtual void \*size_t alloc() = 0
Allocates memory.
Parameters:
size |
The size in bytes to allocate |
Returns:
Handle to the allocated resource
virtual boolvoid \* free() = 0
Releases the handle and all associated memory resources which invalidates the handle.
Parameters:
handle |
The handle to free |
Returns:
false
if handle cannot be released, otherwise - true
.