|
| | Buffer (std::initializer_list< T > init) |
| |
| | Buffer (T const *h_p, const std::size_t n) |
| |
| | Buffer (const std::size_t n) |
| |
| | Buffer ()=default |
| |
| T const * | data () const noexcept |
| |
| T * | data () noexcept |
| |
| T const * | hostData () const noexcept |
| |
| T * | hostData () noexcept |
| |
| T & | operator[] (const std::size_t i) noexcept |
| | Changes the value of an element of the host (CPU) vector. Does not update the device (GPU) vector, so copyToDeviceAsync() needs to be called before accessing the data on the GPU.
|
| |
| const T & | operator[] (const std::size_t i) const noexcept |
| |
| std::size_t | size () const noexcept |
| |
| bool | empty () const noexcept |
| |
| void | resize (const std::size_t n) |
| |
| void | clear () noexcept |
| |
| void | shrink_to_fit () |
| |
| void | reserve (const std::size_t n) |
| |
| void | push_back (const T &value) |
| | Adds an element to the back of the host (CPU) vector. Does not update the device (GPU) vector, so copyToDeviceAsync() needs to be called before accessing the data on the GPU.
|
| |
| T * | copyToDeviceAsync () |
| |
| T * | copyToHost () |
| |
template<typename T, std::enable_if_t< std::is_trivially_copyable_v< T >,
int > = 0>
class amrex::Gpu::Buffer< T, >
- Warning
- Gpu::Buffer assumes the GPU launch-region state stays fixed for its lifetime. Flipping the launch-region flag between construction and destruction may break Gpu::Buffer's member functions.