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

platform: Change detection of device code for OpenMP #174

Merged
merged 3 commits into from
May 25, 2020
Merged

Conversation

stotko
Copy link
Owner

@stotko stotko commented May 25, 2020

For the OpenMP backend, the platform macros currently always report code to be STDGPU_CODE_HOST. Since some STDGPU_HOST_DEVICE annotated function may use different paths for host and device code and the device path may contain backend-specific optimizations, this choice will lead to backend-specific code being ignored.

Change the detection code to always report STDGPU_CODE_DEVICE rather than STDGPU_CODE_HOST. Note that for such functions using different code paths, these paths should result in equivalent behavior anyways.

@stotko stotko added this to the 1.3.0 milestone May 25, 2020
@codecov
Copy link

codecov bot commented May 25, 2020

Codecov Report

Merging #174 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #174   +/-   ##
=======================================
  Coverage   97.80%   97.80%           
=======================================
  Files          28       28           
  Lines        1825     1825           
=======================================
  Hits         1785     1785           
  Misses         40       40           
Impacted Files Coverage Δ
src/stdgpu/impl/atomic_detail.cuh 98.44% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60c0656...5955b57. Read the comment docs.

@stotko stotko merged commit 3b6d793 into master May 25, 2020
@stotko stotko deleted the platform_openmp branch May 25, 2020 08:05
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