diff options
author | Antonio Sanchez <cantonios@google.com> | 2021-01-26 13:39:34 -0800 |
---|---|---|
committer | Antonio Sanchez <cantonios@google.com> | 2021-01-26 14:23:05 -0800 |
commit | 3f4684f87da4303063a194c7340f1485d1752ae0 (patch) | |
tree | dac3259ba28becb0888c115756600c5762410f3e /Eigen/src/Core/arch/ZVector/PacketMath.h | |
parent | 0784d9f87b6602160e8f3e3d507d69999b92d539 (diff) |
Include `<cstdint>` in one place, remove custom typedefs
Originating from
[this SO issue](https://stackoverflow.com/questions/65901014/how-to-solve-this-all-error-2-in-this-case),
some win32 compilers define `__int32` as a `long`, but MinGW defines
`std::int32_t` as an `int`, leading to a type conflict.
To avoid this, we remove the custom `typedef` definitions for win32. The
Tensor module requires C++11 anyways, so we are guaranteed to have
included `<cstdint>` already in `Eigen/Core`.
Also re-arranged the headers to only include `<cstdint>` in one place to
avoid this type of error again.
Diffstat (limited to 'Eigen/src/Core/arch/ZVector/PacketMath.h')
-rwxr-xr-x | Eigen/src/Core/arch/ZVector/PacketMath.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Eigen/src/Core/arch/ZVector/PacketMath.h b/Eigen/src/Core/arch/ZVector/PacketMath.h index eb378a164..b10c1f6c7 100755 --- a/Eigen/src/Core/arch/ZVector/PacketMath.h +++ b/Eigen/src/Core/arch/ZVector/PacketMath.h @@ -10,8 +10,6 @@ #ifndef EIGEN_PACKET_MATH_ZVECTOR_H #define EIGEN_PACKET_MATH_ZVECTOR_H -#include <stdint.h> - namespace Eigen { namespace internal { @@ -51,10 +49,10 @@ typedef struct { #endif typedef union { - int32_t i[4]; - uint32_t ui[4]; - int64_t l[2]; - uint64_t ul[2]; + numext::int32_t i[4]; + numext::uint32_t ui[4]; + numext::int64_t l[2]; + numext::uint64_t ul[2]; double d[2]; float f[4]; Packet4i v4i; |