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

[Core] Adds wrapMemory #435

Merged
merged 2 commits into from
Jan 2, 2021
Merged

[Core] Adds wrapMemory #435

merged 2 commits into from
Jan 2, 2021

Conversation

dmed256
Copy link
Member

@dmed256 dmed256 commented Jan 2, 2021

Description

Adds a device.wrapMemory() method for better interoperability with backends. Should fix CEED/libCEED#678

Note: This consolidates some utility methods that were moved to the internal API

  • occa::cpu::wrapMemory
  • occa::opencl::wrapMemory
  • occa::cuda::wrapMemory

@codecov
Copy link

codecov bot commented Jan 2, 2021

Codecov Report

Merging #435 (994446b) into main (c3a80d5) will increase coverage by 0.01%.
The diff coverage is 69.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #435      +/-   ##
==========================================
+ Coverage   76.48%   76.49%   +0.01%     
==========================================
  Files         248      249       +1     
  Lines       18889    18901      +12     
==========================================
+ Hits        14447    14459      +12     
  Misses       4442     4442              
Impacted Files Coverage Δ
include/occa/core/base.tpp 100.00% <ø> (ø)
include/occa/core/memory.hpp 100.00% <ø> (ø)
src/c/memory.cpp 100.00% <ø> (ø)
src/core/base.cpp 71.18% <0.00%> (-2.96%) ⬇️
src/core/memory.cpp 71.00% <ø> (-0.37%) ⬇️
src/occa/internal/core/device.hpp 0.00% <ø> (ø)
src/c/base.cpp 88.54% <23.07%> (-6.14%) ⬇️
src/core/device.cpp 90.87% <90.90%> (+<0.01%) ⬆️
include/occa/core/device.tpp 100.00% <100.00%> (ø)
src/c/device.cpp 95.31% <100.00%> (+7.12%) ⬆️
... and 6 more

@dmed256 dmed256 marked this pull request as ready for review January 2, 2021 00:43
@dmed256 dmed256 merged commit f591aa4 into main Jan 2, 2021
@dmed256 dmed256 deleted the core/add-memory-wrappers branch January 2, 2021 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OCCA SEGV when passing ROCm device memory
1 participant