Skip to content

preliminary support for multi-arg map and mapreduce with breaking changes#77

Open
ExpandingMan wants to merge 1 commit intoJuliaGPU:mainfrom
ExpandingMan:multiarg
Open

preliminary support for multi-arg map and mapreduce with breaking changes#77
ExpandingMan wants to merge 1 commit intoJuliaGPU:mainfrom
ExpandingMan:multiarg

Conversation

@ExpandingMan
Copy link

@ExpandingMan ExpandingMan commented Mar 1, 2026

This adds support for multi-argument map and includes breaking API changes for both map and mapreduce, as discussed in #54. The main motivation is for multi-argument mapreduce; that hasn't been added in this PR, but considering that I am proposing breaking changes I wanted to start a discussion before I decide how to do it. If this is merged (whether with the API I'm proposing or some suggested alternative) I will make another PR with multi-argument mapreduce.

There are several alternatives to what I'm proposing here that are non-breaking, including

  • Wrapper type for multi-arg (though the natural candidate Tuple would seem like a bad idea because Tuple is itself iterable and can be used in Base.map).
  • New function for multi-arg.
  • Pass additional arrays via their own keyword argument.

However, I would find this to be a pretty compelling case for a breaking change since it would make this package consistent with Base and also other similar packages such as OhMyThreads.jl.

Note that I have not moved backend to a keyword argument in the various arithmetic functions since there isn't nearly as strong a case that they should be changed, though, for what it's worth, if it were up to me, I'd probably change those also.

@ExpandingMan
Copy link
Author

This seems to fail on metal, but I don't know why. Everything works fine on me on CPU and with CUDA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant