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

Use region_t's for mapped memory #594

Closed
eyalroz opened this issue Feb 29, 2024 · 0 comments
Closed

Use region_t's for mapped memory #594

eyalroz opened this issue Feb 29, 2024 · 0 comments

Comments

@eyalroz
Copy link
Owner

eyalroz commented Feb 29, 2024

The cuda::memory::mapped::region_pair structure uses two raw pointers and a size field. Instead, let's make it a pair of memory::region_t's. Yes, it is a bit "wasteful" - another size_t value; but much more usable, and the pair might be optimized away, anyway.

@eyalroz eyalroz added the task label Feb 29, 2024
@eyalroz eyalroz self-assigned this Feb 29, 2024
eyalroz added a commit that referenced this issue Feb 29, 2024
* `memory::mapped::region_pair_t` now has two `memory::region_t` members
* Can easily imbue the mapped region with a type - by viewing it as a pair of spans; have a special struct for that, which also implicitly converts into an `std::pair` of spans
* Amended the vectorAddMapped example to make use of these new facilities
* Can now `get_device_region_for()` in addition to `get_device_pointer_for` - for the host-side of mapped regions
eyalroz added a commit that referenced this issue Mar 1, 2024
* `memory::mapped::region_pair_t` now has two `memory::region_t` members
* Can easily imbue the mapped region with a type - by viewing it as a pair of spans; have a special struct for that, which also implicitly converts into an `std::pair` of spans
* Amended the vectorAddMapped example to make use of these new facilities
* Can now `get_device_region_for()` in addition to `get_device_pointer_for` - for the host-side of mapped regions
eyalroz added a commit that referenced this issue Apr 20, 2024
* `memory::mapped::region_pair_t` now has two `memory::region_t` members
* Can easily imbue the mapped region with a type - by viewing it as a pair of spans; have a special struct for that, which also implicitly converts into an `std::pair` of spans
* Amended the vectorAddMapped example to make use of these new facilities
* Can now `get_device_region_for()` in addition to `get_device_pointer_for` - for the host-side of mapped regions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant