Skip to content
Discussion options

You must be logged in to vote

I don't think we thought carefully about it, but the reason is that partition ends by taking two slices of the same array and then returning them - that means they are aliased (as far as Futhark is concerned), although we of course know that they will not truly be aliased.

This can be changed in two ways:

  1. Take a copy at the end of filter, although the caller might as well do that.
  2. Make a built-in magical split that understands that the two arrays cannot alias.

Replies: 1 comment

Comment options

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