Skip to content

Using multiple selections for a variable in one read #4146

Answered by pnorbert
hr87 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can do

   var.SetSelection(s1);
   engine.Get(var, ptr1);
   var.SetSelection(s2);
   engine.Get(var, ptr2);
   ...
   engine.PerformGets();

However, the reader is not smart enough to combine work on multiple selections and it will read the necessary contiguous (probably the entire) dataset to carry out one selection again and again.

If performance is a concern, and if this is a big 5D array written by many processes, I would read the entire data block by block and make the transformation in memory manually.

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@hr87
Comment options

@hr87
Comment options

Answer selected by hr87
Comment options

You must be logged in to vote
1 reply
@hr87
Comment options

Comment options

You must be logged in to vote
1 reply
@hr87
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants