Skip to content

In-place DWTs on views #102

@impact-basin

Description

@impact-basin

Hi all,

I have an application that needs to compute many DWTs of an image cube in-place. As performance is key, I attempted something similar to the following:

@threads for i=1:100
    @views dwt!(cube[:,:,i], wavelet(WT.haar))
end

After wavelet-domain processing, the inverse transform is taken.

These cubes are typically 300 x 20,000 x 85, and this operation will be performed on multiple cubes, hence performance is of the essence, and the copy-semantics of typical array slicing are unappealing for my use-case.

However, _dwt!() appears to operate only on Arrays, and not AbstractArrays. Would it be feasible to extend the type signatures of _dwt!() / _idwt!() / etc, to include SubArray types?

Please let me know if I can be of assistance; I am more than happy to implement this and raise a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions