From 97eaf0b5a2ed7ef7c96e9d3858477039637b9d94 Mon Sep 17 00:00:00 2001 From: "Stewart Martin-Haugh stewart.martin-haugh@stfc.ac.uk" Date: Mon, 22 Jan 2024 16:05:43 +0000 Subject: [PATCH] Make __host__ and __device__ function checks work with HIP --- common/include/algebra/qualifiers.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/include/algebra/qualifiers.hpp b/common/include/algebra/qualifiers.hpp index ab3a3547..13aa76ec 100644 --- a/common/include/algebra/qualifiers.hpp +++ b/common/include/algebra/qualifiers.hpp @@ -8,25 +8,25 @@ #pragma once -#if defined(__CUDACC__) +#if defined(__CUDACC__) || defined(__HIP__) #define ALGEBRA_DEVICE __device__ #else #define ALGEBRA_DEVICE #endif -#if defined(__CUDACC__) +#if defined(__CUDACC__) || defined(__HIP__) #define ALGEBRA_HOST __host__ #else #define ALGEBRA_HOST #endif -#if defined(__CUDACC__) +#if defined(__CUDACC__) || defined(__HIP__) #define ALGEBRA_HOST_DEVICE __host__ __device__ #else #define ALGEBRA_HOST_DEVICE #endif -#if defined(__CUDACC__) +#if defined(__CUDACC__) || defined(__HIP__) #define ALGEBRA_ALIGN(x) __align__(x) #else #define ALGEBRA_ALIGN(x) alignas(x)