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: Make backend interface more low level #446

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

stotko
Copy link
Owner

@stotko stotko commented Nov 19, 2024

The backend interface of memory expects the dynamic memory type to dispatch to the correct platform-specific call. However, this introduces a cyclic dependency to the high-level memory interface. Furthermore, dispatching should not be part of the backend logic as the backends should only provide the implementations of small building blocks which, in turn, are used to build the entire business logic. Redesign the backend API by splitting the malloc/free/memcpy functions into low-level pieces tied to a specific memory type configuration and move the respective dispatching logic up to the high-level shared implementation.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 84.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 97.56%. Comparing base (b751532) to head (f00f105).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/stdgpu/impl/memory.cpp 73.33% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #446      +/-   ##
==========================================
- Coverage   97.57%   97.56%   -0.02%     
==========================================
  Files          32       32              
  Lines        2556     2585      +29     
==========================================
+ Hits         2494     2522      +28     
- Misses         62       63       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@stotko stotko merged commit c8a56f3 into master Nov 19, 2024
59 of 61 checks passed
@stotko stotko deleted the memory_backend branch November 19, 2024 10:20
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