Indirect indexing (scatter/gather)
Issue #400
duplicate
Both Eigen and Fastor libraries provide indirect indexing (scatter/gather) notation, e.g. in Eigen:
Array<int, 1, 9> v{0, 1, 2, 3, 4, 5, 6, 7, 8};
v({6, 3, 0}) = v({0, 4, 8});
I couldn’t find a similar feature in Blaze. It is useful for concise notation of stencils and convolutions among others. Additionally, there are efficient AVX scatter/gather instructions and this is a high level way to invoke them.
Comments (3)
-
-
- changed status to duplicate
Duplicate of
#388. -
reporter Hi Klaus,
I’m sorry for asking the same question twice. I had a faint memory of asking a question before, but when I searched for “My issues” on this page, it returned no matches. I’ve been evaluating too many software libraries in recent months…
Thank you,
Paul
- Log in to comment
Hi Paul!
If I’m not mistaken you have asked the same question in issue #388. As also explained there, Blaze approaches this problem more generally by means of views, and in particular element selections:
Output:
I hope this answers your question.
Best regards,
Klaus!