◆ value_type
◆ buffer() [1/6]
◆ buffer() [2/6]
Create a buffer with the given size.
- Parameters
-
N | Size of the buffer. |
type | Type of the buffer. |
data | Pointer to the data to use for the buffer. |
Allocates a buffer of the given size and type. Behavior depends on the type of the buffer:
- buf_pinned: Allocates a buffer in host memory. The buffer is accessible from the device. If data is not null, the buffer is initialized with the data.
- buf_device: Allocates a buffer in device memory that is not accessible from the host. Memory is not initialized and 'data' pointer has no effect
- buf_managed: Allocates a shared (managed) buffer that is accessible from the host and the device. GPU driver synchronizes memory between host and device. If data is not null, the buffer is initialized with the data.
- buf_io: Allocates a buffer in device memory. Excepts that data points to a memory region with at least N elements. Buffer may be copied to / from the device using queue::copy from / to 'data'. Note: If the device is a CPU, the underlying pointer simply points to 'data' and no additional allocation takes place. queue::copy calls become no-ops in this case.
- buf_stack: Allocates a buffer in the stack on the device. The buffer is not accessible from the host. Memory is not initialized and 'data' pointer has no effect. The stack memory must be allocated beforehand using xpu::stack_alloc. Note that, no additional allocation takes place. The buffer simply points to the stack memory. The buffer is not freed automatically when it goes out of scope. Instead use xpu::stack_pop to reset the stack head. Note: This also means stack buffers may overlap.
◆ ~buffer()
◆ buffer() [3/6]
◆ buffer() [4/6]
◆ buffer() [5/6]
template<typename T >
template<typename U >
◆ buffer() [6/6]
template<typename T >
template<typename U >
◆ get()
◆ operator*()
◆ operator->()
◆ operator=() [1/4]
◆ operator=() [2/4]
template<typename T >
template<typename U >
◆ operator=() [3/4]
◆ operator=() [4/4]
template<typename T >
template<typename U >
◆ operator[]()
◆ reset() [1/2]
◆ reset() [2/2]
The documentation for this class was generated from the following file: