Function flamegpu::detail::cuda::cudaFree

Function Documentation

inline cudaError_t flamegpu::detail::cuda::cudaFree(void *devPtr)

Wrapped cudaFree which checks that the pointer is a valid device pointer in the current CUDA context prior to deallocation. This also prevents double free errors from being raised, as the pointer attributes in that case are the same as a reset device, would need to check the primary context too?

Parameters:

devPtr – device pointer to memory to free

Returns:

forward the cuda error status from the inner cudaFree call