![]() |
OpenVDB 13.1.0
|
Classes | |
| class | Timer |
| class | unique_ptr |
| Simple (naive) implementation of a unique device pointer using stream ordered memory allocation and deallocation. More... | |
Functions | |
| bool | memoryPoolsSupported (int device) |
Returns true if device supports stream-ordered memory pools, i.e. cudaMallocAsync/cudaFreeAsync. Queried once per process for all devices and cached; out-of-range device ids return false. | |
| cudaError_t | mallocAsync (void **d_ptr, size_t size, cudaStream_t) |
| Wrapper forced to synchronous cudaMalloc; see the mode comment above. The trailing stream argument is accepted for signature compatibility and ignored. | |
| cudaError_t | freeAsync (void *d_ptr, cudaStream_t) |
| Wrapper forced to synchronous cudaFree; see the mode comment above. The trailing stream argument is accepted for signature compatibility and ignored. | |
| int | ptrToDevice (void *ptr) |
| Returns the device ID associated with the specified pointer. | |
| int | currentDevice () |
| Returns the ID of the current device. | |
| int | deviceCount () |
| Returns the number of devices with compute capability greater or equal to 1.0 that are available for execution. | |
| void | printDevInfo (int device, const char *preMsg=nullptr, std::FILE *file=stderr) |
| Print information about a specific device. | |
| size_t | blocksPerGrid (size_t numItems, size_t threadsPerBlock) |
| Computes the number of blocks per grid given the problem size and number of threads per block. | |
| cudaError_t | memAdvise (const void *devPtr, size_t count, cudaMemoryAdvise advice, int device) |
| Compatbility wrapper for cudaMemAdvise/cudaMemAdvise. | |
| cudaError_t | memPrefetchAsync (const void *devPtr, size_t count, int dstDevice, cudaStream_t stream) |
| Compatbility wrapper for cudaMemPrefetchAsync/cudaMemPrefetchAsync. | |
|
inline |
Computes the number of blocks per grid given the problem size and number of threads per block.
| numItems | Problem size |
| threadsPerBlock | Number of threads per block (second CUDA launch parameter) |
|
inline |
Returns the ID of the current device.
|
inline |
Returns the number of devices with compute capability greater or equal to 1.0 that are available for execution.
|
inline |
Wrapper forced to synchronous cudaFree; see the mode comment above. The trailing stream argument is accepted for signature compatibility and ignored.
| d_ptr | Device pointer that will be freed |
|
inline |
Wrapper forced to synchronous cudaMalloc; see the mode comment above. The trailing stream argument is accepted for signature compatibility and ignored.
| d_ptr | Device pointer to allocated device memory |
| size | Number of bytes to allocate |
|
inline |
Compatbility wrapper for cudaMemAdvise/cudaMemAdvise.
|
inline |
Returns true if device supports stream-ordered memory pools, i.e. cudaMallocAsync/cudaFreeAsync. Queried once per process for all devices and cached; out-of-range device ids return false.
|
inline |
Compatbility wrapper for cudaMemPrefetchAsync/cudaMemPrefetchAsync.
|
inline |
Print information about a specific device.
| device | device ID for which information will be printed |
| preMsg | optional message printed before the device information |
| file | Optional file stream to print to, e.g. stderr or stdout |
|
inline |
Returns the device ID associated with the specified pointer.
ptr points to host memory (only) the return ID is either cudaInvalidDeviceId = -2 or cudaCpuDeviceId = -1