Free previously dynamically allocated memory.
The CUDA in-kernel
free() function deallocates the memory pointed to by
which must have been returned by a previous call to
ptr is NULL,
the call to
free() is ignored.
Any CUDA thread may free memory allocated by another thread, but care should be taken
to ensure that the same pointer is not freed more than once. Repeated calls to
with the same
ptr has undefined behavior.