|
gpu_smart_pointer.hpp
Go to the documentation of this file.
222 OPM_ERROR_IF(!Opm::gpuistl::detail::isGPUPointer(value), "The pointer is not associated with GPU memory.");
275 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:382 PointerView(const std::shared_ptr< void > &ptr) Definition: gpu_smart_pointer.hpp:376 PointerView(void *ptr) Definition: gpu_smart_pointer.hpp:387 OPM_HOST_DEVICE void * operator->() const Definition: gpu_smart_pointer.hpp:397 PointerView(const PointerView &other)=default OPM_HOST_DEVICE void * get() const Definition: gpu_smart_pointer.hpp:392 A view towards a smart pointer to GPU-allocated memory. Definition: gpu_smart_pointer.hpp:321 OPM_HOST_DEVICE const T & operator*() const Definition: gpu_smart_pointer.hpp:346 OPM_HOST_DEVICE T & operator*() Definition: gpu_smart_pointer.hpp:351 OPM_HOST_DEVICE T * operator->() const Definition: gpu_smart_pointer.hpp:356 PointerView(const std::unique_ptr< T, Deleter > &ptr) Definition: gpu_smart_pointer.hpp:331 PointerView(const std::shared_ptr< T > &ptr) Definition: gpu_smart_pointer.hpp:325 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:425 OPM_HOST_DEVICE T * operator->() Definition: gpu_smart_pointer.hpp:433 OPM_HOST_DEVICE T & operator*() Definition: gpu_smart_pointer.hpp:449 OPM_HOST_DEVICE ValueAsPointer(const T &t) Definition: gpu_smart_pointer.hpp:431 OPM_HOST_DEVICE ValueAsPointer()=default OPM_HOST_DEVICE const T & operator*() const Definition: gpu_smart_pointer.hpp:453 OPM_HOST_DEVICE const T * operator->() const Definition: gpu_smart_pointer.hpp:441 OPM_HOST_DEVICE const T * get() const Definition: gpu_smart_pointer.hpp:445 #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:164 #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:185 bool isGPUPointer(const T *ptr) Checks whether the given pointer is associated with GPU device memory. Definition: is_gpu_pointer.hpp:40 A small, fixed‑dimension MiniVector class backed by std::array that can be used in both host and CUDA... 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:272 std::unique_ptr< T, GpuManagedDeleter< T > > make_gpu_managed_unique_ptr(Args &&... args) Creates a unique pointer managing GPU unified (managed) memory for a single object. Definition: gpu_smart_pointer.hpp:194 std::unique_ptr< T[], GpuArrayDeleter< T > > make_gpu_unique_ptr_array(std::size_t numElements) Creates a unique pointer managing a GPU-allocated array of numElements elements. Definition: gpu_smart_pointer.hpp:167 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:408 T copyFromGPU(const T *value) Copies a value from GPU-allocated memory to the host. Definition: gpu_smart_pointer.hpp:219 auto make_gpu_unique_ptr() Creates a unique pointer managing GPU-allocated memory of the specified element type. Definition: gpu_smart_pointer.hpp:89 Deleter that releases a GPU array allocation made with cudaMalloc. Definition: gpu_smart_pointer.hpp:126 void operator()(T *ptr) const noexcept Definition: gpu_smart_pointer.hpp:127 Deleter for objects living in unified (managed) GPU memory. Definition: gpu_smart_pointer.hpp:140 void operator()(T *ptr) const noexcept Definition: gpu_smart_pointer.hpp:141 |