15 namespace InferenceEngine {
38 virtual void*
lock(
void* handle,
LockOp op = LOCK_FOR_WRITE) noexcept = 0;
47 virtual void unlock(
void* handle) noexcept = 0;
54 virtual void*
alloc(
size_t size) noexcept = 0;
60 virtual bool free(
void* handle) noexcept = 0;
Allocator concept to be used for memory management and is used as part of the Blob.
Definition: ie_allocator.hpp:29
~IAllocator() override=default
Disables the ability of deleting the object without release.
virtual void * lock(void *handle, LockOp op=LOCK_FOR_WRITE) noexcept=0
Maps handle to heap memory accessible by any memory manipulation routines.
virtual bool free(void *handle) noexcept=0
Releases the handle and all associated memory resources which invalidates the handle.
virtual void * alloc(size_t size) noexcept=0
Allocates memory.
virtual void unlock(void *handle) noexcept=0
Unmaps memory by handle with multiple sequential mappings of the same handle.
InferenceEngine::IAllocator * CreateDefaultAllocator() noexcept
Creates the default implementation of the Inference Engine allocator per plugin.
LockOp
Allocator handle mapping type.
Definition: ie_allocator.hpp:20
@ LOCK_FOR_READ
A flag to lock data for read.
Definition: ie_allocator.hpp:21
@ LOCK_FOR_WRITE
A flag to lock data for write.
Definition: ie_allocator.hpp:22
The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS.
A header file for the Inference Engine plugins destruction mechanism.