alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::concepts::impl::IBuffer Concept Reference

Interface concept for objects describing multidimensional owned memory. More...

#include <IBuffer.hpp>

Concept definition

template<typename T, typename T_Mut, typename T_Const>
concept IBuffer = requires(T t) {
t.addDestructorAction(alpaka::concepts::empty_callable);
t.destructorWaitFor(alpaka::concepts::empty_callable);
}
Interface concept for objects describing multidimensional owned memory.
Definition IBuffer.hpp:46
Interface concept for objects describing api-related multidimensional memory access.
Definition IView.hpp:28
void empty_callable()
Dummy function for concepts.
Definition IBuffer.hpp:20

Detailed Description

Interface concept for objects describing multidimensional owned memory.

An alpaka::buffer-like object contains information about the device(s) to which it is connected. The alpaka::buffer-like object has memory ownership and therefore manages memory lifetime according to the RAII principle. The represented memory can have any dimensionality.

Any object that fulfills the IBuffer concept is also an IView and IMdSpan.

member functions

  • t.addDestructorAction: Adds a destructor action to the shared buffer.
    The action will be executed when the buffer is destroyed.
    This can be used to add additional cleanup actions e.g. waiting on a specific queue.
    Actions are executed in FIFO order.
  • t.destructorWaitFor: Add an action to be executed when the shared_ptr is destroyed.

Definition at line 46 of file IBuffer.hpp.