clDNN
|
Represents buffer with particular layout. More...
#include <memory.hpp>
Public Member Functions | |
memory (const memory &other) | |
memory & | operator= (const memory &other) |
size_t | count () const |
number of elements of _layout.data_type stored in memory | |
size_t | size () const |
number of bytes used by memory | |
const layout & | get_layout () const |
Associated layout. | |
bool | is_allocated_by (const engine &engine) const |
Test if memory is allocated by engine . | |
bool | is_the_same_buffer (const memory &other) const |
template<typename T > | |
cldnn::pointer< T > | pointer () const |
cldnn_memory | get () const |
C API memory handle. | |
Static Public Member Functions | |
static memory | allocate (const engine &engine, const layout &layout) |
Allocate memory on engine using specified layout . | |
template<typename T > | |
static memory | attach (const cldnn::layout &layout, T *ptr, size_t size) |
Friends | |
bool | operator== (const memory &lhs, const memory &rhs) |
bool | operator!= (const memory &lhs, const memory &rhs) |
Represents buffer with particular layout.
Usually allocated by engine except cases when attached to user-allocated buffer.
Definition at line 42 of file memory.hpp.
|
inlinestatic |
Create memory object attached to the buffer allocated by user.
ptr | The pointer to user allocated buffer. |
size | Size (in bytes) of the buffer. Should be equal to layout.data_size() |
Definition at line 65 of file memory.hpp.