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

rawview: unnecessary MappedArray wrapper on N0f8 arrays #183

Open
johnnychen94 opened this issue Jun 27, 2022 · 0 comments
Open

rawview: unnecessary MappedArray wrapper on N0f8 arrays #183

johnnychen94 opened this issue Jun 27, 2022 · 0 comments

Comments

@johnnychen94
Copy link
Member

johnnychen94 commented Jun 27, 2022

Is there any reason why we use mappedarray rather than plain reinterpret here?

rawview(a::AbstractArray{T}) where {T<:FixedPoint} = mappedarray(reinterpret, y->T(y,0), a)

This adds a few performance overheads to ImageMorphology JuliaImages/ImageMorphology.jl#103 because pointer of MappedArray is an invalid concept.

I notice this is written 4-6 years ago, is it because reinterpret for array type was not yet available?

@johnnychen94 johnnychen94 changed the title Unnecessary MappedArray wrapper on N0f8 arrays rawview: unnecessary MappedArray wrapper on N0f8 arrays Jun 27, 2022
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

No branches or pull requests

1 participant