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

Preferred method of mapping row-major data

Tags: None
(comma "," separated)
dandelin
Registered Member
Posts
6
Karma
0
The tutorial on the map class (http://eigen.tuxfamily.org/api/TutorialMapClass.html) lists two ways of specifying that the data array is laid out in row-major format:

1) map the data to a row-major matrix
2) map the data to a col-major matrix, but specify that the outer stride should be one and the inner stride equal to the number of columns.

Are these methods equivalent, or are there scenarios when one would be more efficient than the other?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
The first method is preferred. InnerStride != 1 is not recommended performance-wise.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]