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: Add automatic dispatching of backend-specific definitions #119

Merged
merged 4 commits into from
Mar 23, 2020

Conversation

stotko
Copy link
Owner

@stotko stotko commented Mar 23, 2020

In comparison to memory and atomic, the platform module does not automatically infer the definition of the provided functionality from the chosen backend. Instead, the dispatching logic as well as all backend-specific definitions are thrown together in preprocessor if clauses.

Move these definitions into backend platform modules and add an automatic dispatch mechanism similar to the one used in the memory and atomic modules. This simplifies the introduction of new backends in the future and exposes the requirements to backends in a more complete manner. In addition to this change, the compiler detection has been moved to a new compiler module which is implicitly included by platform for backwards compatibility.

@stotko stotko added this to the 1.3.0 milestone Mar 23, 2020
@codecov
Copy link

codecov bot commented Mar 23, 2020

Codecov Report

Merging #119 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #119   +/-   ##
=======================================
  Coverage   97.87%   97.87%           
=======================================
  Files          27       27           
  Lines        1648     1648           
=======================================
  Hits         1613     1613           
  Misses         35       35           
Impacted Files Coverage Δ
src/stdgpu/impl/bit_detail.h 100.00% <ø> (ø)
src/stdgpu/impl/limits_detail.h 100.00% <ø> (ø)
src/stdgpu/impl/memory_detail.h 98.61% <ø> (ø)

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 7cab5cb...df86a9f. Read the comment docs.

@stotko stotko merged commit bb5ab25 into master Mar 23, 2020
@stotko stotko deleted the platform_backend branch March 23, 2020 12:18
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