rocPRIM
|
This class provides an convenient way to do double buffering. More...
#include <double_buffer.hpp>
Public Member Functions | |
ROCPRIM_HOST_DEVICE | double_buffer () |
Constructs an empty double buffer object, initializing the buffer pointers to nullptr. More... | |
ROCPRIM_HOST_DEVICE | double_buffer (T *current, T *alternate) |
Contructs a double buffer object using the supplied buffer pointers. More... | |
ROCPRIM_HOST_DEVICE T * | current () const |
Returns a pointer to the current buffer. | |
ROCPRIM_HOST_DEVICE T * | alternate () const |
Returns a pointer to the alternate buffer. | |
ROCPRIM_HOST_DEVICE void | swap () |
Swaps the current and alternate buffers. | |
This class provides an convenient way to do double buffering.
It tracks two versions of the buffer ("current" and "alternate"), which can be accessed with functions of the same name. You can also swap the buffers.
|
inline |
Constructs an empty double buffer object, initializing the buffer pointers to nullptr.
|
inline |
Contructs a double buffer object using the supplied buffer pointers.
current | - Pointer to the buffer to designate as "current" (in use). |
alternate | - Pointer to the buffer to designate as "alternate" (not in use) |