![]() |
OpenVDB 14.0.0
|
Classes | |
| class | DeviceGuard |
| RAII class that caches/restores the current device at construction/destruction. More... | |
| struct | IsStreamArgument |
True when BufferT is a stream rather than a buffer: cudaStream_t, or another non-buffer type that converts to it. nullptr is not a stream here. 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 > |
Typedefs | |
| template<typename BufferT, typename T> | |
| using | PrototypeFormResult = typename std::enable_if<!IsStreamArgument<BufferT>::value, T>::type |
Return type of a tool's prototype-buffer form: T, except when BufferT deduced as a stream (cudaStream_t, or any other type that converts to it and is not a buffer, such as a stream wrapper), i.e. the call passed a stream where the prototype goes, which is the resource form's signature. A literal 0 or nullptr keeps the prototype form, whose static_assert asks for cudaStream_t(0). Removing the prototype form there leaves the resource form as the only candidate rather than relying on partial ordering, which compilers resolve differently for these overloads. | |
Functions | |
| void * | queryAllocationGranularityEntryPoint () |
| template<class R> | |
| ResourceRef< R > | borrowInternal (R &resource) |
Returns a ResourceRef to resource: the one spelling NanoVDB's own components use to borrow a caller's resource. | |
| template<typename BufferT> | |
| BufferT | createDeviceStorage (uint64_t bytes, const BufferT *proto, cudaStream_t stream) |
Allocates bytes of device-resident storage of the single-space buffer type BufferT on the current device through proto's resource – on stream when the resource is stream-ordered. | |
| template<typename BufferT> | |
| void * | deviceStorageData (BufferT &buffer) |
| The device address of a storage buffer made by createDeviceStorage: its one allocation is the device allocation. | |
| 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 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. | |
| using PrototypeFormResult = typename std::enable_if<!IsStreamArgument<BufferT>::value, T>::type |
Return type of a tool's prototype-buffer form: T, except when BufferT deduced as a stream (cudaStream_t, or any other type that converts to it and is not a buffer, such as a stream wrapper), i.e. the call passed a stream where the prototype goes, which is the resource form's signature. A literal 0 or nullptr keeps the prototype form, whose static_assert asks for cudaStream_t(0). Removing the prototype form there leaves the resource form as the only candidate rather than relying on partial ordering, which compilers resolve differently for these overloads.
| ResourceRef< R > borrowInternal | ( | R & | resource | ) |
Returns a ResourceRef to resource: the one spelling NanoVDB's own components use to borrow a caller's resource.
|
inline |
Allocates bytes of device-resident storage of the single-space buffer type BufferT on the current device through proto's resource – on stream when the resource is stream-ordered.
| bytes | size of the allocation |
| proto | prototype buffer or null: the source of the resource, which is default-constructed when proto is null |
| stream | stream the allocation is ordered on where supported |
|
inline |
The device address of a storage buffer made by createDeviceStorage: its one allocation is the device allocation.
|
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.
|
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 stream-ordered resources (the buffer retains the stream).
|
inline |