mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Updates to fix HIP-clang specific compile errors.
Compiling the eigen unittests with hip-clang (HIP with clang as the underlying compiler instead of hcc or nvcc), results in compile errors. The changes in this commit fix those compile errors. The main change is to convert a few instances of "__device__" to "EIGEN_DEVICE_FUNC"
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
// clang is incompatible with the CUDA syntax wrt making a kernel a class friend,
|
||||
// so we'll use a macro to make clang happy.
|
||||
#ifndef KERNEL_FRIEND
|
||||
#if defined(__clang__) && defined(__CUDA__)
|
||||
#if defined(__clang__) && (defined(__CUDA__) || defined(__HIP__))
|
||||
#define KERNEL_FRIEND friend __global__
|
||||
#else
|
||||
#define KERNEL_FRIEND friend
|
||||
|
||||
Reference in New Issue
Block a user