Frees the memory space pointed to by
devPtr, which must have been returned by a previous call to cudaMalloc() or cudaMallocPitch(). Otherwise, or if cudaFree(
devPtr) has already been called before, an error is returned. If
devPtr is 0, no operation is performed. cudaFree() returns cudaErrorInvalidDevicePointer in case of failure.
|devPtr ||- Device pointer to memory to free|
- cudaSuccess, cudaErrorInvalidDevicePointer, cudaErrorInitializationError
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaMalloc, cudaMallocPitch, cudaMallocArray, cudaFreeArray, cudaMallocHost (C API), cudaFreeHost, cudaMalloc3D, cudaMalloc3DArray, cudaHostAlloc