Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert 1:ndims(X) to ntuple(identity, ndims(X)) #97

Open
jishnub opened this issue Mar 29, 2023 · 0 comments · May be fixed by #98
Open

Convert 1:ndims(X) to ntuple(identity, ndims(X)) #97

jishnub opened this issue Mar 29, 2023 · 0 comments · May be fixed by #98

Comments

@jishnub
Copy link
Contributor

jishnub commented Mar 29, 2023

An example:

$f(x::AbstractArray) = $f(x, 1:ndims(x))

Using a Tuple here will allow ndims to be constant-propagated without relying on the compiler. It also reduces allocations in various functions, as vectors don't need to be allocated.
Such a change would be mildly breaking, but seems worthwhile. FFTW has largely been updated to accept Tuples as regions, and some other dependencies might need to be looked at.

@jishnub jishnub changed the title Convert 1:ndims(X) to ntuple(identity, ndims(X) Convert 1:ndims(X) to ntuple(identity, ndims(X)) Mar 29, 2023
@jishnub jishnub linked a pull request Mar 29, 2023 that will close this issue
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 a pull request may close this issue.

1 participant