|
| LVARRAY_HOST_DEVICE constexpr | StackBuffer (bool=true) |
| | Constructor for creating an empty/uninitialized buffer. More...
|
| |
| LVARRAY_HOST_DEVICE constexpr | StackBuffer (StackBuffer const &src, std::ptrdiff_t) |
| | Sized copy constructor, creates a deep copy. More...
|
| |
| template<typename _T = T, typename = std::enable_if_t< std::is_const< _T >::value >> |
| LVARRAY_HOST_DEVICE constexpr | StackBuffer (StackBuffer< std::remove_const_t< T >, LENGTH > const &src) |
| | Create a copy of src with const T. More...
|
| |
| LVARRAY_HOST_DEVICE void | reallocate (std::ptrdiff_t const size, MemorySpace const space, std::ptrdiff_t const newCapacity) |
| | Notionally this method reallocates the buffer, but since the StackBuffer is sized at compile time all this does is check that newCapacity doesn't exceed LENGTH. More...
|
| |
| LVARRAY_HOST_DEVICE constexpr void | free () |
| | Free the data in the buffer but does not destroy any values. More...
|
| |
| LVARRAY_HOST_DEVICE constexpr std::ptrdiff_t | capacity () const |
| |
| LVARRAY_HOST_DEVICE constexpr T * | data () const |
| |
| template<typename INDEX_TYPE > |
| LVARRAY_HOST_DEVICE 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...
|
| |
| MemorySpace | getPreviousSpace () const |
| |
| void | registerTouch (MemorySpace const space) const |
| | Touch the buffer in the given space. More...
|
| |
| template<typename = VoidBuffer> |
| LVARRAY_HOST_DEVICE void | setName (std::string const &name) |
| | Set the name associated with this buffer. More...
|
| |
template<typename T, int LENGTH>
class LvArray::StackBuffer< T, LENGTH >
This class implements the Buffer interface using a c-array.
- Template Parameters
-
| T | type of data that is contained in the buffer. T must be both trivially copyable and trivially destructable. |
| LENGTH | the length of the buffer. |
- Note
- Unlike the standard Buffer classes the StackBuffer does not permit making shallow copies.
-
The parent class provides the default execution space related methods.