Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make __host__ and __device__ function checks work with HIP #112

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
StewMH marked this conversation as resolved.
Show resolved Hide resolved
#else
#define ALGEBRA_ALIGN(x) alignas(x)
Expand Down
Loading