WPILibC++ 2023.4.3
Macros.h
Go to the documentation of this file.
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2008-2015 Gael Guennebaud <gael.guennebaud@inria.fr>
5// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
6//
7// This Source Code Form is subject to the terms of the Mozilla
8// Public License v. 2.0. If a copy of the MPL was not distributed
9// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
11#ifndef EIGEN_MACROS_H
12#define EIGEN_MACROS_H
13
14//------------------------------------------------------------------------------------------
15// Eigen version and basic defaults
16//------------------------------------------------------------------------------------------
17
18#define EIGEN_WORLD_VERSION 3
19#define EIGEN_MAJOR_VERSION 4
20#define EIGEN_MINOR_VERSION 0
21
22#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x && \
23 (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y && \
24 EIGEN_MINOR_VERSION>=z))))
25
26#ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
27#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::RowMajor
28#else
29#define EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION Eigen::ColMajor
30#endif
31
32#ifndef EIGEN_DEFAULT_DENSE_INDEX_TYPE
33#define EIGEN_DEFAULT_DENSE_INDEX_TYPE std::ptrdiff_t
34#endif
35
36// Upperbound on the C++ version to use.
37// Expected values are 03, 11, 14, 17, etc.
38// By default, let's use an arbitrarily large C++ version.
39#ifndef EIGEN_MAX_CPP_VER
40#define EIGEN_MAX_CPP_VER 99
41#endif
42
43/** Allows to disable some optimizations which might affect the accuracy of the result.
44 * Such optimization are enabled by default, and set EIGEN_FAST_MATH to 0 to disable them.
45 * They currently include:
46 * - single precision ArrayBase::sin() and ArrayBase::cos() for SSE and AVX vectorization.
47 */
48#ifndef EIGEN_FAST_MATH
49#define EIGEN_FAST_MATH 1
50#endif
51
52#ifndef EIGEN_STACK_ALLOCATION_LIMIT
53// 131072 == 128 KB
54#define EIGEN_STACK_ALLOCATION_LIMIT 131072
55#endif
56
57//------------------------------------------------------------------------------------------
58// Compiler identification, EIGEN_COMP_*
59//------------------------------------------------------------------------------------------
60
61/// \internal Disable NEON features in Intellisense
62#if __INTELLISENSE__
63#ifdef __ARM_NEON
64#undef __ARM_NEON
65#endif
66#ifdef __ARM_NEON__
67#undef __ARM_NEON__
68#endif
69#endif
70
71/// \internal EIGEN_COMP_GNUC set to 1 for all compilers compatible with GCC
72#ifdef __GNUC__
73 #define EIGEN_COMP_GNUC (__GNUC__*10+__GNUC_MINOR__)
74#else
75 #define EIGEN_COMP_GNUC 0
76#endif
77
78/// \internal EIGEN_COMP_CLANG set to major+minor version (e.g., 307 for clang 3.7) if the compiler is clang
79#if defined(__clang__)
80 #define EIGEN_COMP_CLANG (__clang_major__*100+__clang_minor__)
81#else
82 #define EIGEN_COMP_CLANG 0
83#endif
84
85/// \internal EIGEN_COMP_CASTXML set to 1 if being preprocessed by CastXML
86#if defined(__castxml__)
87 #define EIGEN_COMP_CASTXML 1
88#else
89 #define EIGEN_COMP_CASTXML 0
90#endif
91
92/// \internal EIGEN_COMP_LLVM set to 1 if the compiler backend is llvm
93#if defined(__llvm__)
94 #define EIGEN_COMP_LLVM 1
95#else
96 #define EIGEN_COMP_LLVM 0
97#endif
98
99/// \internal EIGEN_COMP_ICC set to __INTEL_COMPILER if the compiler is Intel compiler, 0 otherwise
100#if defined(__INTEL_COMPILER)
101 #define EIGEN_COMP_ICC __INTEL_COMPILER
102#else
103 #define EIGEN_COMP_ICC 0
104#endif
105
106/// \internal EIGEN_COMP_MINGW set to 1 if the compiler is mingw
107#if defined(__MINGW32__)
108 #define EIGEN_COMP_MINGW 1
109#else
110 #define EIGEN_COMP_MINGW 0
111#endif
112
113/// \internal EIGEN_COMP_SUNCC set to 1 if the compiler is Solaris Studio
114#if defined(__SUNPRO_CC)
115 #define EIGEN_COMP_SUNCC 1
116#else
117 #define EIGEN_COMP_SUNCC 0
118#endif
119
120/// \internal EIGEN_COMP_MSVC set to _MSC_VER if the compiler is Microsoft Visual C++, 0 otherwise.
121#if defined(_MSC_VER)
122 #define EIGEN_COMP_MSVC _MSC_VER
123#else
124 #define EIGEN_COMP_MSVC 0
125#endif
126
127#if defined(__NVCC__)
128#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ >= 9)
129 #define EIGEN_COMP_NVCC ((__CUDACC_VER_MAJOR__ * 10000) + (__CUDACC_VER_MINOR__ * 100))
130#elif defined(__CUDACC_VER__)
131 #define EIGEN_COMP_NVCC __CUDACC_VER__
132#else
133 #error "NVCC did not define compiler version."
134#endif
135#else
136 #define EIGEN_COMP_NVCC 0
137#endif
138
139// For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC:
140// name ver MSC_VER
141// 2008 9 1500
142// 2010 10 1600
143// 2012 11 1700
144// 2013 12 1800
145// 2015 14 1900
146// "15" 15 1900
147// 2017-14.1 15.0 1910
148// 2017-14.11 15.3 1911
149// 2017-14.12 15.5 1912
150// 2017-14.13 15.6 1913
151// 2017-14.14 15.7 1914
152
153/// \internal EIGEN_COMP_MSVC_LANG set to _MSVC_LANG if the compiler is Microsoft Visual C++, 0 otherwise.
154#if defined(_MSVC_LANG)
155 #define EIGEN_COMP_MSVC_LANG _MSVC_LANG
156#else
157 #define EIGEN_COMP_MSVC_LANG 0
158#endif
159
160// For the record, here is a table summarizing the possible values for EIGEN_COMP_MSVC_LANG:
161// MSVC option Standard MSVC_LANG
162// /std:c++14 (default as of VS 2019) C++14 201402L
163// /std:c++17 C++17 201703L
164// /std:c++latest >C++17 >201703L
165
166/// \internal EIGEN_COMP_MSVC_STRICT set to 1 if the compiler is really Microsoft Visual C++ and not ,e.g., ICC or clang-cl
167#if EIGEN_COMP_MSVC && !(EIGEN_COMP_ICC || EIGEN_COMP_LLVM || EIGEN_COMP_CLANG)
168 #define EIGEN_COMP_MSVC_STRICT _MSC_VER
169#else
170 #define EIGEN_COMP_MSVC_STRICT 0
171#endif
172
173/// \internal EIGEN_COMP_IBM set to xlc version if the compiler is IBM XL C++
174// XLC version
175// 3.1 0x0301
176// 4.5 0x0405
177// 5.0 0x0500
178// 12.1 0x0C01
179#if defined(__IBMCPP__) || defined(__xlc__) || defined(__ibmxl__)
180 #define EIGEN_COMP_IBM __xlC__
181#else
182 #define EIGEN_COMP_IBM 0
183#endif
184
185/// \internal EIGEN_COMP_PGI set to PGI version if the compiler is Portland Group Compiler
186#if defined(__PGI)
187 #define EIGEN_COMP_PGI (__PGIC__*100+__PGIC_MINOR__)
188#else
189 #define EIGEN_COMP_PGI 0
190#endif
191
192/// \internal EIGEN_COMP_ARM set to 1 if the compiler is ARM Compiler
193#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
194 #define EIGEN_COMP_ARM 1
195#else
196 #define EIGEN_COMP_ARM 0
197#endif
198
199/// \internal EIGEN_COMP_EMSCRIPTEN set to 1 if the compiler is Emscripten Compiler
200#if defined(__EMSCRIPTEN__)
201 #define EIGEN_COMP_EMSCRIPTEN 1
202#else
203 #define EIGEN_COMP_EMSCRIPTEN 0
204#endif
205
206
207/// \internal EIGEN_GNUC_STRICT set to 1 if the compiler is really GCC and not a compatible compiler (e.g., ICC, clang, mingw, etc.)
208#if EIGEN_COMP_GNUC && !(EIGEN_COMP_CLANG || EIGEN_COMP_ICC || EIGEN_COMP_MINGW || EIGEN_COMP_PGI || EIGEN_COMP_IBM || EIGEN_COMP_ARM || EIGEN_COMP_EMSCRIPTEN)
209 #define EIGEN_COMP_GNUC_STRICT 1
210#else
211 #define EIGEN_COMP_GNUC_STRICT 0
212#endif
213
214
215#if EIGEN_COMP_GNUC
216 #define EIGEN_GNUC_AT_LEAST(x,y) ((__GNUC__==x && __GNUC_MINOR__>=y) || __GNUC__>x)
217 #define EIGEN_GNUC_AT_MOST(x,y) ((__GNUC__==x && __GNUC_MINOR__<=y) || __GNUC__<x)
218 #define EIGEN_GNUC_AT(x,y) ( __GNUC__==x && __GNUC_MINOR__==y )
219#else
220 #define EIGEN_GNUC_AT_LEAST(x,y) 0
221 #define EIGEN_GNUC_AT_MOST(x,y) 0
222 #define EIGEN_GNUC_AT(x,y) 0
223#endif
224
225// FIXME: could probably be removed as we do not support gcc 3.x anymore
226#if EIGEN_COMP_GNUC && (__GNUC__ <= 3)
227#define EIGEN_GCC3_OR_OLDER 1
228#else
229#define EIGEN_GCC3_OR_OLDER 0
230#endif
231
232
233
234//------------------------------------------------------------------------------------------
235// Architecture identification, EIGEN_ARCH_*
236//------------------------------------------------------------------------------------------
237
238
239#if defined(__x86_64__) || (defined(_M_X64) && !defined(_M_ARM64EC)) || defined(__amd64)
240 #define EIGEN_ARCH_x86_64 1
241#else
242 #define EIGEN_ARCH_x86_64 0
243#endif
244
245#if defined(__i386__) || defined(_M_IX86) || defined(_X86_) || defined(__i386)
246 #define EIGEN_ARCH_i386 1
247#else
248 #define EIGEN_ARCH_i386 0
249#endif
250
251#if EIGEN_ARCH_x86_64 || EIGEN_ARCH_i386
252 #define EIGEN_ARCH_i386_OR_x86_64 1
253#else
254 #define EIGEN_ARCH_i386_OR_x86_64 0
255#endif
256
257/// \internal EIGEN_ARCH_ARM set to 1 if the architecture is ARM
258#if defined(__arm__)
259 #define EIGEN_ARCH_ARM 1
260#else
261 #define EIGEN_ARCH_ARM 0
262#endif
263
264/// \internal EIGEN_ARCH_ARM64 set to 1 if the architecture is ARM64
265#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
266 #define EIGEN_ARCH_ARM64 1
267#else
268 #define EIGEN_ARCH_ARM64 0
269#endif
270
271/// \internal EIGEN_ARCH_ARM_OR_ARM64 set to 1 if the architecture is ARM or ARM64
272#if EIGEN_ARCH_ARM || EIGEN_ARCH_ARM64
273 #define EIGEN_ARCH_ARM_OR_ARM64 1
274#else
275 #define EIGEN_ARCH_ARM_OR_ARM64 0
276#endif
277
278/// \internal EIGEN_ARCH_ARMV8 set to 1 if the architecture is armv8 or greater.
279#if EIGEN_ARCH_ARM_OR_ARM64 && defined(__ARM_ARCH) && __ARM_ARCH >= 8
280#define EIGEN_ARCH_ARMV8 1
281#else
282#define EIGEN_ARCH_ARMV8 0
283#endif
284
285
286/// \internal EIGEN_HAS_ARM64_FP16 set to 1 if the architecture provides an IEEE
287/// compliant Arm fp16 type
288#if EIGEN_ARCH_ARM64
289 #ifndef EIGEN_HAS_ARM64_FP16
290 #if defined(__ARM_FP16_FORMAT_IEEE)
291 #define EIGEN_HAS_ARM64_FP16 1
292 #else
293 #define EIGEN_HAS_ARM64_FP16 0
294 #endif
295 #endif
296#endif
297
298/// \internal EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC set to 1 if the architecture
299/// supports Neon vector intrinsics for fp16.
300#if EIGEN_ARCH_ARM64
301 #ifndef EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
302 #if defined(__ARM_FEATURE_FP16_VECTOR_ARITHMETIC)
303 #define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 1
304 #else
305 #define EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC 0
306 #endif
307 #endif
308#endif
309
310/// \internal EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC set to 1 if the architecture
311/// supports Neon scalar intrinsics for fp16.
312#if EIGEN_ARCH_ARM64
313 #ifndef EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC
314 #if defined(__ARM_FEATURE_FP16_SCALAR_ARITHMETIC)
315 #define EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC 1
316 #endif
317 #endif
318#endif
319
320/// \internal EIGEN_ARCH_MIPS set to 1 if the architecture is MIPS
321#if defined(__mips__) || defined(__mips)
322 #define EIGEN_ARCH_MIPS 1
323#else
324 #define EIGEN_ARCH_MIPS 0
325#endif
326
327/// \internal EIGEN_ARCH_SPARC set to 1 if the architecture is SPARC
328#if defined(__sparc__) || defined(__sparc)
329 #define EIGEN_ARCH_SPARC 1
330#else
331 #define EIGEN_ARCH_SPARC 0
332#endif
333
334/// \internal EIGEN_ARCH_IA64 set to 1 if the architecture is Intel Itanium
335#if defined(__ia64__)
336 #define EIGEN_ARCH_IA64 1
337#else
338 #define EIGEN_ARCH_IA64 0
339#endif
340
341/// \internal EIGEN_ARCH_PPC set to 1 if the architecture is PowerPC
342#if defined(__powerpc__) || defined(__ppc__) || defined(_M_PPC)
343 #define EIGEN_ARCH_PPC 1
344#else
345 #define EIGEN_ARCH_PPC 0
346#endif
347
348
349
350//------------------------------------------------------------------------------------------
351// Operating system identification, EIGEN_OS_*
352//------------------------------------------------------------------------------------------
353
354/// \internal EIGEN_OS_UNIX set to 1 if the OS is a unix variant
355#if defined(__unix__) || defined(__unix)
356 #define EIGEN_OS_UNIX 1
357#else
358 #define EIGEN_OS_UNIX 0
359#endif
360
361/// \internal EIGEN_OS_LINUX set to 1 if the OS is based on Linux kernel
362#if defined(__linux__)
363 #define EIGEN_OS_LINUX 1
364#else
365 #define EIGEN_OS_LINUX 0
366#endif
367
368/// \internal EIGEN_OS_ANDROID set to 1 if the OS is Android
369// note: ANDROID is defined when using ndk_build, __ANDROID__ is defined when using a standalone toolchain.
370#if defined(__ANDROID__) || defined(ANDROID)
371 #define EIGEN_OS_ANDROID 1
372#else
373 #define EIGEN_OS_ANDROID 0
374#endif
375
376/// \internal EIGEN_OS_GNULINUX set to 1 if the OS is GNU Linux and not Linux-based OS (e.g., not android)
377#if defined(__gnu_linux__) && !(EIGEN_OS_ANDROID)
378 #define EIGEN_OS_GNULINUX 1
379#else
380 #define EIGEN_OS_GNULINUX 0
381#endif
382
383/// \internal EIGEN_OS_BSD set to 1 if the OS is a BSD variant
384#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__DragonFly__)
385 #define EIGEN_OS_BSD 1
386#else
387 #define EIGEN_OS_BSD 0
388#endif
389
390/// \internal EIGEN_OS_MAC set to 1 if the OS is MacOS
391#if defined(__APPLE__)
392 #define EIGEN_OS_MAC 1
393#else
394 #define EIGEN_OS_MAC 0
395#endif
396
397/// \internal EIGEN_OS_QNX set to 1 if the OS is QNX
398#if defined(__QNX__)
399 #define EIGEN_OS_QNX 1
400#else
401 #define EIGEN_OS_QNX 0
402#endif
403
404/// \internal EIGEN_OS_WIN set to 1 if the OS is Windows based
405#if defined(_WIN32)
406 #define EIGEN_OS_WIN 1
407#else
408 #define EIGEN_OS_WIN 0
409#endif
410
411/// \internal EIGEN_OS_WIN64 set to 1 if the OS is Windows 64bits
412#if defined(_WIN64)
413 #define EIGEN_OS_WIN64 1
414#else
415 #define EIGEN_OS_WIN64 0
416#endif
417
418/// \internal EIGEN_OS_WINCE set to 1 if the OS is Windows CE
419#if defined(_WIN32_WCE)
420 #define EIGEN_OS_WINCE 1
421#else
422 #define EIGEN_OS_WINCE 0
423#endif
424
425/// \internal EIGEN_OS_CYGWIN set to 1 if the OS is Windows/Cygwin
426#if defined(__CYGWIN__)
427 #define EIGEN_OS_CYGWIN 1
428#else
429 #define EIGEN_OS_CYGWIN 0
430#endif
431
432/// \internal EIGEN_OS_WIN_STRICT set to 1 if the OS is really Windows and not some variants
433#if EIGEN_OS_WIN && !( EIGEN_OS_WINCE || EIGEN_OS_CYGWIN )
434 #define EIGEN_OS_WIN_STRICT 1
435#else
436 #define EIGEN_OS_WIN_STRICT 0
437#endif
438
439/// \internal EIGEN_OS_SUN set to __SUNPRO_C if the OS is SUN
440// compiler solaris __SUNPRO_C
441// version studio
442// 5.7 10 0x570
443// 5.8 11 0x580
444// 5.9 12 0x590
445// 5.10 12.1 0x5100
446// 5.11 12.2 0x5110
447// 5.12 12.3 0x5120
448#if (defined(sun) || defined(__sun)) && !(defined(__SVR4) || defined(__svr4__))
449 #define EIGEN_OS_SUN __SUNPRO_C
450#else
451 #define EIGEN_OS_SUN 0
452#endif
453
454/// \internal EIGEN_OS_SOLARIS set to 1 if the OS is Solaris
455#if (defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))
456 #define EIGEN_OS_SOLARIS 1
457#else
458 #define EIGEN_OS_SOLARIS 0
459#endif
460
461
462//------------------------------------------------------------------------------------------
463// Detect GPU compilers and architectures
464//------------------------------------------------------------------------------------------
465
466// NVCC is not supported as the target platform for HIPCC
467// Note that this also makes EIGEN_CUDACC and EIGEN_HIPCC mutually exclusive
468#if defined(__NVCC__) && defined(__HIPCC__)
469 #error "NVCC as the target platform for HIPCC is currently not supported."
470#endif
471
472#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA)
473 // Means the compiler is either nvcc or clang with CUDA enabled
474 #define EIGEN_CUDACC __CUDACC__
475#endif
476
477#if defined(__CUDA_ARCH__) && !defined(EIGEN_NO_CUDA)
478 // Means we are generating code for the device
479 #define EIGEN_CUDA_ARCH __CUDA_ARCH__
480#endif
481
482#if defined(EIGEN_CUDACC)
483#include <cuda.h>
484 #define EIGEN_CUDA_SDK_VER (CUDA_VERSION * 10)
485#else
486 #define EIGEN_CUDA_SDK_VER 0
487#endif
488
489#if defined(__HIPCC__) && !defined(EIGEN_NO_HIP)
490 // Means the compiler is HIPCC (analogous to EIGEN_CUDACC, but for HIP)
491 #define EIGEN_HIPCC __HIPCC__
492
493 // We need to include hip_runtime.h here because it pulls in
494 // ++ hip_common.h which contains the define for __HIP_DEVICE_COMPILE__
495 // ++ host_defines.h which contains the defines for the __host__ and __device__ macros
496 #include <hip/hip_runtime.h>
497
498 #if defined(__HIP_DEVICE_COMPILE__)
499 // analogous to EIGEN_CUDA_ARCH, but for HIP
500 #define EIGEN_HIP_DEVICE_COMPILE __HIP_DEVICE_COMPILE__
501 #endif
502
503 // For HIP (ROCm 3.5 and higher), we need to explicitly set the launch_bounds attribute
504 // value to 1024. The compiler assigns a default value of 256 when the attribute is not
505 // specified. This results in failures on the HIP platform, for cases when a GPU kernel
506 // without an explicit launch_bounds attribute is called with a threads_per_block value
507 // greater than 256.
508 //
509 // This is a regression in functioanlity and is expected to be fixed within the next
510 // couple of ROCm releases (compiler will go back to using 1024 value as the default)
511 //
512 // In the meantime, we will use a "only enabled for HIP" macro to set the launch_bounds
513 // attribute.
514
515 #define EIGEN_HIP_LAUNCH_BOUNDS_1024 __launch_bounds__(1024)
516
517#endif
518
519#if !defined(EIGEN_HIP_LAUNCH_BOUNDS_1024)
520#define EIGEN_HIP_LAUNCH_BOUNDS_1024
521#endif // !defined(EIGEN_HIP_LAUNCH_BOUNDS_1024)
522
523// Unify CUDA/HIPCC
524
525#if defined(EIGEN_CUDACC) || defined(EIGEN_HIPCC)
526//
527// If either EIGEN_CUDACC or EIGEN_HIPCC is defined, then define EIGEN_GPUCC
528//
529#define EIGEN_GPUCC
530//
531// EIGEN_HIPCC implies the HIP compiler and is used to tweak Eigen code for use in HIP kernels
532// EIGEN_CUDACC implies the CUDA compiler and is used to tweak Eigen code for use in CUDA kernels
533//
534// In most cases the same tweaks are required to the Eigen code to enable in both the HIP and CUDA kernels.
535// For those cases, the corresponding code should be guarded with
536// #if defined(EIGEN_GPUCC)
537// instead of
538// #if defined(EIGEN_CUDACC) || defined(EIGEN_HIPCC)
539//
540// For cases where the tweak is specific to HIP, the code should be guarded with
541// #if defined(EIGEN_HIPCC)
542//
543// For cases where the tweak is specific to CUDA, the code should be guarded with
544// #if defined(EIGEN_CUDACC)
545//
546#endif
547
548#if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE)
549//
550// If either EIGEN_CUDA_ARCH or EIGEN_HIP_DEVICE_COMPILE is defined, then define EIGEN_GPU_COMPILE_PHASE
551//
552#define EIGEN_GPU_COMPILE_PHASE
553//
554// GPU compilers (HIPCC, NVCC) typically do two passes over the source code,
555// + one to compile the source for the "host" (ie CPU)
556// + another to compile the source for the "device" (ie. GPU)
557//
558// Code that needs to enabled only during the either the "host" or "device" compilation phase
559// needs to be guarded with a macro that indicates the current compilation phase
560//
561// EIGEN_HIP_DEVICE_COMPILE implies the device compilation phase in HIP
562// EIGEN_CUDA_ARCH implies the device compilation phase in CUDA
563//
564// In most cases, the "host" / "device" specific code is the same for both HIP and CUDA
565// For those cases, the code should be guarded with
566// #if defined(EIGEN_GPU_COMPILE_PHASE)
567// instead of
568// #if defined(EIGEN_CUDA_ARCH) || defined(EIGEN_HIP_DEVICE_COMPILE)
569//
570// For cases where the tweak is specific to HIP, the code should be guarded with
571// #if defined(EIGEN_HIP_DEVICE_COMPILE)
572//
573// For cases where the tweak is specific to CUDA, the code should be guarded with
574// #if defined(EIGEN_CUDA_ARCH)
575//
576#endif
577
578#if defined(EIGEN_USE_SYCL) && defined(__SYCL_DEVICE_ONLY__)
579// EIGEN_USE_SYCL is a user-defined macro while __SYCL_DEVICE_ONLY__ is a compiler-defined macro.
580// In most cases we want to check if both macros are defined which can be done using the define below.
581#define SYCL_DEVICE_ONLY
582#endif
583
584//------------------------------------------------------------------------------------------
585// Detect Compiler/Architecture/OS specific features
586//------------------------------------------------------------------------------------------
587
588#if EIGEN_GNUC_AT_MOST(4,3) && !EIGEN_COMP_CLANG
589 // see bug 89
590 #define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 0
591#else
592 #define EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO 1
593#endif
594
595// Cross compiler wrapper around LLVM's __has_builtin
596#ifdef __has_builtin
597# define EIGEN_HAS_BUILTIN(x) __has_builtin(x)
598#else
599# define EIGEN_HAS_BUILTIN(x) 0
600#endif
601
602// A Clang feature extension to determine compiler features.
603// We use it to determine 'cxx_rvalue_references'
604#ifndef __has_feature
605# define __has_feature(x) 0
606#endif
607
608// Some old compilers do not support template specializations like:
609// template<typename T,int N> void foo(const T x[N]);
610#if !( EIGEN_COMP_CLANG && ( (EIGEN_COMP_CLANG<309) \
611 || (defined(__apple_build_version__) && (__apple_build_version__ < 9000000))) \
612 || EIGEN_COMP_GNUC_STRICT && EIGEN_COMP_GNUC<49)
613#define EIGEN_HAS_STATIC_ARRAY_TEMPLATE 1
614#else
615#define EIGEN_HAS_STATIC_ARRAY_TEMPLATE 0
616#endif
617
618// The macro EIGEN_CPLUSPLUS is a replacement for __cplusplus/_MSVC_LANG that
619// works for both platforms, indicating the C++ standard version number.
620//
621// With MSVC, without defining /Zc:__cplusplus, the __cplusplus macro will
622// report 199711L regardless of the language standard specified via /std.
623// We need to rely on _MSVC_LANG instead, which is only available after
624// VS2015.3.
625#if EIGEN_COMP_MSVC_LANG > 0
626#define EIGEN_CPLUSPLUS EIGEN_COMP_MSVC_LANG
627#elif EIGEN_COMP_MSVC >= 1900
628#define EIGEN_CPLUSPLUS 201103L
629#elif defined(__cplusplus)
630#define EIGEN_CPLUSPLUS __cplusplus
631#else
632#define EIGEN_CPLUSPLUS 0
633#endif
634
635// The macro EIGEN_COMP_CXXVER defines the c++ verson expected by the compiler.
636// For instance, if compiling with gcc and -std=c++17, then EIGEN_COMP_CXXVER
637// is defined to 17.
638#if EIGEN_CPLUSPLUS > 201703L
639 #define EIGEN_COMP_CXXVER 20
640#elif EIGEN_CPLUSPLUS > 201402L
641 #define EIGEN_COMP_CXXVER 17
642#elif EIGEN_CPLUSPLUS > 201103L
643 #define EIGEN_COMP_CXXVER 14
644#elif EIGEN_CPLUSPLUS >= 201103L
645 #define EIGEN_COMP_CXXVER 11
646#else
647 #define EIGEN_COMP_CXXVER 03
648#endif
649
650#ifndef EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
651 #if defined(__cpp_variable_templates) && __cpp_variable_templates >= 201304 && EIGEN_MAX_CPP_VER>=14
652 #define EIGEN_HAS_CXX14_VARIABLE_TEMPLATES 1
653 #else
654 #define EIGEN_HAS_CXX14_VARIABLE_TEMPLATES 0
655 #endif
656#endif
657
658
659// The macros EIGEN_HAS_CXX?? defines a rough estimate of available c++ features
660// but in practice we should not rely on them but rather on the availabilty of
661// individual features as defined later.
662// This is why there is no EIGEN_HAS_CXX17.
663// FIXME: get rid of EIGEN_HAS_CXX14 and maybe even EIGEN_HAS_CXX11.
664#if EIGEN_MAX_CPP_VER>=11 && EIGEN_COMP_CXXVER>=11
665#define EIGEN_HAS_CXX11 1
666#else
667#define EIGEN_HAS_CXX11 0
668#endif
669
670#if EIGEN_MAX_CPP_VER>=14 && EIGEN_COMP_CXXVER>=14
671#define EIGEN_HAS_CXX14 1
672#else
673#define EIGEN_HAS_CXX14 0
674#endif
675
676// Do we support r-value references?
677#ifndef EIGEN_HAS_RVALUE_REFERENCES
678#if EIGEN_MAX_CPP_VER>=11 && \
679 (__has_feature(cxx_rvalue_references) || \
680 (EIGEN_COMP_CXXVER >= 11) || (EIGEN_COMP_MSVC >= 1600))
681 #define EIGEN_HAS_RVALUE_REFERENCES 1
682#else
683 #define EIGEN_HAS_RVALUE_REFERENCES 0
684#endif
685#endif
686
687// Does the compiler support C99?
688// Need to include <cmath> to make sure _GLIBCXX_USE_C99 gets defined
689#include <cmath>
690#ifndef EIGEN_HAS_C99_MATH
691#if EIGEN_MAX_CPP_VER>=11 && \
692 ((defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) \
693 || (defined(__GNUC__) && defined(_GLIBCXX_USE_C99)) \
694 || (defined(_LIBCPP_VERSION) && !defined(_MSC_VER)) \
695 || (EIGEN_COMP_MSVC >= 1900) || defined(SYCL_DEVICE_ONLY))
696 #define EIGEN_HAS_C99_MATH 1
697#else
698 #define EIGEN_HAS_C99_MATH 0
699#endif
700#endif
701
702// Does the compiler support result_of?
703// result_of was deprecated in c++17 and removed in c++ 20
704#ifndef EIGEN_HAS_STD_RESULT_OF
705#if EIGEN_HAS_CXX11 && EIGEN_COMP_CXXVER < 17
706#define EIGEN_HAS_STD_RESULT_OF 1
707#else
708#define EIGEN_HAS_STD_RESULT_OF 0
709#endif
710#endif
711
712// Does the compiler support std::hash?
713#ifndef EIGEN_HAS_STD_HASH
714// The std::hash struct is defined in C++11 but is not labelled as a __device__
715// function and is not constexpr, so cannot be used on device.
716#if EIGEN_HAS_CXX11 && !defined(EIGEN_GPU_COMPILE_PHASE)
717#define EIGEN_HAS_STD_HASH 1
718#else
719#define EIGEN_HAS_STD_HASH 0
720#endif
721#endif // EIGEN_HAS_STD_HASH
722
723#ifndef EIGEN_HAS_STD_INVOKE_RESULT
724#if EIGEN_MAX_CPP_VER >= 17 && EIGEN_COMP_CXXVER >= 17
725#define EIGEN_HAS_STD_INVOKE_RESULT 1
726#else
727#define EIGEN_HAS_STD_INVOKE_RESULT 0
728#endif
729#endif
730
731#ifndef EIGEN_HAS_ALIGNAS
732#if EIGEN_MAX_CPP_VER>=11 && EIGEN_HAS_CXX11 && \
733 ( __has_feature(cxx_alignas) \
734 || EIGEN_HAS_CXX14 \
735 || (EIGEN_COMP_MSVC >= 1800) \
736 || (EIGEN_GNUC_AT_LEAST(4,8)) \
737 || (EIGEN_COMP_CLANG>=305) \
738 || (EIGEN_COMP_ICC>=1500) \
739 || (EIGEN_COMP_PGI>=1500) \
740 || (EIGEN_COMP_SUNCC>=0x5130))
741#define EIGEN_HAS_ALIGNAS 1
742#else
743#define EIGEN_HAS_ALIGNAS 0
744#endif
745#endif
746
747// Does the compiler support type_traits?
748// - full support of type traits was added only to GCC 5.1.0.
749// - 20150626 corresponds to the last release of 4.x libstdc++
750#ifndef EIGEN_HAS_TYPE_TRAITS
751#if EIGEN_MAX_CPP_VER>=11 && (EIGEN_HAS_CXX11 || EIGEN_COMP_MSVC >= 1700) \
752 && ((!EIGEN_COMP_GNUC_STRICT) || EIGEN_GNUC_AT_LEAST(5, 1)) \
753 && ((!defined(__GLIBCXX__)) || __GLIBCXX__ > 20150626)
754#define EIGEN_HAS_TYPE_TRAITS 1
755#define EIGEN_INCLUDE_TYPE_TRAITS
756#else
757#define EIGEN_HAS_TYPE_TRAITS 0
758#endif
759#endif
760
761// Does the compiler support variadic templates?
762#ifndef EIGEN_HAS_VARIADIC_TEMPLATES
763#if EIGEN_MAX_CPP_VER>=11 && (EIGEN_COMP_CXXVER >= 11) \
764 && (!defined(__NVCC__) || !EIGEN_ARCH_ARM_OR_ARM64 || (EIGEN_COMP_NVCC >= 80000) )
765 // ^^ Disable the use of variadic templates when compiling with versions of nvcc older than 8.0 on ARM devices:
766 // this prevents nvcc from crashing when compiling Eigen on Tegra X1
767#define EIGEN_HAS_VARIADIC_TEMPLATES 1
768#elif EIGEN_MAX_CPP_VER>=11 && (EIGEN_COMP_CXXVER >= 11) && defined(SYCL_DEVICE_ONLY)
769#define EIGEN_HAS_VARIADIC_TEMPLATES 1
770#else
771#define EIGEN_HAS_VARIADIC_TEMPLATES 0
772#endif
773#endif
774
775// Does the compiler fully support const expressions? (as in c++14)
776#ifndef EIGEN_HAS_CONSTEXPR
777 #if defined(EIGEN_CUDACC)
778 // Const expressions are supported provided that c++11 is enabled and we're using either clang or nvcc 7.5 or above
779 #if EIGEN_MAX_CPP_VER>=14 && (EIGEN_COMP_CXXVER >= 11 && (EIGEN_COMP_CLANG || EIGEN_COMP_NVCC >= 70500))
780 #define EIGEN_HAS_CONSTEXPR 1
781 #endif
782 #elif EIGEN_MAX_CPP_VER>=14 && (__has_feature(cxx_relaxed_constexpr) || (EIGEN_COMP_CXXVER >= 14) || \
783 (EIGEN_GNUC_AT_LEAST(4,8) && (EIGEN_COMP_CXXVER >= 11)) || \
784 (EIGEN_COMP_CLANG >= 306 && (EIGEN_COMP_CXXVER >= 11)))
785 #define EIGEN_HAS_CONSTEXPR 1
786 #endif
787
788 #ifndef EIGEN_HAS_CONSTEXPR
789 #define EIGEN_HAS_CONSTEXPR 0
790 #endif
791
792#endif // EIGEN_HAS_CONSTEXPR
793
794#if EIGEN_HAS_CONSTEXPR
795#define EIGEN_CONSTEXPR constexpr
796#else
797#define EIGEN_CONSTEXPR
798#endif
799
800// Does the compiler support C++11 math?
801// Let's be conservative and enable the default C++11 implementation only if we are sure it exists
802#ifndef EIGEN_HAS_CXX11_MATH
803 #if EIGEN_MAX_CPP_VER>=11 && ((EIGEN_COMP_CXXVER > 11) || (EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC) \
804 && (EIGEN_ARCH_i386_OR_x86_64) && (EIGEN_OS_GNULINUX || EIGEN_OS_WIN_STRICT || EIGEN_OS_MAC))
805 #define EIGEN_HAS_CXX11_MATH 1
806 #else
807 #define EIGEN_HAS_CXX11_MATH 0
808 #endif
809#endif
810
811// Does the compiler support proper C++11 containers?
812#ifndef EIGEN_HAS_CXX11_CONTAINERS
813 #if EIGEN_MAX_CPP_VER>=11 && \
814 ((EIGEN_COMP_CXXVER > 11) \
815 || ((EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC>=1400)))
816 #define EIGEN_HAS_CXX11_CONTAINERS 1
817 #else
818 #define EIGEN_HAS_CXX11_CONTAINERS 0
819 #endif
820#endif
821
822// Does the compiler support C++11 noexcept?
823#ifndef EIGEN_HAS_CXX11_NOEXCEPT
824 #if EIGEN_MAX_CPP_VER>=11 && \
825 (__has_feature(cxx_noexcept) \
826 || (EIGEN_COMP_CXXVER > 11) \
827 || ((EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_GNUC_STRICT || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC || EIGEN_COMP_ICC>=1400)))
828 #define EIGEN_HAS_CXX11_NOEXCEPT 1
829 #else
830 #define EIGEN_HAS_CXX11_NOEXCEPT 0
831 #endif
832#endif
833
834#ifndef EIGEN_HAS_CXX11_ATOMIC
835 #if EIGEN_MAX_CPP_VER>=11 && \
836 (__has_feature(cxx_atomic) \
837 || (EIGEN_COMP_CXXVER > 11) \
838 || ((EIGEN_COMP_CXXVER == 11) && (EIGEN_COMP_MSVC==0 || EIGEN_COMP_MSVC >= 1700)))
839 #define EIGEN_HAS_CXX11_ATOMIC 1
840 #else
841 #define EIGEN_HAS_CXX11_ATOMIC 0
842 #endif
843#endif
844
845#ifndef EIGEN_HAS_CXX11_OVERRIDE_FINAL
846 #if EIGEN_MAX_CPP_VER>=11 && \
847 (EIGEN_COMP_CXXVER >= 11 || EIGEN_COMP_MSVC >= 1700)
848 #define EIGEN_HAS_CXX11_OVERRIDE_FINAL 1
849 #else
850 #define EIGEN_HAS_CXX11_OVERRIDE_FINAL 0
851 #endif
852#endif
853
854// NOTE: the required Apple's clang version is very conservative
855// and it could be that XCode 9 works just fine.
856// NOTE: the MSVC version is based on https://en.cppreference.com/w/cpp/compiler_support
857// and not tested.
858#ifndef EIGEN_HAS_CXX17_OVERALIGN
859#if EIGEN_MAX_CPP_VER>=17 && EIGEN_COMP_CXXVER>=17 && ( \
860 (EIGEN_COMP_MSVC >= 1912) \
861 || (EIGEN_GNUC_AT_LEAST(7,0)) \
862 || ((!defined(__apple_build_version__)) && (EIGEN_COMP_CLANG>=500)) \
863 || (( defined(__apple_build_version__)) && (__apple_build_version__>=10000000)) \
864 )
865#define EIGEN_HAS_CXX17_OVERALIGN 1
866#else
867#define EIGEN_HAS_CXX17_OVERALIGN 0
868#endif
869#endif
870
871#if defined(EIGEN_CUDACC) && EIGEN_HAS_CONSTEXPR
872 // While available already with c++11, this is useful mostly starting with c++14 and relaxed constexpr rules
873 #if defined(__NVCC__)
874 // nvcc considers constexpr functions as __host__ __device__ with the option --expt-relaxed-constexpr
875 #ifdef __CUDACC_RELAXED_CONSTEXPR__
876 #define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
877 #endif
878 #elif defined(__clang__) && defined(__CUDA__) && __has_feature(cxx_relaxed_constexpr)
879 // clang++ always considers constexpr functions as implicitly __host__ __device__
880 #define EIGEN_CONSTEXPR_ARE_DEVICE_FUNC
881 #endif
882#endif
883
884// Does the compiler support the __int128 and __uint128_t extensions for 128-bit
885// integer arithmetic?
886//
887// Clang and GCC define __SIZEOF_INT128__ when these extensions are supported,
888// but we avoid using them in certain cases:
889//
890// * Building using Clang for Windows, where the Clang runtime library has
891// 128-bit support only on LP64 architectures, but Windows is LLP64.
892#ifndef EIGEN_HAS_BUILTIN_INT128
893#if defined(__SIZEOF_INT128__) && !(EIGEN_OS_WIN && EIGEN_COMP_CLANG)
894#define EIGEN_HAS_BUILTIN_INT128 1
895#else
896#define EIGEN_HAS_BUILTIN_INT128 0
897#endif
898#endif
899
900//------------------------------------------------------------------------------------------
901// Preprocessor programming helpers
902//------------------------------------------------------------------------------------------
903
904// This macro can be used to prevent from macro expansion, e.g.:
905// std::max EIGEN_NOT_A_MACRO(a,b)
906#define EIGEN_NOT_A_MACRO
907
908#define EIGEN_DEBUG_VAR(x) std::cerr << #x << " = " << x << std::endl;
909
910// concatenate two tokens
911#define EIGEN_CAT2(a,b) a ## b
912#define EIGEN_CAT(a,b) EIGEN_CAT2(a,b)
913
914#define EIGEN_COMMA ,
915
916// convert a token to a string
917#define EIGEN_MAKESTRING2(a) #a
918#define EIGEN_MAKESTRING(a) EIGEN_MAKESTRING2(a)
919
920// EIGEN_STRONG_INLINE is a stronger version of the inline, using __forceinline on MSVC,
921// but it still doesn't use GCC's always_inline. This is useful in (common) situations where MSVC needs forceinline
922// but GCC is still doing fine with just inline.
923#ifndef EIGEN_STRONG_INLINE
924#if (EIGEN_COMP_MSVC || EIGEN_COMP_ICC) && !defined(EIGEN_GPUCC)
925#define EIGEN_STRONG_INLINE __forceinline
926#else
927#define EIGEN_STRONG_INLINE inline
928#endif
929#endif
930
931// EIGEN_ALWAYS_INLINE is the stronget, it has the effect of making the function inline and adding every possible
932// attribute to maximize inlining. This should only be used when really necessary: in particular,
933// it uses __attribute__((always_inline)) on GCC, which most of the time is useless and can severely harm compile times.
934// FIXME with the always_inline attribute,
935// gcc 3.4.x and 4.1 reports the following compilation error:
936// Eval.h:91: sorry, unimplemented: inlining failed in call to 'const Eigen::Eval<Derived> Eigen::MatrixBase<Scalar, Derived>::eval() const'
937// : function body not available
938// See also bug 1367
939#if EIGEN_GNUC_AT_LEAST(4,2) && !defined(SYCL_DEVICE_ONLY)
940#define EIGEN_ALWAYS_INLINE __attribute__((always_inline)) inline
941#else
942#define EIGEN_ALWAYS_INLINE EIGEN_STRONG_INLINE
943#endif
944
945#if EIGEN_COMP_GNUC
946#define EIGEN_DONT_INLINE __attribute__((noinline))
947#elif EIGEN_COMP_MSVC
948#define EIGEN_DONT_INLINE __declspec(noinline)
949#else
950#define EIGEN_DONT_INLINE
951#endif
952
953#if EIGEN_COMP_GNUC
954#define EIGEN_PERMISSIVE_EXPR __extension__
955#else
956#define EIGEN_PERMISSIVE_EXPR
957#endif
958
959// GPU stuff
960
961// Disable some features when compiling with GPU compilers (NVCC/clang-cuda/SYCL/HIPCC)
962#if defined(EIGEN_CUDACC) || defined(SYCL_DEVICE_ONLY) || defined(EIGEN_HIPCC)
963 // Do not try asserts on device code
964 #ifndef EIGEN_NO_DEBUG
965 #define EIGEN_NO_DEBUG
966 #endif
967
968 #ifdef EIGEN_INTERNAL_DEBUGGING
969 #undef EIGEN_INTERNAL_DEBUGGING
970 #endif
971
972 #ifdef EIGEN_EXCEPTIONS
973 #undef EIGEN_EXCEPTIONS
974 #endif
975#endif
976
977#if defined(SYCL_DEVICE_ONLY)
978 #ifndef EIGEN_DONT_VECTORIZE
979 #define EIGEN_DONT_VECTORIZE
980 #endif
981 #define EIGEN_DEVICE_FUNC __attribute__((flatten)) __attribute__((always_inline))
982// All functions callable from CUDA/HIP code must be qualified with __device__
983#elif defined(EIGEN_GPUCC)
984 #define EIGEN_DEVICE_FUNC __host__ __device__
985#else
986 #define EIGEN_DEVICE_FUNC
987#endif
988
989
990// this macro allows to get rid of linking errors about multiply defined functions.
991// - static is not very good because it prevents definitions from different object files to be merged.
992// So static causes the resulting linked executable to be bloated with multiple copies of the same function.
993// - inline is not perfect either as it unwantedly hints the compiler toward inlining the function.
994#define EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_DEVICE_FUNC
995#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_DEVICE_FUNC inline
996
997#ifdef NDEBUG
998# ifndef EIGEN_NO_DEBUG
999# define EIGEN_NO_DEBUG
1000# endif
1001#endif
1002
1003// eigen_plain_assert is where we implement the workaround for the assert() bug in GCC <= 4.3, see bug 89
1004#ifdef EIGEN_NO_DEBUG
1005 #ifdef SYCL_DEVICE_ONLY // used to silence the warning on SYCL device
1006 #define eigen_plain_assert(x) EIGEN_UNUSED_VARIABLE(x)
1007 #else
1008 #define eigen_plain_assert(x)
1009 #endif
1010#else
1011 #if EIGEN_SAFE_TO_USE_STANDARD_ASSERT_MACRO
1012 namespace Eigen {
1013 namespace internal {
1014 inline bool copy_bool(bool b) { return b; }
1015 }
1016 }
1017 #define eigen_plain_assert(x) assert(x)
1018 #else
1019 // work around bug 89
1020 #include <cstdlib> // for abort
1021 #include <iostream> // for std::cerr
1022
1023 namespace Eigen {
1024 namespace internal {
1025 // trivial function copying a bool. Must be EIGEN_DONT_INLINE, so we implement it after including Eigen headers.
1026 // see bug 89.
1027 namespace {
1028 EIGEN_DONT_INLINE bool copy_bool(bool b) { return b; }
1029 }
1030 inline void assert_fail(const char *condition, const char *function, const char *file, int line)
1031 {
1032 std::cerr << "assertion failed: " << condition << " in function " << function << " at " << file << ":" << line << std::endl;
1033 abort();
1034 }
1035 }
1036 }
1037 #define eigen_plain_assert(x) \
1038 do { \
1039 if(!Eigen::internal::copy_bool(x)) \
1040 Eigen::internal::assert_fail(EIGEN_MAKESTRING(x), __PRETTY_FUNCTION__, __FILE__, __LINE__); \
1041 } while(false)
1042 #endif
1043#endif
1044
1045// eigen_assert can be overridden
1046#ifndef eigen_assert
1047#define eigen_assert(x) eigen_plain_assert(x)
1048#endif
1049
1050#ifdef EIGEN_INTERNAL_DEBUGGING
1051#define eigen_internal_assert(x) eigen_assert(x)
1052#else
1053#define eigen_internal_assert(x)
1054#endif
1055
1056#ifdef EIGEN_NO_DEBUG
1057#define EIGEN_ONLY_USED_FOR_DEBUG(x) EIGEN_UNUSED_VARIABLE(x)
1058#else
1059#define EIGEN_ONLY_USED_FOR_DEBUG(x)
1060#endif
1061
1062#ifndef EIGEN_NO_DEPRECATED_WARNING
1063 #if EIGEN_COMP_GNUC
1064 #define EIGEN_DEPRECATED __attribute__((deprecated))
1065 #elif EIGEN_COMP_MSVC
1066 #define EIGEN_DEPRECATED __declspec(deprecated)
1067 #else
1068 #define EIGEN_DEPRECATED
1069 #endif
1070#else
1071 #define EIGEN_DEPRECATED
1072#endif
1073
1074#if EIGEN_COMP_GNUC
1075#define EIGEN_UNUSED __attribute__((unused))
1076#else
1077#define EIGEN_UNUSED
1078#endif
1079
1080// Suppresses 'unused variable' warnings.
1081namespace Eigen {
1082 namespace internal {
1083 template<typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ignore_unused_variable(const T&) {}
1084 }
1085}
1086#define EIGEN_UNUSED_VARIABLE(var) Eigen::internal::ignore_unused_variable(var);
1087
1088#if !defined(EIGEN_ASM_COMMENT)
1089 #if EIGEN_COMP_GNUC && (EIGEN_ARCH_i386_OR_x86_64 || EIGEN_ARCH_ARM_OR_ARM64)
1090 #define EIGEN_ASM_COMMENT(X) __asm__("#" X)
1091 #else
1092 #define EIGEN_ASM_COMMENT(X)
1093 #endif
1094#endif
1095
1096
1097// Acts as a barrier preventing operations involving `X` from crossing. This
1098// occurs, for example, in the fast rounding trick where a magic constant is
1099// added then subtracted, which is otherwise compiled away with -ffast-math.
1100//
1101// See bug 1674
1102#if !defined(EIGEN_OPTIMIZATION_BARRIER)
1103 #if EIGEN_COMP_GNUC
1104 // According to https://gcc.gnu.org/onlinedocs/gcc/Constraints.html:
1105 // X: Any operand whatsoever.
1106 // r: A register operand is allowed provided that it is in a general
1107 // register.
1108 // g: Any register, memory or immediate integer operand is allowed, except
1109 // for registers that are not general registers.
1110 // w: (AArch32/AArch64) Floating point register, Advanced SIMD vector
1111 // register or SVE vector register.
1112 // x: (SSE) Any SSE register.
1113 // (AArch64) Like w, but restricted to registers 0 to 15 inclusive.
1114 // v: (PowerPC) An Altivec vector register.
1115 // wa:(PowerPC) A VSX register.
1116 //
1117 // "X" (uppercase) should work for all cases, though this seems to fail for
1118 // some versions of GCC for arm/aarch64 with
1119 // "error: inconsistent operand constraints in an 'asm'"
1120 // Clang x86_64/arm/aarch64 seems to require "g" to support both scalars and
1121 // vectors, otherwise
1122 // "error: non-trivial scalar-to-vector conversion, possible invalid
1123 // constraint for vector type"
1124 //
1125 // GCC for ppc64le generates an internal compiler error with x/X/g.
1126 // GCC for AVX generates an internal compiler error with X.
1127 //
1128 // Tested on icc/gcc/clang for sse, avx, avx2, avx512dq
1129 // gcc for arm, aarch64,
1130 // gcc for ppc64le,
1131 // both vectors and scalars.
1132 //
1133 // Note that this is restricted to plain types - this will not work
1134 // directly for std::complex<T>, Eigen::half, Eigen::bfloat16. For these,
1135 // you will need to apply to the underlying POD type.
1136 #if EIGEN_ARCH_PPC && EIGEN_COMP_GNUC_STRICT
1137 // This seems to be broken on clang. Packet4f is loaded into a single
1138 // register rather than a vector, zeroing out some entries. Integer
1139 // types also generate a compile error.
1140 // General, Altivec, VSX.
1141 #define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+r,v,wa" (X));
1142 #elif EIGEN_ARCH_ARM_OR_ARM64
1143 // General, NEON.
1144 #define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,w" (X));
1145 #elif EIGEN_ARCH_i386_OR_x86_64
1146 // General, SSE.
1147 #define EIGEN_OPTIMIZATION_BARRIER(X) __asm__ ("" : "+g,x" (X));
1148 #else
1149 // Not implemented for other architectures.
1150 #define EIGEN_OPTIMIZATION_BARRIER(X)
1151 #endif
1152 #else
1153 // Not implemented for other compilers.
1154 #define EIGEN_OPTIMIZATION_BARRIER(X)
1155 #endif
1156#endif
1157
1158#if EIGEN_COMP_MSVC
1159 // NOTE MSVC often gives C4127 warnings with compiletime if statements. See bug 1362.
1160 // This workaround is ugly, but it does the job.
1161# define EIGEN_CONST_CONDITIONAL(cond) (void)0, cond
1162#else
1163# define EIGEN_CONST_CONDITIONAL(cond) cond
1164#endif
1165
1166#ifdef EIGEN_DONT_USE_RESTRICT_KEYWORD
1167 #define EIGEN_RESTRICT
1168#endif
1169#ifndef EIGEN_RESTRICT
1170 #define EIGEN_RESTRICT __restrict
1171#endif
1172
1173
1174#ifndef EIGEN_DEFAULT_IO_FORMAT
1175#ifdef EIGEN_MAKING_DOCS
1176// format used in Eigen's documentation
1177// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
1178#define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat(3, 0, " ", "\n", "", "")
1179#else
1180#define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat()
1181#endif
1182#endif
1183
1184// just an empty macro !
1185#define EIGEN_EMPTY
1186
1187
1188// When compiling CUDA/HIP device code with NVCC or HIPCC
1189// pull in math functions from the global namespace.
1190// In host mode, and when device code is compiled with clang,
1191// use the std versions.
1192#if (defined(EIGEN_CUDA_ARCH) && defined(__NVCC__)) || defined(EIGEN_HIP_DEVICE_COMPILE)
1193 #define EIGEN_USING_STD(FUNC) using ::FUNC;
1194#else
1195 #define EIGEN_USING_STD(FUNC) using std::FUNC;
1196#endif
1197
1198#if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC < 1900 || (EIGEN_COMP_MSVC == 1900 && EIGEN_COMP_NVCC))
1199 // For older MSVC versions, as well as 1900 && CUDA 8, using the base operator is necessary,
1200 // otherwise we get duplicate definition errors
1201 // For later MSVC versions, we require explicit operator= definition, otherwise we get
1202 // use of implicitly deleted operator errors.
1203 // (cf Bugs 920, 1000, 1324, 2291)
1204 #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
1205 using Base::operator =;
1206#elif EIGEN_COMP_CLANG // workaround clang bug (see http://forum.kde.org/viewtopic.php?f=74&t=102653)
1207 #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
1208 using Base::operator =; \
1209 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) { Base::operator=(other); return *this; } \
1210 template <typename OtherDerived> \
1211 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const DenseBase<OtherDerived>& other) { Base::operator=(other.derived()); return *this; }
1212#else
1213 #define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
1214 using Base::operator =; \
1215 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator=(const Derived& other) \
1216 { \
1217 Base::operator=(other); \
1218 return *this; \
1219 }
1220#endif
1221
1222
1223/**
1224 * \internal
1225 * \brief Macro to explicitly define the default copy constructor.
1226 * This is necessary, because the implicit definition is deprecated if the copy-assignment is overridden.
1227 */
1228#if EIGEN_HAS_CXX11
1229#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS) CLASS(const CLASS&) = default;
1230#else
1231#define EIGEN_DEFAULT_COPY_CONSTRUCTOR(CLASS)
1232#endif
1233
1234
1235
1236/** \internal
1237 * \brief Macro to manually inherit assignment operators.
1238 * This is necessary, because the implicitly defined assignment operator gets deleted when a custom operator= is defined.
1239 * With C++11 or later this also default-implements the copy-constructor
1240 */
1241#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
1242 EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
1243 EIGEN_DEFAULT_COPY_CONSTRUCTOR(Derived)
1244
1245/** \internal
1246 * \brief Macro to manually define default constructors and destructors.
1247 * This is necessary when the copy constructor is re-defined.
1248 * For empty helper classes this should usually be protected, to avoid accidentally creating empty objects.
1249 *
1250 * Hiding the default destructor lead to problems in C++03 mode together with boost::multiprecision
1251 */
1252#if EIGEN_HAS_CXX11
1253#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived) \
1254 Derived() = default; \
1255 ~Derived() = default;
1256#else
1257#define EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(Derived) \
1258 Derived() {}; \
1259 /* ~Derived() {}; */
1260#endif
1261
1262
1263
1264
1265
1266/**
1267* Just a side note. Commenting within defines works only by documenting
1268* behind the object (via '!<'). Comments cannot be multi-line and thus
1269* we have these extra long lines. What is confusing doxygen over here is
1270* that we use '\' and basically have a bunch of typedefs with their
1271* documentation in a single line.
1272**/
1273
1274#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
1275 typedef typename Eigen::internal::traits<Derived>::Scalar Scalar; /*!< \brief Numeric type, e.g. float, double, int or std::complex<float>. */ \
1276 typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; /*!< \brief The underlying numeric type for composed scalar types. \details In cases where Scalar is e.g. std::complex<T>, T were corresponding to RealScalar. */ \
1277 typedef typename Base::CoeffReturnType CoeffReturnType; /*!< \brief The return type for coefficient access. \details Depending on whether the object allows direct coefficient access (e.g. for a MatrixXd), this type is either 'const Scalar&' or simply 'Scalar' for objects that do not allow direct coefficient access. */ \
1278 typedef typename Eigen::internal::ref_selector<Derived>::type Nested; \
1279 typedef typename Eigen::internal::traits<Derived>::StorageKind StorageKind; \
1280 typedef typename Eigen::internal::traits<Derived>::StorageIndex StorageIndex; \
1281 enum CompileTimeTraits \
1282 { RowsAtCompileTime = Eigen::internal::traits<Derived>::RowsAtCompileTime, \
1283 ColsAtCompileTime = Eigen::internal::traits<Derived>::ColsAtCompileTime, \
1284 Flags = Eigen::internal::traits<Derived>::Flags, \
1285 SizeAtCompileTime = Base::SizeAtCompileTime, \
1286 MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \
1287 IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \
1288 using Base::derived; \
1289 using Base::const_cast_derived;
1290
1291
1292// FIXME Maybe the EIGEN_DENSE_PUBLIC_INTERFACE could be removed as importing PacketScalar is rarely needed
1293#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived) \
1294 EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
1295 typedef typename Base::PacketScalar PacketScalar;
1296
1297
1298#define EIGEN_PLAIN_ENUM_MIN(a,b) (((int)a <= (int)b) ? (int)a : (int)b)
1299#define EIGEN_PLAIN_ENUM_MAX(a,b) (((int)a >= (int)b) ? (int)a : (int)b)
1300
1301// EIGEN_SIZE_MIN_PREFER_DYNAMIC gives the min between compile-time sizes. 0 has absolute priority, followed by 1,
1302// followed by Dynamic, followed by other finite values. The reason for giving Dynamic the priority over
1303// finite values is that min(3, Dynamic) should be Dynamic, since that could be anything between 0 and 3.
1304#define EIGEN_SIZE_MIN_PREFER_DYNAMIC(a,b) (((int)a == 0 || (int)b == 0) ? 0 \
1305 : ((int)a == 1 || (int)b == 1) ? 1 \
1306 : ((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \
1307 : ((int)a <= (int)b) ? (int)a : (int)b)
1308
1309// EIGEN_SIZE_MIN_PREFER_FIXED is a variant of EIGEN_SIZE_MIN_PREFER_DYNAMIC comparing MaxSizes. The difference is that finite values
1310// now have priority over Dynamic, so that min(3, Dynamic) gives 3. Indeed, whatever the actual value is
1311// (between 0 and 3), it is not more than 3.
1312#define EIGEN_SIZE_MIN_PREFER_FIXED(a,b) (((int)a == 0 || (int)b == 0) ? 0 \
1313 : ((int)a == 1 || (int)b == 1) ? 1 \
1314 : ((int)a == Dynamic && (int)b == Dynamic) ? Dynamic \
1315 : ((int)a == Dynamic) ? (int)b \
1316 : ((int)b == Dynamic) ? (int)a \
1317 : ((int)a <= (int)b) ? (int)a : (int)b)
1318
1319// see EIGEN_SIZE_MIN_PREFER_DYNAMIC. No need for a separate variant for MaxSizes here.
1320#define EIGEN_SIZE_MAX(a,b) (((int)a == Dynamic || (int)b == Dynamic) ? Dynamic \
1321 : ((int)a >= (int)b) ? (int)a : (int)b)
1322
1323#define EIGEN_LOGICAL_XOR(a,b) (((a) || (b)) && !((a) && (b)))
1324
1325#define EIGEN_IMPLIES(a,b) (!(a) || (b))
1326
1327#if EIGEN_HAS_BUILTIN(__builtin_expect) || EIGEN_COMP_GNUC
1328#define EIGEN_PREDICT_FALSE(x) (__builtin_expect(x, false))
1329#define EIGEN_PREDICT_TRUE(x) (__builtin_expect(false || (x), true))
1330#else
1331#define EIGEN_PREDICT_FALSE(x) (x)
1332#define EIGEN_PREDICT_TRUE(x) (x)
1333#endif
1334
1335// the expression type of a standard coefficient wise binary operation
1336#define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS,RHS,OPNAME) \
1337 CwiseBinaryOp< \
1338 EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)< \
1339 typename internal::traits<LHS>::Scalar, \
1340 typename internal::traits<RHS>::Scalar \
1341 >, \
1342 const LHS, \
1343 const RHS \
1344 >
1345
1346#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,OPNAME) \
1347 template<typename OtherDerived> \
1348 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \
1349 (METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
1350 { \
1351 return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME)(derived(), other.derived()); \
1352 }
1353
1354#define EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,TYPEA,TYPEB) \
1355 (Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<TYPEA,TYPEB,EIGEN_CAT(EIGEN_CAT(Eigen::internal::scalar_,OPNAME),_op)<TYPEA,TYPEB> > >::value)
1356
1357#define EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(EXPR,SCALAR,OPNAME) \
1358 CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<typename internal::traits<EXPR>::Scalar,SCALAR>, const EXPR, \
1359 const typename internal::plain_constant_type<EXPR,SCALAR>::type>
1360
1361#define EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(SCALAR,EXPR,OPNAME) \
1362 CwiseBinaryOp<EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)<SCALAR,typename internal::traits<EXPR>::Scalar>, \
1363 const typename internal::plain_constant_type<EXPR,SCALAR>::type, const EXPR>
1364
1365// Workaround for MSVC 2010 (see ML thread "patch with compile for for MSVC 2010")
1366#if EIGEN_COMP_MSVC_STRICT && (EIGEN_COMP_MSVC_STRICT<=1600)
1367#define EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(X) typename internal::enable_if<true,X>::type
1368#else
1369#define EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(X) X
1370#endif
1371
1372#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME) \
1373 template <typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE \
1374 EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,Scalar,T)>::type,OPNAME))\
1375 (METHOD)(const T& scalar) const { \
1376 typedef typename internal::promote_scalar_arg<Scalar,T,EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,Scalar,T)>::type PromotedT; \
1377 return EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(Derived,PromotedT,OPNAME)(derived(), \
1378 typename internal::plain_constant_type<Derived,PromotedT>::type(derived().rows(), derived().cols(), internal::scalar_constant_op<PromotedT>(scalar))); \
1379 }
1380
1381#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \
1382 template <typename T> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE friend \
1383 EIGEN_MSVC10_WORKAROUND_BINARYOP_RETURN_TYPE(const EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(typename internal::promote_scalar_arg<Scalar EIGEN_COMMA T EIGEN_COMMA EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,T,Scalar)>::type,Derived,OPNAME)) \
1384 (METHOD)(const T& scalar, const StorageBaseType& matrix) { \
1385 typedef typename internal::promote_scalar_arg<Scalar,T,EIGEN_SCALAR_BINARY_SUPPORTED(OPNAME,T,Scalar)>::type PromotedT; \
1386 return EIGEN_SCALAR_BINARYOP_EXPR_RETURN_TYPE(PromotedT,Derived,OPNAME)( \
1387 typename internal::plain_constant_type<Derived,PromotedT>::type(matrix.derived().rows(), matrix.derived().cols(), internal::scalar_constant_op<PromotedT>(scalar)), matrix.derived()); \
1388 }
1389
1390#define EIGEN_MAKE_SCALAR_BINARY_OP(METHOD,OPNAME) \
1391 EIGEN_MAKE_SCALAR_BINARY_OP_ONTHELEFT(METHOD,OPNAME) \
1392 EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD,OPNAME)
1393
1394
1395#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(EIGEN_CUDA_ARCH) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL) && !defined(EIGEN_HIP_DEVICE_COMPILE)
1396 #define EIGEN_EXCEPTIONS
1397#endif
1398
1399
1400#ifdef EIGEN_EXCEPTIONS
1401# define EIGEN_THROW_X(X) throw X
1402# define EIGEN_THROW throw
1403# define EIGEN_TRY try
1404# define EIGEN_CATCH(X) catch (X)
1405#else
1406# if defined(EIGEN_CUDA_ARCH)
1407# define EIGEN_THROW_X(X) asm("trap;")
1408# define EIGEN_THROW asm("trap;")
1409# elif defined(EIGEN_HIP_DEVICE_COMPILE)
1410# define EIGEN_THROW_X(X) asm("s_trap 0")
1411# define EIGEN_THROW asm("s_trap 0")
1412# else
1413# define EIGEN_THROW_X(X) std::abort()
1414# define EIGEN_THROW std::abort()
1415# endif
1416# define EIGEN_TRY if (true)
1417# define EIGEN_CATCH(X) else
1418#endif
1419
1420
1421#if EIGEN_HAS_CXX11_NOEXCEPT
1422# define EIGEN_INCLUDE_TYPE_TRAITS
1423# define EIGEN_NOEXCEPT noexcept
1424# define EIGEN_NOEXCEPT_IF(x) noexcept(x)
1425# define EIGEN_NO_THROW noexcept(true)
1426# define EIGEN_EXCEPTION_SPEC(X) noexcept(false)
1427#else
1428# define EIGEN_NOEXCEPT
1429# define EIGEN_NOEXCEPT_IF(x)
1430# define EIGEN_NO_THROW throw()
1431# if EIGEN_COMP_MSVC || EIGEN_COMP_CXXVER>=17
1432 // MSVC does not support exception specifications (warning C4290),
1433 // and they are deprecated in c++11 anyway. This is even an error in c++17.
1434# define EIGEN_EXCEPTION_SPEC(X) throw()
1435# else
1436# define EIGEN_EXCEPTION_SPEC(X) throw(X)
1437# endif
1438#endif
1439
1440#if EIGEN_HAS_VARIADIC_TEMPLATES
1441// The all function is used to enable a variadic version of eigen_assert which can take a parameter pack as its input.
1442namespace Eigen {
1443namespace internal {
1444
1445inline bool all(){ return true; }
1446
1447template<typename T, typename ...Ts>
1448bool all(T t, Ts ... ts){ return t && all(ts...); }
1449
1450}
1451}
1452#endif
1453
1454#if EIGEN_HAS_CXX11_OVERRIDE_FINAL
1455// provide override and final specifiers if they are available:
1456# define EIGEN_OVERRIDE override
1457# define EIGEN_FINAL final
1458#else
1459# define EIGEN_OVERRIDE
1460# define EIGEN_FINAL
1461#endif
1462
1463// Wrapping #pragma unroll in a macro since it is required for SYCL
1464#if defined(SYCL_DEVICE_ONLY)
1465 #if defined(_MSC_VER)
1466 #define EIGEN_UNROLL_LOOP __pragma(unroll)
1467 #else
1468 #define EIGEN_UNROLL_LOOP _Pragma("unroll")
1469 #endif
1470#else
1471 #define EIGEN_UNROLL_LOOP
1472#endif
1473
1474#endif // EIGEN_MACROS_H
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_DONT_INLINE
Definition: Macros.h:950
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file
Definition: ThirdPartyNotices.txt:195
FMT_NORETURN FMT_API void assert_fail(const char *file, int line, const char *message)
bool copy_bool(bool b)
Definition: Macros.h:1014
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void ignore_unused_variable(const T &)
Definition: Macros.h:1083
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
Definition: Eigen_Colamd.h:50
b
Definition: data.h:44