From 42389b018231bc14a8675c86857bdf5c7be05b0d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 7 Aug 2024 09:54:59 +0200 Subject: [PATCH] fixed: don't add device/host annotations to defaulted functions these will automagically be generated in both compiler passes so the specifiers are meaningless and causes nvcc to emit a warning --- opm/simulators/linalg/cuistl/CuView.hpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/opm/simulators/linalg/cuistl/CuView.hpp b/opm/simulators/linalg/cuistl/CuView.hpp index dcd0fe60c..1b2a1128e 100644 --- a/opm/simulators/linalg/cuistl/CuView.hpp +++ b/opm/simulators/linalg/cuistl/CuView.hpp @@ -18,14 +18,17 @@ */ #ifndef OPM_CUVIEW_HEADER_HPP #define OPM_CUVIEW_HEADER_HPP + #include -#include -#include -#include + #include + #include + +#include #include -#include + +#include // TODO: remove this line and instead include gpuDecorators.hpp from OPM common when it gets added #if defined(__CUDA_ARCH__) || (defined(__HIP_DEVICE_COMPILE__) && __HIP_DEVICE_COMPILE__ > 0) @@ -34,8 +37,6 @@ #define OPM_IS_INSIDE_DEVICE_FUNCTION_TEMPORARY 0 #endif - - namespace Opm::cuistl { @@ -61,7 +62,7 @@ public: /** * @brief Default constructor that will initialize cublas and allocate 0 bytes of memory */ - __host__ __device__ explicit CuView() = default; + explicit CuView() = default; //TODO: we probably dont need anything like this or is it useful to have views also be able to handle things on CPU? /// @brief constructor based on std::vectors, this will make a view on the CPU @@ -110,7 +111,7 @@ public: /** * @brief ~CuView calls cudaFree */ - __host__ __device__ ~CuView() = default; + ~CuView() = default; /** * @return the raw pointer to the GPU data @@ -410,4 +411,5 @@ private: }; } // namespace Opm::cuistl + #endif