3,578 questions
2
votes
0
answers
121
views
MSVC Release + AVX-512 Eigen 5.0.0 with EIGEN_USE_MKL_ALL runs out of memory while linking with LTCG (SparseLU / forced inlining?)
I’m maintaining a large C++ project that uses Eigen for solving large sparse systems (via SparseLU) and other dense operations.
What changed
I upgraded from Eigen 3.4.1 to Eigen 5.0.0. After the ...
4
votes
1
answer
229
views
SIMD intrinsics slower than a single scalar implementation for toy example accessing Eigen matrices
I'm playing with SIMD and I failed to see any improvements using even in simplest example.
My toy program compute gradient of image (simple substract upper row from lower, scale by half and store ...
1
vote
1
answer
137
views
Compiler errors related to avx512 when upgrading from Eigen 3.4.0 to 5.0.0 on x86-64 RHEL cluster [closed]
I get the following error when compiling my C++17 project that uses the Eigen 5.0.1 library; I didn't see this error when using Eigen 3.4.0 on the same machine:
<path>/eigen-5.0.1/Eigen/src/Core/...
1
vote
1
answer
125
views
Iterative solvers with right-preconditioning: inconsistency between applying the preconditioner to the matrix, or to x
Summary
Using the Eigen library, I see significantly different numbers of BiCGStab iterations when I solve Ax = b with a right-preconditioner, i.e., [A M^(-1)] Mx = b, (a) by precomputing A M^(-1) ...
4
votes
1
answer
404
views
Why is Eigen C++ int matrix multiplication 10x slower than float multiplication (even slower than naive n^3 algorithm) when compiled with AVX512
I'm testing int matrix multiplication, but I found that it's extremely slow everywhere (python numpy using BLAS backend is also just as slow). Int matmul being slower than float matmul is ...
6
votes
0
answers
255
views
C++ Concept constraint requirement is not strict
Given the concept,
template <typename T>
concept CanFoo = requires(Eigen::Array2d const& x) {
{ T::Foo(x) } -> std::same_as<double>;
};
I expect, as someone new to actually ...
3
votes
0
answers
149
views
Eigen and small buffer optimization for matrices/vectors
I work on a C++ project which intensively uses Eigen's matrices/vectors. Their sizes are not known at compile time; however, in majority of cases, the number of elements is relatively small (say up to ...
0
votes
0
answers
77
views
Implementing a zero-extended vector/wrapper in Eigen
I would like to zero-extend a custom vector and give it a MatrixBase interface such that the extended vector can be used passed to the SparseLU solver.
Essentially, my attempt looks like this
...
0
votes
1
answer
67
views
Broadcasting arrays in Eigen along rows and columns to create a rectangular array
Is there a way to simultaneously broadcast rows and columns?
The following MWE does not work:
#include <iostream>
#include <Eigen/Dense>
int main() {
std::cout << "Hello, ...
0
votes
1
answer
212
views
What is the recommended way to perform blockwise operations in Eigen C++?
Say I have a PxQ matrix, Eigen::MatrixXd M, that represents K different RxQ-dimensional data stacked into rows (such that K*R==P). Such a scenario is common when we have data of the form:
<--- ...
0
votes
0
answers
100
views
Unable to build Eigen3 with Cmake (MSVC & Clang)
I want to build Eigen3 on windows from source (verison 3.4.0). I have two problems:
When I try to configure it with Visual Studio 17 2022 (MSVC 19.42.34438.0), It's telling me that CXX 11 is not ...
1
vote
1
answer
99
views
Eigen::Array colwise/rowwise broadcasting is asymmetric?
The following code multiplies the i-th column of A by the i-th element of V.
#include <Eigen/Core>
Eigen::Array<double, 8, 2>
f(const Eigen::Array<double, 8, 2>& A, const Eigen::...
1
vote
0
answers
122
views
Eigen + MKL on a cluster doesn't call GEMM for large matrix multiplications
I have a c++ code that uses Eigen for linear algebra calculations. The code runs on a cluster where there is a module with Intel MKL. I am completely ignorant of how to do it but I wanted to try to ...
1
vote
1
answer
116
views
Eigen parameter in c++ function
I use Eigen library in my C++ project and I don't understand how to pass an Eigen::Vector in parameter of my function.
I have in my main function :
Eigen::Vector<double, 3> direction_vector_ned =...
2
votes
1
answer
96
views
Eigen3 Matrix3d compile time initialization error
I'm writing code to implement rotation matrix/Direction Cosine Matrix (DCM).
I know the rotation angle at compile time, so in order to save on execution time, I wish to initialize the rotation matrix ...