stotko / stdgpu

stdgpu: Efficient STL-like Data Structures on the GPU
https://stotko.github.io/stdgpu/
Apache License 2.0
1.16k stars 83 forks source link

src: Add execution policy overload to all container creation and destruction functions #364

Closed stotko closed 1 year ago

stotko commented 1 year ago

Currently, all containers allow for custom allocators, but lack support custom execution policies. Add overloads to the createDeviceObject and destroyDeviceObject static member functions that additionally take an execution policy object and port the respective implementations to uniformly use allocator_traits for memory (de)allocation.

Partially addresses #351

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07 :tada:

Comparison is base (0c42bf2) 97.22% compared to head (3b1bdbf) 97.29%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #364 +/- ## ========================================== + Coverage 97.22% 97.29% +0.07% ========================================== Files 31 31 Lines 2414 2480 +66 ========================================== + Hits 2347 2413 +66 Misses 67 67 ``` | [Impacted Files](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko) | Coverage Δ | | |---|---|---| | [src/stdgpu/bitset.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9iaXRzZXQuY3Vo) | `100.00% <ø> (ø)` | | | [src/stdgpu/deque.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9kZXF1ZS5jdWg=) | `100.00% <ø> (ø)` | | | [src/stdgpu/impl/unordered\_base.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9pbXBsL3Vub3JkZXJlZF9iYXNlLmN1aA==) | `100.00% <ø> (ø)` | | | [src/stdgpu/mutex.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9tdXRleC5jdWg=) | `100.00% <ø> (ø)` | | | [src/stdgpu/unordered\_map.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS91bm9yZGVyZWRfbWFwLmN1aA==) | `100.00% <ø> (ø)` | | | [src/stdgpu/unordered\_set.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS91bm9yZGVyZWRfc2V0LmN1aA==) | `100.00% <ø> (ø)` | | | [src/stdgpu/vector.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS92ZWN0b3IuY3Vo) | `100.00% <ø> (ø)` | | | [src/stdgpu/impl/atomic\_detail.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9pbXBsL2F0b21pY19kZXRhaWwuY3Vo) | `99.60% <100.00%> (+0.01%)` | :arrow_up: | | [src/stdgpu/impl/bitset\_detail.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9pbXBsL2JpdHNldF9kZXRhaWwuY3Vo) | `99.26% <100.00%> (+0.05%)` | :arrow_up: | | [src/stdgpu/impl/deque\_detail.cuh](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko#diff-c3JjL3N0ZGdwdS9pbXBsL2RlcXVlX2RldGFpbC5jdWg=) | `93.64% <100.00%> (+0.43%)` | :arrow_up: | | ... and [5 more](https://app.codecov.io/gh/stotko/stdgpu/pull/364?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/stotko/stdgpu/pull/364/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Patrick+Stotko)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.