Skip to content

Commit

Permalink
Merge pull request #112 from StewMH/hip_updates
Browse files Browse the repository at this point in the history
Make __host__ and __device__ function checks work with HIP
  • Loading branch information
krasznaa authored Jan 22, 2024
2 parents 5dd6481 + 97eaf0b commit 8186de4
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 8186de4

Please sign in to comment.