OpenVDB 13.1.0
Loading...
Searching...
No Matches
nanovdb::cuda::detail Namespace Reference

Classes

class  DeviceGuard
 RAII class that caches/restores the current device at construction/destruction. More...
struct  HandleFactory
 The one gateway for constructing a GridHandle from a buffer plus metadata that is already known to be valid – adopted from another handle, whose own construction from raw bytes did the validation. More...
struct  StreamHolder
 Conditional stream storage for Buffer. The async specialization retains the stream of the most recent allocation; the synchronous specialization is an empty base, so a Buffer over a synchronous resource carries no stream state and exposes no stream API. More...
struct  StreamHolder< true >

Functions

void * queryAllocationGranularityEntryPoint ()
template<typename BufferT>
BufferT createDeviceStorage (uint64_t bytes, const BufferT *proto, int device, cudaStream_t stream)
 Allocates bytes of device-resident storage of buffer type BufferT: single-space buffers allocate through pool's resource – on stream when the resource is stream-ordered – and every other buffer type goes through its static create(bytes, pool, device, stream) interface.
template<typename BufferT>
void * deviceStorageData (BufferT &buffer)
 The device address of a storage buffer made by createDeviceStorage: data() for a single-space buffer, whose one allocation is the device allocation, and deviceData() for the dual-space family.
template<typename BufferT>
void orderBeforeHandleConstruction (cudaStream_t stream)
 Orders the host after stream where a handle is about to be constructed from bytes still being written on it: a single-space buffer over a synchronous resource retains no stream, so the constructor's metadata parse (which runs on the default stream) is not otherwise ordered after the producer. A no-op for dual-space buffers (their constructor path predates this bridge) and for stream-ordered resources (the buffer retains the stream).
template<typename DstBufferT>
DstBufferT makeTransferStorage (uint64_t bytes, cudaStream_t stream, const DstBufferT *proto)
 Allocates bytes of destination storage for a cross-space transfer: single-space buffers allocate through proto's resource (or a default-constructed resource without one), on stream when the resource is stream-ordered; buffers providing create() go through it.

Function Documentation

◆ createDeviceStorage()

template<typename BufferT>
BufferT createDeviceStorage ( uint64_t bytes,
const BufferT * proto,
int device,
cudaStream_t stream )
inline

Allocates bytes of device-resident storage of buffer type BufferT: single-space buffers allocate through pool's resource – on stream when the resource is stream-ordered – and every other buffer type goes through its static create(bytes, pool, device, stream) interface.

Parameters
bytessize of the allocation
protoprototype buffer or null: passed through as the pool for create()-style buffers; the source of the resource for single-space buffers, whose resource is default-constructed when proto is null
devicedevice the storage lives on; single-space buffers allocate on the current device, which every call site has already made current
streamstream the allocation is ordered on where supported

◆ deviceStorageData()

template<typename BufferT>
void * deviceStorageData ( BufferT & buffer)
inline

The device address of a storage buffer made by createDeviceStorage: data() for a single-space buffer, whose one allocation is the device allocation, and deviceData() for the dual-space family.

◆ makeTransferStorage()

template<typename DstBufferT>
DstBufferT makeTransferStorage ( uint64_t bytes,
cudaStream_t stream,
const DstBufferT * proto )
inline

Allocates bytes of destination storage for a cross-space transfer: single-space buffers allocate through proto's resource (or a default-constructed resource without one), on stream when the resource is stream-ordered; buffers providing create() go through it.

◆ orderBeforeHandleConstruction()

template<typename BufferT>
void orderBeforeHandleConstruction ( cudaStream_t stream)
inline

Orders the host after stream where a handle is about to be constructed from bytes still being written on it: a single-space buffer over a synchronous resource retains no stream, so the constructor's metadata parse (which runs on the default stream) is not otherwise ordered after the producer. A no-op for dual-space buffers (their constructor path predates this bridge) and for stream-ordered resources (the buffer retains the stream).

◆ queryAllocationGranularityEntryPoint()

void * queryAllocationGranularityEntryPoint ( )
inline