aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Meta.h
Commit message (Collapse)AuthorAge
* Fix duplicate definitions on MacGravatar Dan Miller2021-07-01
|
* Fix checking of version number for mingw.Gravatar Antonio Sanchez2021-06-11
| | | | | | | | | | | MinGW spits out version strings like: `x86_64-w64-mingw32-g++ (GCC) 10-win32 20210110`, which causes the version extraction to fail. Added support for this with tests. Also added `make_unsigned` for `long long`, since mingw seems to use that for `uint64_t`. Related to #2268. CMake and build passes for me after this.
* Fix CUDA constexpr issues for numeric_limits.Gravatar Antonio Sanchez2021-03-30
| | | | | | | | | | | | | | | | Some CUDA/HIP constants fail on device with `constexpr` since they internally rely on non-constexpr functions, e.g. ``` \#define CUDART_INF_F __int_as_float(0x7f800000) ``` This fails for cuda-clang (though passes with nvcc). These constants are currently used by `device::numeric_limits`. For portability, we need to remove `constexpr` from the affected functions. For C++11 or higher, we should be able to rely on the `std::numeric_limits` versions anyways, since the methods themselves are now `constexpr`, so should be supported on device (clang/hipcc natively, nvcc with `--expr-relaxed-constexpr`).
* Revert "Revert "Adds EIGEN_CONSTEXPR and EIGEN_NOEXCEPT to rows(), cols(), ↵Gravatar Steve Bronder2021-03-24
| | | | | | innerStride(), outerStride(), and size()"" This reverts commit 5f0b4a4010af4cbf6161a0d1a03a747addc44a5d.
* Revert "Adds EIGEN_CONSTEXPR and EIGEN_NOEXCEPT to rows(), cols(), ↵Gravatar David Tellenbach2021-03-05
| | | | | | | innerStride(), outerStride(), and size()" This reverts commit 6cbb3038ac48cb5fe17eba4dfbf26e3e798041f1 because it breaks clang-10 builds on x86 and aarch64 when C++11 is enabled.
* Adds EIGEN_CONSTEXPR and EIGEN_NOEXCEPT to rows(), cols(), innerStride(), ↵Gravatar Steve Bronder2021-03-04
| | | | outerStride(), and size()
* Add `invoke_result` and eliminate `result_of` warnings for C++17+.Gravatar Antonio Sanchez2021-02-24
| | | | | | | | | | | | | | | | | The `std::result_of` meta struct is deprecated in C++17 and removed in C++20. It was still slipping through due to a faulty definition of `EIGEN_HAS_STD_RESULT_OF`. Added a new macro `EIGEN_HAS_STD_INVOKE_RESULT` and `Eigen::internal::invoke_result` implementation with fallback for pre C++17. Replaces the `result_of` definition with one based on `std::invoke_result` for C++17 and higher. For completeness, added nullary op support for c++03. Fixes #1850.
* Define internal::make_unsigned for [unsigned]long long on macOS.Gravatar David Tellenbach2021-02-17
| | | | | | | | | | macOS defines int64_t as long long even for C++03 and therefore expects a template specialization internal::make_unsigned<long long>, for C++03. Since other platforms define int64_t as long for C++03 we cannot add the specialization for all cases.
* Include `<cstdint>` in one place, remove custom typedefsGravatar Antonio Sanchez2021-01-26
| | | | | | | | | | | | | | 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.
* Add support for Armv8.2-a __fp16Gravatar David Tellenbach2020-10-28
| | | | | | | | | | | | | | | Armv8.2-a provides a native half-precision floating point (__fp16 aka. float16_t). This patch introduces * __fp16 as underlying type of Eigen::half if this type is available * the packet types Packet4hf and Packet8hf representing float16x4_t and float16x8_t respectively * packet-math for the above packets with corresponding scalar type Eigen::half The packet-math functionality has been implemented by Ashutosh Sharma <ashutosh.sharma@amperecomputing.com>. This closes #1940.
* remove semi triggering -Wextra-semi-stmtGravatar Alexander Neumann2020-09-07
|
* Replace the call to int64_t in the blasutil test by explicit typesGravatar David Tellenbach2020-08-14
| | | | | | | | | Some platforms define int64_t to be long long even for C++03. If this is the case we miss the definition of internal::make_unsigned for this type. If we just define the template we get duplicated definitions errors for platforms defining int64_t as signed long for C++03. We need to find a way to distinguish both cases at compile-time.
* Make numext::as_uint a device function.Gravatar Rasmus Munk Larsen2020-07-22
|
* Add numeric_limits min and max for boolGravatar Akshay Naresh Modi2020-04-06
| | | | This will allow (among other things) computation of argmax and argmin of bool tensors
* Added Eigen::numext typedefs for uint8_t, int8_t, uint16_t and int16_tGravatar Joel Holdsworth2019-12-11
|
* SparseRef: Fixed alignment warning on ARM GCCGravatar Joel Holdsworth2019-11-07
|
* bug #1752: make is_convertible equivalent to the std c++11 equivalent and ↵Gravatar Gael Guennebaud2019-10-10
| | | | fallback to std::is_convertible when c++11 is enabled.
* Tensor block evaluation V2 support for unary/binary/broadcstingGravatar Eugene Zhulenev2019-09-24
|
* bug #1736: fix compilation issue with A(all,{1,2}).col(j) by implementing ↵Gravatar Gael Guennebaud2019-09-11
| | | | true compile-time "if" for block_evaluator<>::coeff(i)/coeffRef(i)
* PR 571: Implements an accurate argument reduction algorithm for huge inputs ↵Gravatar Gael Guennebaud2019-01-14
| | | | | | | | | of sin/cos and call it instead of falling back to std::sin/std::cos. This makes both the small and huge argument cases faster because: - for small inputs this removes the last pselect - for large inputs only the reduction part follows a scalar path, the rest use the same SIMD path as the small-argument case.
* Do not rely on the compiler generating __device__ functions for constexpr in ↵Gravatar Rasmus Munk Larsen2018-10-22
| | | | | | | | | | | | | | | | | Cuda (via EIGEN_CONSTEXPR_ARE_DEVICE_FUNC. This breaks several target in the TensorFlow Cuda build, e.g., INFO: From Compiling tensorflow/core/kernels/maxpooling_op_gpu.cu.cc: /b/f/w/run/external/eigen_archive/Eigen/src/Core/arch/GPU/Half.h(197): error: calling a __host__ function("std::equal_to<float> ::operator () const") from a __global__ function("tensorflow::_NV_ANON_NAMESPACE::MaxPoolGradBackwardNoMaskNHWC< ::Eigen::half> ") is not allowed /b/f/w/run/external/eigen_archive/Eigen/src/Core/arch/GPU/Half.h(197): error: identifier "std::equal_to<float> ::operator () const" is undefined in device code" /b/f/w/run/external/eigen_archive/Eigen/src/Core/arch/GPU/Half.h(197): error: calling a __host__ function("std::equal_to<float> ::operator () const") from a __global__ function("tensorflow::_NV_ANON_NAMESPACE::MaxPoolGradBackwardNoMaskNCHW< ::Eigen::half> ") is not allowed /b/f/w/run/external/eigen_archive/Eigen/src/Core/arch/GPU/Half.h(197): error: identifier "std::equal_to<float> ::operator () const" is undefined in device code 4 errors detected in the compilation of "/tmp/tmpxft_00000011_00000000-6_maxpooling_op_gpu.cu.cpp1.ii". ERROR: /tmpfs/tensor_flow/tensorflow/core/kernels/BUILD:3753:1: output 'tensorflow/core/kernels/_objs/pooling_ops_gpu/maxpooling_op_gpu.cu.pic.o' was not created ERROR: /tmpfs/tensor_flow/tensorflow/core/kernels/BUILD:3753:1: Couldn't build file tensorflow/core/kernels/_objs/pooling_ops_gpu/maxpooling_op_gpu.cu.pic.o: not all outputs were created or valid
* bug #1584: Improve random (avoid undefined behavior).Gravatar Alexey Frunze2018-08-08
|
* bug #1580: Fix cuda clang build. STL is not supported, so std::equal_to and ↵Gravatar Rasmus Munk Larsen2018-08-01
| | | | | | | std::not_equal breaks compilation. Update the definition of EIGEN_CONSTEXPR_ARE_DEVICE_FUNC to exclude clang. See also PR 450.
* bug #1571: fix is_convertible<from,to> with "from" a reference.Gravatar Gael Guennebaud2018-07-13
|
* Forward declaring std::array does not work with all std libs, so let's just ↵Gravatar Gael Guennebaud2018-07-13
| | | | include <array>
* Fix compilation regarding std::arrayGravatar Gael Guennebaud2018-07-12
|
* Merged in deven-amd/eigen (pull request PR-402)Gravatar Gael Guennebaud2018-07-12
|\ | | | | | | Adding support for using Eigen in HIP kernels.
* | Make is_convertible more robust and conformant to std::is_convertibleGravatar Gael Guennebaud2018-07-12
| |
| * merging updates from upstreamGravatar Deven Desai2018-07-11
| |\ | |/ |/|
| * updates based on PR feedbackGravatar Deven Desai2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two major changes (and a few minor ones which are not listed here...see PR discussion for details) 1. Eigen::half implementations for HIP and CUDA have been merged. This means that - `CUDA/Half.h` and `HIP/hcc/Half.h` got merged to a new file `GPU/Half.h` - `CUDA/PacketMathHalf.h` and `HIP/hcc/PacketMathHalf.h` got merged to a new file `GPU/PacketMathHalf.h` - `CUDA/TypeCasting.h` and `HIP/hcc/TypeCasting.h` got merged to a new file `GPU/TypeCasting.h` After this change the `HIP/hcc` directory only contains one file `math_constants.h`. That will go away too once that file becomes a part of the HIP install. 2. new macros EIGEN_GPUCC, EIGEN_GPU_COMPILE_PHASE and EIGEN_HAS_GPU_FP16 have been added and the code has been updated to use them where appropriate. - `EIGEN_GPUCC` is the same as `(EIGEN_CUDACC || EIGEN_HIPCC)` - `EIGEN_GPU_DEVICE_COMPILE` is the same as `(EIGEN_CUDA_ARCH || EIGEN_HIP_DEVICE_COMPILE)` - `EIGEN_HAS_GPU_FP16` is the same as `(EIGEN_HAS_CUDA_FP16 or EIGEN_HAS_HIP_FP16)`
| * syncing this fork with upstreamGravatar Deven Desai2018-06-13
| |\
* | | Extend CUDA support to matrix inversion and selfadjointeigensolverGravatar Andrea Bocci2018-06-11
| |/ |/|
* | Don't use std::equal_to inside cuda kernels since it's not supported.Gravatar Benoit Steiner2018-06-07
| |
| * Adding support for using Eigen in HIP kernels.Gravatar Deven Desai2018-06-06
|/ | | | | | | | | This commit enables the use of Eigen on HIP kernels / AMD GPUs. Support has been added along the same lines as what already exists for using Eigen in CUDA kernels / NVidia GPUs. Application code needs to explicitly define EIGEN_USE_HIP when using Eigen in HIP kernels. This is because some of the CUDA headers get picked up by default during Eigen compile (irrespective of whether or not the underlying compiler is CUDACC/NVCC, for e.g. Eigen/src/Core/arch/CUDA/Half.h). In order to maintain this behavior, the EIGEN_USE_HIP macro is used to switch to using the HIP version of those header files (see Eigen/Core and unsupported/Eigen/CXX11/Tensor) Use the "-DEIGEN_TEST_HIP" cmake option to enable the HIP specific unit tests.
* Fix internal::is_integral<size_t/ptrdiff_t> with MSVC 2013 and older.Gravatar Gael Guennebaud2018-05-22
|
* Add specializations of is_arithmetic for long long in c++11Gravatar Gael Guennebaud2018-04-23
|
* fix linking issueGravatar Gael Guennebaud2018-04-13
|
* bug #1520: workaround some -Wfloat-equal warnings by calling std::equal_toGravatar Gael Guennebaud2018-04-11
|
* MIsc. source and comment typosGravatar luz.paz2018-03-11
| | | | Found using `codespell` and `grep` from downstream FreeCAD
* Add a EIGEN_NO_CUDA option, and introduce EIGEN_CUDACC and EIGEN_CUDA_ARCH ↵Gravatar Gael Guennebaud2017-07-17
| | | | aliases
* update has_ReturnType to be more consistent with other has_ helpersGravatar Gael Guennebaud2017-03-17
|
* Fall back is_integral to std::is_integral in c++11Gravatar Gael Guennebaud2017-02-13
|
* Fix vector indexing with uint64_tGravatar Jonathan Hseu2017-02-11
|
* Fix duplicates of array_size bewteen unsupported and CoreGravatar Gael Guennebaud2017-01-25
|
* Large code refactoring:Gravatar Gael Guennebaud2017-01-11
| | | | | | - generalize some utilities and move them to Meta (size(), array_size()) - move handling of all and single indices to IndexedViewHelper.h - several cleanup changes
* Workaround for error in VS2012 with /clrGravatar Chun Wang2016-11-17
|
* Workaround a weird msvc 2012 compilation error.Gravatar Gael Guennebaud2016-09-05
|
* Fix compilation with MSVC 2012Gravatar Gael Guennebaud2016-09-02
|
* One more msvc fix iteration, the previous one was over-simplified for visualGravatar Gael Guennebaud2016-09-01
|
* Fix compilation with visual studioGravatar Gael Guennebaud2016-09-01
|