20#include <opm/common/ErrorMacros.hpp>
21#include <opm/simulators/linalg/cuistl/detail/cusparse_safe_call.hpp>
29 struct CuSparseDeleteAndCreate {
33 struct CuSparseDeleteAndCreate<bsrilu02Info_t> {
34 using DeleterType =
typename CuSparseResource<bsrilu02Info_t>::DeleterType;
35 using CreatorType =
typename CuSparseResource<bsrilu02Info_t>::CreatorType;
37 static DeleterType getDeleter()
39 return cusparseDestroyBsrilu02Info;
42 static CreatorType getCreator()
44 return cusparseCreateBsrilu02Info;
49 struct CuSparseDeleteAndCreate<bsrsv2Info_t> {
50 using DeleterType =
typename CuSparseResource<bsrsv2Info_t>::DeleterType;
51 using CreatorType =
typename CuSparseResource<bsrsv2Info_t>::CreatorType;
53 static DeleterType getDeleter()
55 return cusparseDestroyBsrsv2Info;
58 static CreatorType getCreator()
60 return cusparseCreateBsrsv2Info;
65 struct CuSparseDeleteAndCreate<cusparseMatDescr_t> {
66 using DeleterType =
typename CuSparseResource<cusparseMatDescr_t>::DeleterType;
67 using CreatorType =
typename CuSparseResource<cusparseMatDescr_t>::CreatorType;
87 OPM_CUSPARSE_SAFE_CALL(
creator(&m_resource));
101 OPM_CUSPARSE_WARN_IF_ERROR(m_deleter(m_resource));
Definition AquiferInterface.hpp:35
The CuSparseResource class wraps a CuSparse resource in a proper RAII pattern.
Definition CuSparseResource.hpp:55
CuSparseResource()
CuSparseResource will automatically select the proper creator and deleter based on the type (and thro...
Definition CuSparseResource_impl.hpp:91
~CuSparseResource()
Calls the deleter functor.
Definition CuSparseResource_impl.hpp:97
Contains wrappers to make the CuBLAS library behave as a modern C++ library with function overlading.
Definition cublas_safe_call.hpp:32