VTK-m StorageBasic is now able to give/take ownership of user allocated memory.
This fixes the three following issues with StorageBasic. 1. Memory that was allocated by VTK-m and Stolen by the user needed the proper free function called which is generally StorageBasicAllocator::deallocate. But that was hard for the user to hold onto. So now we provide a function pointer to the correct free function. 2. Memory that was allocated outside of VTK-m was impossible to transfer to VTK-m as we didn't know how to free it. This is now resolved by allowing the user to specify a free function to be called on release. 3. When the CUDA backend allocates memory for an ArrayHandle that has no control representation, and the location we are running on supports concurrent managed access we want to specify that cuda managed memory as also the host memory. This requires that StorageBasic be able to call an arbitrary new delete function which is chosen at runtime.
Showing with 145 additions and 50 deletions