Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • eigen eigen
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 653
    • Issues 653
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigen
  • eigeneigen
  • Issues
  • #1334
Closed
Open
Created Dec 04, 2019 by Eigen Bugzilla@eigenbzReporter

Shorthand indexing for vectors

Submitted by Darcy

Assigned to Nobody

Link to original bugzilla bug (#1334)

Description

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).

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
Time tracking