Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler,plaform: Use unique numbers as internal macro definitions #139

Merged
merged 1 commit into from
Apr 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/stdgpu/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,38 @@ namespace stdgpu
* \hideinitializer
* \brief Host compiler: Unknown
*/
#define STDGPU_HOST_COMPILER_UNKNOWN -1
#define STDGPU_HOST_COMPILER_UNKNOWN 10
/**
* \hideinitializer
* \brief Host compiler: GCC
*/
#define STDGPU_HOST_COMPILER_GCC 0
#define STDGPU_HOST_COMPILER_GCC 11
/**
* \hideinitializer
* \brief Host compiler: Clang
*/
#define STDGPU_HOST_COMPILER_CLANG 1
#define STDGPU_HOST_COMPILER_CLANG 12
/**
* \hideinitializer
* \brief Host compiler: Microsoft Visual C++
*/
#define STDGPU_HOST_COMPILER_MSVC 2
#define STDGPU_HOST_COMPILER_MSVC 13

/**
* \hideinitializer
* \brief Device compiler: Unknown
*/
#define STDGPU_DEVICE_COMPILER_UNKNOWN -1
#define STDGPU_DEVICE_COMPILER_UNKNOWN 20
/**
* \hideinitializer
* \brief Device compiler: NVCC
*/
#define STDGPU_DEVICE_COMPILER_NVCC 0
#define STDGPU_DEVICE_COMPILER_NVCC 21
/**
* \hideinitializer
* \brief Device compiler: HCC
*/
#define STDGPU_DEVICE_COMPILER_HCC 1
#define STDGPU_DEVICE_COMPILER_HCC 22

/**
* \def STDGPU_HOST_COMPILER
Expand Down
10 changes: 5 additions & 5 deletions src/stdgpu/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ namespace stdgpu
* \hideinitializer
* \brief Backend: CUDA
*/
#define STDGPU_BACKEND_CUDA 0
#define STDGPU_BACKEND_CUDA 100
/**
* \hideinitializer
* \brief Backend: OpenMP
*/
#define STDGPU_BACKEND_OPENMP 1
#define STDGPU_BACKEND_OPENMP 101
/**
* \hideinitializer
* \brief Backend: ROCm
*/
#define STDGPU_BACKEND_ROCM 2
#define STDGPU_BACKEND_ROCM 102


// STDGPU_BACKEND is defined in stdgpu/config.h
Expand Down Expand Up @@ -109,12 +109,12 @@ namespace detail
* \hideinitializer
* \brief Code path: Host
*/
#define STDGPU_CODE_HOST 0
#define STDGPU_CODE_HOST 1000
/**
* \hideinitializer
* \brief Code path: Device
*/
#define STDGPU_CODE_DEVICE 1
#define STDGPU_CODE_DEVICE 1001


namespace detail
Expand Down