|
constexpr | MallocBuffer (bool=true) |
| Constructor for creating an empty or uninitialized buffer. More...
|
|
| MallocBuffer (MallocBuffer const &)=default |
| Copy constructor, creates a shallow copy.
|
|
| MallocBuffer (MallocBuffer const &src, std::ptrdiff_t) |
| Sized copy constructor, creates a shallow copy. More...
|
|
constexpr | MallocBuffer (MallocBuffer &&src) |
| Move constructor, creates a shallow copy. More...
|
|
template<typename _T = T, typename = std::enable_if_t< std::is_const< _T >::value >> |
constexpr | MallocBuffer (MallocBuffer< std::remove_const_t< T > > const &src) |
| Create a copy of src with const T. More...
|
|
LVARRAY_INTEL_CONSTEXPR MallocBuffer & | operator= (MallocBuffer const &src) |
| Copy assignment operator, creates a shallow copy. More...
|
|
LVARRAY_INTEL_CONSTEXPR MallocBuffer & | operator= (MallocBuffer &&src) |
| Move assignment operator, creates a shallow copy. More...
|
|
void | reallocate (std::ptrdiff_t const size, std::ptrdiff_t const newCapacity) |
| Reallocate the buffer to the new capacity. More...
|
|
void | free () |
| Free the data in the buffer but does not destroy any values. More...
|
|
std::ptrdiff_t | capacity () const |
|
constexpr T * | data () const |
|
template<typename INDEX_TYPE > |
constexpr T & | operator[] (INDEX_TYPE const i) const |
|
void | moveNested (MemorySpace const space, std::ptrdiff_t const size, bool const touch) const |
| Move the buffer to the given execution space, optionally touching it. More...
|
|
void | move (MemorySpace const space, bool const touch) const |
| Move the buffer to the given execution space, optionally touching it. More...
|
|
void | registerTouch (MemorySpace const space) const |
| Touch the buffer in the given space. More...
|
|
template<typename = VoidBuffer> |
void | setName (std::string const &name) |
| Set the name associated with this buffer. More...
|
|
template<typename T>
class LvArray::MallocBuffer< T >
Implements the Buffer interface using malloc and free.
- Template Parameters
-
T | type of data that is contained in the buffer. |
Both the copy constructor and copy assignment constructor perform a shallow copy of the source. Similarly the destructor does not free the allocation.
- Note
- The parent class bufferManipulation::VoidBuffer provides the default execution space related methods.
Definition at line 35 of file MallocBuffer.hpp.