Kokkos::kokkos_free - JBludau/kokkos GitHub Wiki
Defined in header <Kokkos_Core.hpp>
template <class MemorySpace = typename Kokkos::DefaultExecutionSpace::memory_space>
void kokkos_free(void* ptr);Deallocates the space previously allocated by Kokkos::kokkos_malloc() or Kokkos::kokkos_realloc() on the specified memory space MemorySpace.
If ptr is a null pointer, the function does nothing.
ptr: The pointer to the memory to deallocate on the specified memory space.
-
MemorySpace: Controls the storage location. If omitted the memory space of the default execution space is used (i.e.Kokkos::DefaultExecutionSpace::memory_space).
(none)
Throws std::runtime_error on failure to deallocate.