Skip to content

Commit

Permalink
Make __host__ and __device__ function checks work with HIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Stewart Martin-Haugh [email protected] committed Jan 22, 2024
1 parent 5dd6481 commit 97eaf0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/include/algebra/qualifiers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 97eaf0b

Please sign in to comment.