This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1334 - Shorthand indexing for vectors
Summary: Shorthand indexing for vectors
Status: RESOLVED DUPLICATE of bug 329
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: unspecified
Hardware: All All
: Normal Feature Request
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-25 19:44 UTC by Darcy
Modified: 2019-12-04 16:28 UTC (History)
3 users (show)



Attachments

Description Darcy 2016-10-25 19:44:46 UTC
Requested feature:

Suppose we have an array of indices which correspond to indices in a numerical array (gather type operation).  It would be cool if I could write:

Eigen::ArrayXi values_i_want;
// Indices values_i_want (e.g. 0, 2, 3)

Eigen::VectorXd all_my_values;
// Values of global vector (0.0, 1.1, 2.2, 3.3, 4.4, ...)

Eigen::VectorXd values_i_have = all_my_values(values_i_want);
// values_i_have (0.0, 2.2, 3.3)

I think Matlab does something similar.

Would this be possible?  It could take advantage of some newer SIMD gather instructions on newer Intel CPUs if they are any good (I haven't tried them yet though).
Comment 1 Gael Guennebaud 2016-10-25 20:30:32 UTC

*** This bug has been marked as a duplicate of bug 329 ***
Comment 2 Nobody 2019-12-04 16:28:05 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1334.

Note You need to log in before you can comment on or make changes to this bug.