VTK-m defines VTKM_EXEC / VTKM_EXEC_CONT when compiling with HIP

This commit is contained in:
Robert Maynard 2020-09-25 11:06:34 -04:00
parent 8f6f52f7d6
commit 68b5edfcba
2 changed files with 13 additions and 1 deletions

@ -20,6 +20,11 @@
#define VTKM_CUDA_DEVICE_PASS #define VTKM_CUDA_DEVICE_PASS
#endif #endif
// Defined when compiling for the HIP language.
#ifdef __HIP__
#define VTKM_HIP
#endif
#if defined(_MSC_VER) #if defined(_MSC_VER)
//MSVC 2015+ can use a clang frontend, so we want to label it only as MSVC //MSVC 2015+ can use a clang frontend, so we want to label it only as MSVC
//and not MSVC and clang //and not MSVC and clang

@ -16,7 +16,14 @@
* Export macros for various parts of the VTKm library. * Export macros for various parts of the VTKm library.
*/ */
#ifdef VTKM_CUDA #ifdef VTKM_HIP
#include "hip/hip_runtime.h"
#define VTKM_EXEC __device__ __host__
#define VTKM_EXEC_CONT __device__ __host__
#define VTKM_SUPPRESS_EXEC_WARNINGS
#elif defined(VTKM_CUDA)
#define VTKM_EXEC __device__ __host__ #define VTKM_EXEC __device__ __host__
#define VTKM_EXEC_CONT __device__ __host__ #define VTKM_EXEC_CONT __device__ __host__