|
vecmem 1.22.0
|
Object owning the data held by it. More...
#include <vecmem/containers/data/vector_buffer.hpp>
Public Types | |
| using | base_type = vector_view< TYPE > |
| The base type used by this class. | |
| using | size_type = typename base_type::size_type |
| Size type definition coming from the base class. | |
| using | size_pointer = typename base_type::size_pointer |
| Size pointer type definition coming from the base class. | |
| using | pointer = typename base_type::pointer |
| Pointer type definition coming from the base class. | |
Public Member Functions | |
| vector_buffer () | |
| Make sure that the template type does not have a custom destructor. | |
| vector_buffer (size_type capacity, memory_resource &resource, buffer_type type=buffer_type::fixed_size) | |
| Standard constructor. | |
| vector_buffer (vector_buffer &&) noexcept=default | |
| Move constructor. | |
| vector_buffer & | operator= (vector_buffer &&) noexcept=default |
| Move assignment. | |
| template<typename OTHERTYPE , std::enable_if_t< std::is_same< std::remove_cv_t< TYPE >, std::remove_cv_t< OTHERTYPE > >::value, bool > = true> | |
| VECMEM_HOST_AND_DEVICE bool | operator== (const vector_view< OTHERTYPE > &rhs) const |
| Equality check. | |
| template<typename OTHERTYPE , std::enable_if_t< std::is_same< std::remove_cv_t< TYPE >, std::remove_cv_t< OTHERTYPE > >::value, bool > = true> | |
| VECMEM_HOST_AND_DEVICE bool | operator!= (const vector_view< OTHERTYPE > &rhs) const |
Inequality check. Simply based on operator==. | |
| VECMEM_HOST_AND_DEVICE size_type | size () const |
| Get the size of the vector. | |
| VECMEM_HOST_AND_DEVICE size_type | capacity () const |
| Get the maximum capacity of the vector. | |
| VECMEM_HOST_AND_DEVICE size_pointer | size_ptr () const |
| Get a pointer to the size of the vector. | |
| VECMEM_HOST_AND_DEVICE pointer | ptr () const |
| Get a pointer to the vector elements. | |
Object owning the data held by it.
This can come in handy in a number of cases, especially when using device-only memory blocks.
| vecmem::data::vector_buffer< TYPE >::vector_buffer | ( | ) |
Make sure that the template type does not have a custom destructor.
A custom implementation for the default constructor is necessary because vecmem::data::vector_view does not set its members to anything explicitly in its default constructor.
Default constructor
(In order to be trivially default constructible.) So here we need to be explicit.
|
inherited |
Equality check.
Two objects are only equal if they point at the same memory.