This class is for read-only segments.
More...
#include <ie_locked_memory.hpp>
|
|
LockedMemory (IAllocator *ptr, void *handle, size_t offset) |
|
A constructor. More...
|
|
|
LockedMemory (LockedMemory< const T > &&)=default |
|
A default copy constructor that accepts rvalue.
|
|
|
LockedMemory (LockedMemory< const T > &&that, size_t offset) |
|
A default copy constructor that accepts rvalue. Also sets the offset value for the new memory object. More...
|
|
|
LockedMemory (const LockedMemory< const T > &)=delete |
|
A disabled copy constructor for lvalue.
|
|
|
operator const T * () const |
|
Gets the const pointer to the stored object. Dereferences from the base class. More...
|
|
bool |
operator== (const T *pointer) const |
|
Compares stored object with the given one. More...
|
|
template<class S , typename = std::enable_if<std::is_pointer<S>::value && std::is_const<S>::value>> |
S |
as () const |
|
Casts stored object to any given type. Uses reinterpret_cast. More...
|
|
template<class T>
class InferenceEngine::LockedMemory< const T >
This class is for read-only segments.
§ LockedMemory() [1/2]
A constructor.
- Parameters
-
ptr |
Pointer to IAllocator object |
handle |
Handle provided by allocator |
offsetInBytes |
Offset in originally locked region |
§ LockedMemory() [2/2]
A default copy constructor that accepts rvalue. Also sets the offset value for the new memory object.
- Parameters
-
that |
Rvalue reference for the other LockedMemoryBase instance |
offset |
Offset value |
§ as()
template<class T >
template<class S , typename = std::enable_if<std::is_pointer<S>::value && std::is_const<S>::value>>
Casts stored object to any given type. Uses reinterpret_cast.
- Template Parameters
-
- Returns
- Casted to the given type object
§ operator const T *()
Gets the const pointer to the stored object. Dereferences from the base class.
- Returns
- The pointer to the object.
§ operator==()
Compares stored object with the given one.
- Returns
- true if objects are equal, false otherwise
§ operator==
template<class T >
bool operator== |
( |
const T * |
pointer, |
|
|
const LockedMemory< const T > & |
lm |
|
) |
|
|
|
friend |
Compares the object with the one stored in the memory.
- Returns
- true if objects are equal, false otherwise
The documentation for this class was generated from the following file: