From 9a3c7ca37fc429099e444468ea763bf31d8a316d Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 7 Jan 2021 01:35:45 +0200 Subject: [PATCH] Fix #4 for older GCC which lacks `__has_builtin`. --- src/include/hip/detail/helpers.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/hip/detail/helpers.hpp b/src/include/hip/detail/helpers.hpp index 29f0765..1a7f0aa 100644 --- a/src/include/hip/detail/helpers.hpp +++ b/src/include/hip/detail/helpers.hpp @@ -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