Skip to content

Commit

Permalink
Fix #4 for older GCC which lacks __has_builtin.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVlx committed Jan 6, 2021
1 parent 9b1f60d commit 9a3c7ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/include/hip/detail/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
#else
std::memcpy(&r, &v, sizeof(T));
#endif
#elif defined(__GNUC__)
__builtin_memcpy(&r, &v, sizeof(T));
#else
std::memcpy(&r, &v, sizeof(T));
#endif
Expand Down

0 comments on commit 9a3c7ca

Please sign in to comment.