This forum has been archived. All content is frozen. Please use KDE Discuss instead.

comma initialize large matrix with long expressions error

Tags: None
(comma "," separated)
balabi
Registered Member
Posts
2
Karma
0
Dear developers:
I have to initialize a large matrix, and the matrix elemens are long expressions. But I found there seems exists a limit for comma initialization in Eigen.
If the matrix is large, and pass too many expression to comma initialization, the compilation will just aborted. For example, using mingw, I got cc1plus.exe stop work. I also tried intel parallel studio, the error is the same.

Here is my source file https://pastebin.com/Fg2i4ASD

I want to know how to successfully compile my source file.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
You are abusing the syntax ! I guess those lines have been generated procedurally, then better use a for loop with classical indexed accesses or row-by-row (or column-by-column) init:

Code: Select all
for i
  for j
    A(i,j) = ...;

for i
  A.row(i) << ...;

for j
  A.col(j) << ...;


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]