Fix __host__ __device_ redefined errors
MODIFY
thrust/detail/config/compiler.h
thrust/detail/config/compiler.h
#endif // __CUDACC__
+#ifdef __HCC__
+#include <hip/hip_runtime.h>
+#endif
+
// enumerate host compilers we know about
#define THRUST_HOST_COMPILER_UNKNOWN 0
#define THRUST_HOST_COMPILER_MSVC 1
// CUDA-capable clang should behave similar to NVCC.
#if defined(__CUDA__)
#define THRUST_DEVICE_COMPILER THRUST_DEVICE_COMPILER_NVCC
+#elif defined(__HCC__)
+// STREAMHPC
+// We don't set THRUST_DEVICE_COMPILER to THRUST_DEVICE_COMPILER_HCC to limit
+// number of headers that need to be ported to HCC before testing simple features like malloc.
+#define THRUST_DEVICE_COMPILER THRUST_DEVICE_COMPILER_NVCC //THRUST_DEVICE_COMPILER_HCC
#else
#define THRUST_DEVICE_COMPILER THRUST_DEVICE_COMPILER_CLANG
#endif
-#elif defined(__HCC__)
-#define THRUST_DEVICE_COMPILER THRUST_DEVICE_COMPILER_HCC
#else
#define THRUST_DEVICE_COMPILER THRUST_DEVICE_COMPILER_UNKNOWN
#endif

MODIFY
thrust/system/hip/detail/execution_policy.h
thrust/system/hip/detail/execution_policy.h
#pragma once
#include <hip/hip_runtime.h>
+
#include <thrust/detail/execution_policy.h>
#include <thrust/iterator/detail/any_system_tag.h>
#include <thrust/system/hip/config.h>

MODIFY
thrust/system/hip/memory.h
thrust/system/hip/memory.h
#pragma once
+#include <hip/hip_runtime.h>
+
#include <thrust/detail/config.h>
#include <thrust/system/hip/execution_policy.h>
#include <thrust/memory.h>

Fix __host__ __device_ redefined errors