clDNN
|
Helper class to get an access memory data. More...
#include <memory.hpp>
Public Types | |
typedef T * | iterator |
typedef const T * | const_iterator |
Public Member Functions | |
pointer (const memory &mem) | |
Constructs pointer from memory and locks (pin) ref@ memory object. | |
~pointer () | |
Unlocks memory. | |
pointer (const pointer &other) | |
Copy construction. | |
pointer & | operator= (const pointer &other) |
Copy assignment. | |
size_t | size () const |
Returns the number of elements (of type T) stored in memory. | |
iterator | begin () & |
iterator | end () & |
const_iterator | begin () const & |
const_iterator | end () const & |
T & | operator[] (size_t idx) const & |
Provides indexed access to pointed memory. | |
T * | data () & |
Returns the raw pointer to pointed memory. | |
const T * | data () const & |
Returns the constant raw pointer to pointed memory. | |
void | data () && |
Prevents to use pointer as temporary object. | |
void | begin () && |
Prevents to use pointer as temporary object. | |
void | end () && |
Prevents to use pointer as temporary object. | |
void | operator[] (size_t idx) && |
Prevents to use pointer as temporary object. | |
Friends | |
bool | operator== (const pointer &lhs, const pointer &rhs) |
bool | operator!= (const pointer &lhs, const pointer &rhs) |
Helper class to get an access memory data.
This class provides an access to memory data following RAII idiom and exposes basic C++ collection members. memory object is locked on construction of pointer and "unlocked" on descruction. Objects of this class could be used in many STL utility functions like copy(), transform(), etc. As well as in range-for loops.
Definition at line 36 of file memory.hpp.