TDLS
0.4.0
Tiny Device-callable Linear Solvers
Loading...
Searching...
No Matches
include
tdls
core
target.hpp
Go to the documentation of this file.
1
#ifndef TDLS_CORE_TARGET_HPP
2
#define TDLS_CORE_TARGET_HPP
3
4
5
86
87
88
89
#if defined(__clang__)
91
#define TDLS_DETAIL_COMPILER_CLANG
92
#endif
93
#if defined(__GNUC__) && !defined(__clang__)
95
#define TDLS_DETAIL_COMPILER_GCC
96
#endif
97
#if defined(_MSC_VER) && !defined(__clang__)
99
#define TDLS_DETAIL_COMPILER_MSVC
100
#endif
101
#if defined(__GNUC__) || defined(__clang__)
103
#define TDLS_DETAIL_COMPILER_GNU_ATTRIBUTES
104
#endif
105
#if defined(__NVCC__)
107
#define TDLS_DETAIL_COMPILER_NVCC
108
#endif
109
#if defined(__NVCOMPILER)
111
#define TDLS_DETAIL_COMPILER_NVCXX
112
#if !(defined(__NVCC__) && defined(__CUDA_ARCH__))
114
#define TDLS_DETAIL_CODEGEN_NVCXX
115
#endif
116
#endif
117
#if defined(__HIP__)
119
#define TDLS_DETAIL_COMPILER_HIP_CLANG
120
#endif
121
122
#if defined(__HIPCC__) || defined(__HIP__)
124
#define TDLS_DETAIL_LANG_HIP
125
#endif
126
#if defined(__CUDACC__) || defined(__CUDA__)
128
#define TDLS_DETAIL_FRONTEND_CUDA
129
#if !defined(TDLS_DETAIL_LANG_HIP)
131
#define TDLS_DETAIL_LANG_CUDA
132
#endif
133
#endif
134
#if defined(__SYCL_DEVICE_ONLY__)
136
#define TDLS_DETAIL_LANG_SYCL_DEVICE
137
#endif
138
139
#if defined(__NVCOMPILER)
140
#if defined(__NVCOMPILER_STDPAR_OPENACC_GPU)
142
#define TDLS_DETAIL_PASS_NVCXX_STDPAR_OPENACC
143
#elif defined(_NVHPC_CUDA)
145
#define TDLS_DETAIL_PASS_NVCXX_CUDA
146
#elif defined(__NVCOMPILER_OPENMP_GPU) || defined(__NVCOMPILER_OPENACC_GPU)
148
#define TDLS_DETAIL_PASS_NVCXX_OFFLOAD
149
#else
151
#define TDLS_DETAIL_PASS_HOST
152
#endif
153
#elif defined(__AMDGCN__) && defined(__clang__) && \
154
(defined(__HIP_DEVICE_COMPILE__) || !defined(__HIP__))
156
#define TDLS_DETAIL_PASS_AMDGCN
157
#elif defined(__CUDA_ARCH__) && (defined(__CUDACC__) || defined(__CUDA__))
159
#define TDLS_DETAIL_PASS_CUDA
160
#elif defined(__NVPTX__) && defined(__clang__) && !defined(__CUDA__)
162
#define TDLS_DETAIL_PASS_NVPTX
163
#elif !defined(__clang__) && (defined(__nvptx__) || defined(__AMDGCN__) || defined(__amdgcn__))
165
#define TDLS_DETAIL_PASS_GCC_OFFLOAD
166
#elif defined(__SYCL_DEVICE_ONLY__) || ((defined(__SPIR__) || defined(__SPIRV__)) && \
167
(defined(__HIP_DEVICE_COMPILE__) || !defined(__HIP__)))
169
#define TDLS_DETAIL_PASS_SPIRV
170
#elif defined(__ACPP_ENABLE_LLVM_SSCP_TARGET__) || defined(__HIPSYCL_ENABLE_LLVM_SSCP_TARGET__)
172
#define TDLS_DETAIL_PASS_ACPP_GENERIC
173
#else
175
#define TDLS_DETAIL_PASS_HOST
176
#endif
177
178
#if defined(TDLS_DETAIL_PASS_HOST)
180
#define TDLS_DETAIL_TARGET_GPU 0
181
#else
183
#define TDLS_DETAIL_TARGET_GPU 1
184
#endif
185
202
#ifndef TDLS_TARGET_GPU
203
#define TDLS_TARGET_GPU TDLS_DETAIL_TARGET_GPU
204
#if defined(TDLS_DETAIL_PASS_NVCXX_CUDA)
208
#define TDLS_DETAIL_SIDE_DISPATCH
209
#endif
210
#endif
211
212
213
214
#endif
// TDLS_CORE_TARGET_HPP
Generated by
1.12.0