gpu_smart_pointer.hpp
Go to the documentation of this file.
132 OPM_ERROR_IF(!Opm::gpuistl::detail::isGPUPointer(value), "The pointer is not associated with GPU memory.");
185 OPM_ERROR_IF(!Opm::gpuistl::detail::isGPUPointer(ptr), "The pointer is not associated with GPU memory.");
PointerView(const std::unique_ptr< void, Deleter > &ptr) Definition: gpu_smart_pointer.hpp:292 PointerView(const std::shared_ptr< void > &ptr) Definition: gpu_smart_pointer.hpp:286 PointerView(void *ptr) Definition: gpu_smart_pointer.hpp:297 OPM_HOST_DEVICE void * operator->() const Definition: gpu_smart_pointer.hpp:307 PointerView(const PointerView &other)=default OPM_HOST_DEVICE void * get() const Definition: gpu_smart_pointer.hpp:302 A view towards a smart pointer to GPU-allocated memory. Definition: gpu_smart_pointer.hpp:231 OPM_HOST_DEVICE const T & operator*() const Definition: gpu_smart_pointer.hpp:256 OPM_HOST_DEVICE T & operator*() Definition: gpu_smart_pointer.hpp:261 OPM_HOST_DEVICE T * operator->() const Definition: gpu_smart_pointer.hpp:266 PointerView(const std::unique_ptr< T, Deleter > &ptr) Definition: gpu_smart_pointer.hpp:241 PointerView(const std::shared_ptr< T > &ptr) Definition: gpu_smart_pointer.hpp:235 PointerView(const PointerView &other)=default A value stored with a pointer interface. Can be used to wrap objects in GPU kernels that were otherwi... Definition: gpu_smart_pointer.hpp:335 ValueAsPointer(const T &t) Definition: gpu_smart_pointer.hpp:339 OPM_HOST_DEVICE T * operator->() Definition: gpu_smart_pointer.hpp:341 OPM_HOST_DEVICE T & operator*() Definition: gpu_smart_pointer.hpp:357 OPM_HOST_DEVICE const T & operator*() const Definition: gpu_smart_pointer.hpp:361 OPM_HOST_DEVICE const T * operator->() const Definition: gpu_smart_pointer.hpp:349 OPM_HOST_DEVICE const T * get() const Definition: gpu_smart_pointer.hpp:353 #define OPM_GPU_SAFE_CALL(expression) OPM_GPU_SAFE_CALL checks the return type of the GPU expression (function call) and throws an exceptio... Definition: gpu_safe_call.hpp:150 #define OPM_GPU_WARN_IF_ERROR(expression) OPM_GPU_WARN_IF_ERROR checks the return type of the GPU expression (function call) and issues a warni... Definition: gpu_safe_call.hpp:171 bool isGPUPointer(const T *ptr) Checks whether the given pointer is associated with GPU device memory. Definition: is_gpu_pointer.hpp:40 Definition: AmgxInterface.hpp:38 void copyToGPU(const T &value, T *ptr) Copies a value from the host to GPU-allocated memory. Definition: gpu_smart_pointer.hpp:182 std::shared_ptr< T > make_gpu_shared_ptr() Creates a shared pointer managing GPU-allocated memory of the specified element type. Definition: gpu_smart_pointer.hpp:48 PointerView< T > make_view(const std::shared_ptr< T > &ptr) Definition: gpu_smart_pointer.hpp:318 T copyFromGPU(const T *value) Copies a value from GPU-allocated memory to the host. Definition: gpu_smart_pointer.hpp:129 auto make_gpu_unique_ptr() Creates a unique pointer managing GPU-allocated memory of the specified element type. Definition: gpu_smart_pointer.hpp:89 |