diff --git a/opm/simulators/linalg/gpuistl/GpuView.hpp b/opm/simulators/linalg/gpuistl/GpuView.hpp index 3133662eb..acde482ee 100644 --- a/opm/simulators/linalg/gpuistl/GpuView.hpp +++ b/opm/simulators/linalg/gpuistl/GpuView.hpp @@ -23,6 +23,7 @@ #include +#include #include #include @@ -30,13 +31,6 @@ #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) -#define OPM_IS_INSIDE_DEVICE_FUNCTION_TEMPORARY 1 -#else -#define OPM_IS_INSIDE_DEVICE_FUNCTION_TEMPORARY 0 -#endif - namespace Opm::gpuistl { @@ -371,7 +365,7 @@ private: /// @param size The value to compare with the size of this view __host__ __device__ void assertSameSize(size_t size) const { -#if OPM_IS_INSIDE_DEVICE_FUNCTION_TEMPORARY +#if OPM_IS_INSIDE_DEVICE_FUNCTION // TODO: find a better way to handle exceptions in kernels, this will possibly be printed many times assert(size == m_numberOfElements && "Views did not have the same size"); #else @@ -385,7 +379,7 @@ private: /// @brief Helper function to assert that the view has at least one element __host__ __device__ void assertHasElements() const { -#if OPM_IS_INSIDE_DEVICE_FUNCTION_TEMPORARY +#if OPM_IS_INSIDE_DEVICE_FUNCTION // TODO: find a better way to handle exceptions in kernels, this will possibly be printed many times assert(m_numberOfElements > 0 && "View has 0 elements"); #else @@ -398,7 +392,7 @@ private: /// @brief Helper function to determine if an index is within the range of valid indexes in the view __host__ __device__ void assertInRange(size_t idx) const { -#if OPM_IS_INSIDE_DEVICE_FUNCTION_TEMPORARY +#if OPM_IS_INSIDE_DEVICE_FUNCTION // TODO: find a better way to handle exceptions in kernels, this will possibly be printed many times assert(idx < m_numberOfElements && "The index provided was not in the range [0, buffersize-1]"); #else