Kokkos Core Kernels Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Kokkos_Macros.hpp
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Kokkos v. 2.0
6 // Copyright (2014) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Christian R. Trott (crtrott@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef KOKKOS_MACROS_HPP
45 #define KOKKOS_MACROS_HPP
46 
47 //----------------------------------------------------------------------------
61 #ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H
62  #include <KokkosCore_config.h>
63 #endif
64 
65 #include <impl/Kokkos_OldMacros.hpp>
66 
67 //----------------------------------------------------------------------------
97 //----------------------------------------------------------------------------
98 
99 #if defined(KOKKOS_ENABLE_SERIAL) || defined(KOKKOS_ENABLE_THREADS) || \
100  defined(KOKKOS_ENABLE_OPENMP) || defined(KOKKOS_ENABLE_QTHREADS) || \
101  defined(KOKKOS_ENABLE_ROCM) || defined(KOKKOS_ENABLE_OPENMPTARGET)
102  #define KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND
103 #endif
104 
105 #if !defined(KOKKOS_ENABLE_THREADS) && !defined(KOKKOS_ENABLE_CUDA) && \
106  !defined(KOKKOS_ENABLE_OPENMP) && !defined(KOKKOS_ENABLE_QTHREADS) && \
107  !defined(KOKKOS_ENABLE_ROCM) && !defined(KOKKOS_ENABLE_OPENMPTARGET)
108  #define KOKKOS_INTERNAL_NOT_PARALLEL
109 #endif
110 
111 #define KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA
112 
113 #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ )
114  // Compiling with a CUDA compiler.
115  //
116  // Include <cuda.h> to pick up the CUDA_VERSION macro defined as:
117  // CUDA_VERSION = ( MAJOR_VERSION * 1000 ) + ( MINOR_VERSION * 10 )
118  //
119  // When generating device code the __CUDA_ARCH__ macro is defined as:
120  // __CUDA_ARCH__ = ( MAJOR_CAPABILITY * 100 ) + ( MINOR_CAPABILITY * 10 )
121 
122  #include <cuda_runtime.h>
123  #include <cuda.h>
124 
125  #if !defined( CUDA_VERSION )
126  #error "#include <cuda.h> did not define CUDA_VERSION."
127  #endif
128 
129  #if ( CUDA_VERSION < 7000 )
130  // CUDA supports C++11 in device code starting with version 7.0.
131  // This includes auto type and device code internal lambdas.
132  #error "Cuda version 7.0 or greater required."
133  #endif
134 
135  #if defined( __CUDA_ARCH__ ) && ( __CUDA_ARCH__ < 300 )
136  // Compiling with CUDA compiler for device code.
137  #error "Cuda device capability >= 3.0 is required."
138  #endif
139 
140  #ifdef KOKKOS_ENABLE_CUDA_LAMBDA
141  #if ( CUDA_VERSION < 7050 )
142  // CUDA supports C++11 lambdas generated in host code to be given
143  // to the device starting with version 7.5. But the release candidate (7.5.6)
144  // still identifies as 7.0.
145  #error "Cuda version 7.5 or greater required for host-to-device Lambda support."
146  #endif
147 
148  #if ( CUDA_VERSION < 8000 ) && defined( __NVCC__ )
149  #define KOKKOS_LAMBDA [=]__device__
150  #if defined( KOKKOS_INTERNAL_ENABLE_NON_CUDA_BACKEND )
151  #undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA
152  #endif
153  #else
154  #define KOKKOS_LAMBDA [=]__host__ __device__
155 
156  #if defined( KOKKOS_ENABLE_CXX17 ) || defined( KOKKOS_ENABLE_CXX20 )
157  #define KOKKOS_CLASS_LAMBDA [=,*this] __host__ __device__
158  #endif
159  #endif
160 
161  #if defined( __NVCC__ )
162  #define KOKKOS_IMPL_NEED_FUNCTOR_WRAPPER
163  #endif
164  #else // !defined(KOKKOS_ENABLE_CUDA_LAMBDA)
165  #undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA
166  #endif // !defined(KOKKOS_ENABLE_CUDA_LAMBDA)
167 
168  #if ( 9000 <= CUDA_VERSION ) && ( CUDA_VERSION < 10000 )
169  // CUDA 9 introduced an incorrect warning,
170  // see https://github.com/kokkos/kokkos/issues/1470
171  #define KOKKOS_CUDA_9_DEFAULTED_BUG_WORKAROUND
172  #endif
173 
174  #if ( 10000 > CUDA_VERSION )
175  #define KOKKOS_ENABLE_PRE_CUDA_10_DEPRECATION_API
176  #endif
177 #endif // #if defined( KOKKOS_ENABLE_CUDA ) && defined( __CUDACC__ )
178 
179 //----------------------------------------------------------------------------
180 // Language info: C++, CUDA, OPENMP
181 
182 #if defined( KOKKOS_ENABLE_CUDA )
183  // Compiling Cuda code to 'ptx'
184 
185  #define KOKKOS_FORCEINLINE_FUNCTION __device__ __host__ __forceinline__
186  #define KOKKOS_INLINE_FUNCTION __device__ __host__ inline
187  #define KOKKOS_FUNCTION __device__ __host__
188 #endif // #if defined( __CUDA_ARCH__ )
189 
190 #if defined( KOKKOS_ENABLE_ROCM ) && defined( __HCC__ )
191 
192  #define KOKKOS_FORCEINLINE_FUNCTION __attribute__((amp,cpu)) inline
193  #define KOKKOS_INLINE_FUNCTION __attribute__((amp,cpu)) inline
194  #define KOKKOS_FUNCTION __attribute__((amp,cpu))
195  #define KOKKOS_LAMBDA [=] __attribute__((amp,cpu))
196 #endif
197 
198 #if defined( _OPENMP )
199  // Compiling with OpenMP.
200  // The value of _OPENMP is an integer value YYYYMM
201  // where YYYY and MM are the year and month designation
202  // of the supported OpenMP API version.
203 #endif // #if defined( _OPENMP )
204 
205 //----------------------------------------------------------------------------
206 // Mapping compiler built-ins to KOKKOS_COMPILER_*** macros
207 
208 #if defined( __NVCC__ )
209  // NVIDIA compiler is being used.
210  // Code is parsed and separated into host and device code.
211  // Host code is compiled again with another compiler.
212  // Device code is compile to 'ptx'.
213  #define KOKKOS_COMPILER_NVCC __NVCC__
214 #endif // #if defined( __NVCC__ )
215 
216 #if !defined( KOKKOS_LAMBDA )
217  #define KOKKOS_LAMBDA [=]
218 #endif
219 
220 #if (defined( KOKKOS_ENABLE_CXX17 ) || defined( KOKKOS_ENABLE_CXX20) )&& !defined( KOKKOS_CLASS_LAMBDA )
221  #define KOKKOS_CLASS_LAMBDA [=,*this]
222 #endif
223 
224 //#if !defined( __CUDA_ARCH__ ) // Not compiling Cuda code to 'ptx'.
225 
226 // Intel compiler for host code.
227 
228 #if defined( __INTEL_COMPILER )
229  #define KOKKOS_COMPILER_INTEL __INTEL_COMPILER
230 #elif defined( __ICC )
231  // Old define
232  #define KOKKOS_COMPILER_INTEL __ICC
233 #elif defined( __ECC )
234  // Very old define
235  #define KOKKOS_COMPILER_INTEL __ECC
236 #endif
237 
238 // CRAY compiler for host code
239 #if defined( _CRAYC )
240  #define KOKKOS_COMPILER_CRAYC _CRAYC
241 #endif
242 
243 #if defined( __IBMCPP__ )
244  // IBM C++
245  #define KOKKOS_COMPILER_IBM __IBMCPP__
246 #elif defined( __IBMC__ )
247  #define KOKKOS_COMPILER_IBM __IBMC__
248 #endif
249 
250 #if defined( __APPLE_CC__ )
251  #define KOKKOS_COMPILER_APPLECC __APPLE_CC__
252 #endif
253 
254 #if defined( __clang__ ) && !defined( KOKKOS_COMPILER_INTEL )
255  #define KOKKOS_COMPILER_CLANG __clang_major__*100+__clang_minor__*10+__clang_patchlevel__
256 #endif
257 
258 #if !defined( __clang__ ) && !defined( KOKKOS_COMPILER_INTEL ) &&defined( __GNUC__ )
259  #define KOKKOS_COMPILER_GNU __GNUC__*100+__GNUC_MINOR__*10+__GNUC_PATCHLEVEL__
260 
261  #if ( 472 > KOKKOS_COMPILER_GNU )
262  #error "Compiling with GCC version earlier than 4.7.2 is not supported."
263  #endif
264 #endif
265 
266 #if defined( __PGIC__ )
267  #define KOKKOS_COMPILER_PGI __PGIC__*100+__PGIC_MINOR__*10+__PGIC_PATCHLEVEL__
268 
269  #if ( 1540 > KOKKOS_COMPILER_PGI )
270  #error "Compiling with PGI version earlier than 15.4 is not supported."
271  #endif
272 #endif
273 
274 //#endif // #if !defined( __CUDA_ARCH__ )
275 
276 //----------------------------------------------------------------------------
277 // Intel compiler macros
278 
279 #if defined( KOKKOS_COMPILER_INTEL )
280  #define KOKKOS_ENABLE_PRAGMA_UNROLL 1
281  #define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1
282  #define KOKKOS_ENABLE_PRAGMA_VECTOR 1
283  #if ( 1800 > KOKKOS_COMPILER_INTEL )
284  #define KOKKOS_ENABLE_PRAGMA_SIMD 1
285  #endif
286 
287  #if ( __INTEL_COMPILER > 1400 )
288  #define KOKKOS_ENABLE_PRAGMA_IVDEP 1
289  #endif
290 
291  #if ! defined( KOKKOS_MEMORY_ALIGNMENT )
292  #define KOKKOS_MEMORY_ALIGNMENT 64
293  #endif
294 
295  #define KOKKOS_RESTRICT __restrict__
296 
297  #ifndef KOKKOS_IMPL_ALIGN_PTR
298  #define KOKKOS_IMPL_ALIGN_PTR(size) __attribute__((align_value(size)))
299  #endif
300 
301  #if ( 1400 > KOKKOS_COMPILER_INTEL )
302  #if ( 1300 > KOKKOS_COMPILER_INTEL )
303  #error "Compiling with Intel version earlier than 13.0 is not supported. Official minimal version is 14.0."
304  #else
305  #warning "Compiling with Intel version 13.x probably works but is not officially supported. Official minimal version is 14.0."
306  #endif
307  #endif
308 
309  #if !defined( KOKKOS_ENABLE_ASM ) && !defined( _WIN32 )
310  #define KOKKOS_ENABLE_ASM 1
311  #endif
312 
313  #if !defined( KOKKOS_FORCEINLINE_FUNCTION )
314  #if !defined( _WIN32 )
315  #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
316  #else
317  #define KOKKOS_FORCEINLINE_FUNCTION inline
318  #endif
319  #endif
320 
321  #if defined( KOKKOS_ARCH_AVX512MIC )
322  #define KOKKOS_ENABLE_RFO_PREFETCH 1
323  #endif
324 
325  #if defined( __MIC__ )
326  // Compiling for Xeon Phi
327  #endif
328 #endif
329 
330 //----------------------------------------------------------------------------
331 // Cray compiler macros
332 
333 #if defined( KOKKOS_COMPILER_CRAYC )
334 #endif
335 
336 //----------------------------------------------------------------------------
337 // IBM Compiler macros
338 
339 #if defined( KOKKOS_COMPILER_IBM )
340  #define KOKKOS_ENABLE_PRAGMA_UNROLL 1
341  //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1
342  //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1
343  //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1
344  //#define KOKKOS_ENABLE_PRAGMA_SIMD 1
345 
346  #if ! defined( KOKKOS_ENABLE_ASM )
347  #define KOKKOS_ENABLE_ASM 1
348  #endif
349 #endif
350 
351 //----------------------------------------------------------------------------
352 // CLANG compiler macros
353 
354 #if defined( KOKKOS_COMPILER_CLANG )
355  //#define KOKKOS_ENABLE_PRAGMA_UNROLL 1
356  //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1
357  //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1
358  //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1
359  //#define KOKKOS_ENABLE_PRAGMA_SIMD 1
360 
361  #if !defined( KOKKOS_FORCEINLINE_FUNCTION )
362  #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
363  #endif
364 
365  #if !defined( KOKKOS_IMPL_ALIGN_PTR )
366  #define KOKKOS_IMPL_ALIGN_PTR(size) __attribute__((aligned(size)))
367  #endif
368 
369 #endif
370 
371 //----------------------------------------------------------------------------
372 // GNU Compiler macros
373 
374 #if defined( KOKKOS_COMPILER_GNU )
375  //#define KOKKOS_ENABLE_PRAGMA_UNROLL 1
376  //#define KOKKOS_ENABLE_PRAGMA_IVDEP 1
377  //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1
378  //#define KOKKOS_ENABLE_PRAGMA_VECTOR 1
379  //#define KOKKOS_ENABLE_PRAGMA_SIMD 1
380 
381  #if defined( KOKKOS_ARCH_AVX512MIC )
382  #define KOKKOS_ENABLE_RFO_PREFETCH 1
383  #endif
384 
385  #if !defined( KOKKOS_FORCEINLINE_FUNCTION )
386  #define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
387  #endif
388 
389  #if !defined( KOKKOS_ENABLE_ASM ) && !defined( __PGIC__ ) && \
390  ( defined( __amd64 ) || defined( __amd64__ ) || \
391  defined( __x86_64 ) || defined( __x86_64__ ) || \
392  defined(__PPC64__) )
393  #define KOKKOS_ENABLE_ASM 1
394  #endif
395 #endif
396 
397 //----------------------------------------------------------------------------
398 
399 #if defined( KOKKOS_COMPILER_PGI )
400  #define KOKKOS_ENABLE_PRAGMA_UNROLL 1
401  #define KOKKOS_ENABLE_PRAGMA_IVDEP 1
402  //#define KOKKOS_ENABLE_PRAGMA_LOOPCOUNT 1
403  #define KOKKOS_ENABLE_PRAGMA_VECTOR 1
404  //#define KOKKOS_ENABLE_PRAGMA_SIMD 1
405 #endif
406 
407 //----------------------------------------------------------------------------
408 
409 #if defined( KOKKOS_COMPILER_NVCC )
410  #if defined( __CUDA_ARCH__ )
411  #define KOKKOS_ENABLE_PRAGMA_UNROLL 1
412  #endif
413 #endif
414 
415 //----------------------------------------------------------------------------
416 // Define function marking macros if compiler specific macros are undefined:
417 
418 #if !defined( KOKKOS_FORCEINLINE_FUNCTION )
419  #define KOKKOS_FORCEINLINE_FUNCTION inline
420 #endif
421 
422 #if !defined( KOKKOS_INLINE_FUNCTION )
423  #define KOKKOS_INLINE_FUNCTION inline
424 #endif
425 
426 #if !defined( KOKKOS_FUNCTION )
427  #define KOKKOS_FUNCTION
428 #endif
429 
430 //----------------------------------------------------------------------------
431 // Define empty macro for restrict if necessary:
432 
433 #if !defined( KOKKOS_RESTRICT )
434  #define KOKKOS_RESTRICT
435 #endif
436 
437 //----------------------------------------------------------------------------
438 // Define Macro for alignment:
439 
440 #if ! defined( KOKKOS_MEMORY_ALIGNMENT )
441  #define KOKKOS_MEMORY_ALIGNMENT 64
442 #endif
443 
444 #if ! defined( KOKKOS_MEMORY_ALIGNMENT_THRESHOLD )
445  #define KOKKOS_MEMORY_ALIGNMENT_THRESHOLD 1
446 #endif
447 
448 #if !defined( KOKKOS_IMPL_ALIGN_PTR )
449  #define KOKKOS_IMPL_ALIGN_PTR(size) /* */
450 #endif
451 
452 //----------------------------------------------------------------------------
453 // Determine the default execution space for parallel dispatch.
454 // There is zero or one default execution space specified.
455 
456 #if 1 < ( ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA ) ? 1 : 0 ) + \
457  ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM ) ? 1 : 0 ) + \
458  ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET ) ? 1 : 0 ) + \
459  ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP ) ? 1 : 0 ) + \
460  ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS ) ? 1 : 0 ) + \
461  ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS ) ? 1 : 0 ) + \
462  ( defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL ) ? 1 : 0 ) )
463  #error "More than one KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_* specified."
464 #endif
465 
466 // If default is not specified then chose from enabled execution spaces.
467 // Priority: CUDA, OPENMP, THREADS, QTHREADS, SERIAL
468 #if defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA )
469 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM )
470 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET )
471 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP )
472 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS )
473 //#elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS )
474 #elif defined( KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL )
475 #elif defined( KOKKOS_ENABLE_CUDA )
476  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_CUDA
477 #elif defined( KOKKOS_ENABLE_ROCM )
478  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_ROCM
479 #elif defined( KOKKOS_ENABLE_OPENMPTARGET )
480  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMPTARGET
481 #elif defined( KOKKOS_ENABLE_OPENMP )
482  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_OPENMP
483 #elif defined( KOKKOS_ENABLE_THREADS )
484  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_THREADS
485 //#elif defined( KOKKOS_ENABLE_QTHREADS )
486 // #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_QTHREADS
487 #else
488  #define KOKKOS_ENABLE_DEFAULT_DEVICE_TYPE_SERIAL
489 #endif
490 
491 //----------------------------------------------------------------------------
492 // Determine for what space the code is being compiled:
493 
494 #if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) && defined( KOKKOS_ENABLE_CUDA )
495  #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA
496 #elif defined( __HCC__ ) && defined( __HCC_ACCELERATOR__ ) && defined( KOKKOS_ENABLE_ROCM )
497  #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_ROCM_GPU
498 #else
499  #define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST
500 #endif
501 
502 //----------------------------------------------------------------------------
503 
504 #if ( defined( _POSIX_C_SOURCE ) && _POSIX_C_SOURCE >= 200112L ) || \
505  ( defined( _XOPEN_SOURCE ) && _XOPEN_SOURCE >= 600 )
506  #if defined( KOKKOS_ENABLE_PERFORMANCE_POSIX_MEMALIGN )
507  #define KOKKOS_ENABLE_POSIX_MEMALIGN 1
508  #endif
509 #endif
510 
511 //----------------------------------------------------------------------------
512 // If compiling with CUDA then must be using CUDA 8 or better
513 // and use relocateable device code to enable the task policy.
514 // nvcc relocatable device code option: --relocatable-device-code=true
515 
516 #if ( defined( KOKKOS_ENABLE_CUDA ) )
517  #if ( 8000 <= CUDA_VERSION ) && defined( KOKKOS_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE )
518  #define KOKKOS_ENABLE_TASKDAG
519  #endif
520 #else
521  #define KOKKOS_ENABLE_TASKDAG
522 #endif
523 
524 
525 #if defined ( KOKKOS_ENABLE_CUDA )
526  #if ( 9000 <= CUDA_VERSION )
527  #define KOKKOS_IMPL_CUDA_VERSION_9_WORKAROUND
528  #if ( __CUDA_ARCH__ )
529  #define KOKKOS_IMPL_CUDA_SYNCWARP_NEEDS_MASK
530  #endif
531  #endif
532 #endif
533 
534 #define KOKKOS_INVALID_INDEX (~std::size_t(0))
535 
536 #ifdef KOKKOS_ENABLE_DEPRECATED_CODE
537  #define KOKKOS_IMPL_CTOR_DEFAULT_ARG 0
538 #else
539  #define KOKKOS_IMPL_CTOR_DEFAULT_ARG KOKKOS_INVALID_INDEX
540 #endif
541 
542 
543 
544 #endif // #ifndef KOKKOS_MACROS_HPP
545