Skip to content

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

Open
@jishnub

Description

@jishnub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions