You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is great, one of the primary reasons I added an explicit backend argument to all functions was to allow unmaterialised types such as ranges - e.g. having any work over eachindex(v) instead of v directly for more complex conditions. I haven't tested that on reduce, for which the temp check was failing.
A test for such unmaterialised types - MappedArrays or simple ranges - would be very useful; and perhaps including such tests for the other functions, thanks!
I tried to also get this working for mapreduce_nd. There are a variety of InvalidIRError, for example "unsupported dynamic function invocation (call to convert)" and "unsupported dynamic function invocation (call to print_to_string". Test case:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows calling reduce on MappedArrays types. That's nice because you can avoid allocating a large array to store the input. For example,
I'm creating a bare-bones pull request to get feedback on whether this is desired. If so, I can add a unit test.