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

Implement a reinterpret function #260

Open
tpadioleau opened this issue Jan 12, 2024 · 0 comments
Open

Implement a reinterpret function #260

tpadioleau opened this issue Jan 12, 2024 · 0 comments
Labels
core enhancement New feature or request

Comments

@tpadioleau
Copy link
Member

tpadioleau commented Jan 12, 2024

In some situations it can be useful to reinterpret the support of a ChunkSpan:

ChunkSpan<T, DiscreteDomain<DDim0, DDim1>> chk;
DiscreteDomain<DDim2, DDim3> dom;
ChunkSpan<T, DiscreteDomain<DDim2, DDim3>> reinterpreted_chk(chk.data_handle(), dom);

This way is unsafe because the constructor cannot check the bounds.

I would like a function that takes an input a ChunkSpan and a DiscreteDomain/DiscreteElement and returns a reinterpreted ChunkSpan with a check of the bounds in case of a DiscreteDomain.

@tpadioleau tpadioleau added the enhancement New feature or request label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant