cuda_free
Releases NVIDIA memory allocated by the IMSL C Numerical Library.
Synopsis
#include <imsl.h>
int imsl_cuda_free ()
Return Value
A return value of zero indicates that no error was encountered when releasing the memory. A return value of one indicates that an error was generated when releasing the memory.
Description
Allocation of NVIDIA memory by the IMSL C Numerical Library is done as infrequently as possible by reusing allocated memory.
When allocating memory either through the IMSL C Numerical Library or through your own application, an error message indicating not enough memory exists on the GPU may possibly be generated. Sufficient memory may be available but may be reserved by the IMSL C Numerical Library. This function is provided to force the reserved NVIDIA memory to be released.
Example
Refer to
imsl_cuda_get for the document example.
Warning Errors
IMSL_CUDA_FREE | An error was encountered freeing memory from the GPU. |
IMSL_CUDA_NOT_AVAIL | The CUDA Toolkit algorithms are not implemented using this version of the library. Use the CUDA link environment variables to leverage the CUDA Toolkit algorithms. |