RAII construct for device memory allocation. More...
#include <rmm/cuda_stream_view.hpp>
#include <rmm/detail/error.hpp>
#include <rmm/mr/device/device_memory_resource.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <cuda_runtime_api.h>
#include <cassert>
#include <cstddef>
#include <stdexcept>
#include <utility>
Go to the source code of this file.
Classes | |
class | rmm::device_buffer |
RAII construct for device memory allocation.
This class allocates untyped and uninitialized device memory using a device_memory_resource
. If not explicitly specified, the memory resource returned from get_current_device_resource()
is used.
std::vector
or thrust::device_vector
, the device memory allocated by a device_buffer
is uninitialized. Therefore, it is undefined behavior to read the contents of data()
before first initializing it.Examples: