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

memory: Add (de)allocatate_filled functions to allocator_traits #362

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

stotko
Copy link
Owner

@stotko stotko commented Jun 15, 2023

Although the memory module already supports custom allocators making it quite generic, the more advanced API related to automatically filled arrays still uses the default execution policies. Extend allocator_traits by allocate_filled and deallocate_filled functions that additionally take an execution policy as well as an initialization value as their arguments. This consolidates all required allocation functions in the traits and follows the recommended usage from the C++ standard.

Issue: #351

@stotko stotko added this to the 2.0.0 milestone Jun 15, 2023
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (bc3adae) 97.23% compared to head (914894e) 97.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #362      +/-   ##
==========================================
+ Coverage   97.23%   97.24%   +0.01%     
==========================================
  Files          31       31              
  Lines        2421     2430       +9     
==========================================
+ Hits         2354     2363       +9     
  Misses         67       67              
Impacted Files Coverage Δ
src/stdgpu/impl/memory_detail.h 99.19% <100.00%> (+0.03%) ⬆️

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

@stotko stotko merged commit 40efa15 into master Jun 15, 2023
31 checks passed
@stotko stotko deleted the allocate_filled branch June 15, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant