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

add atomic functions #22

Open
psychocoderHPC opened this issue Feb 27, 2016 · 2 comments
Open

add atomic functions #22

psychocoderHPC opened this issue Feb 27, 2016 · 2 comments

Comments

@psychocoderHPC
Copy link
Member

Atomic add and exchange are currently added with a macro function.
It is better to implement inlined functions for that.

@mxmlnkn
Copy link
Contributor

mxmlnkn commented Feb 28, 2016

I don't think inlining works transparently here, because we need to have acc as a parameter.

@tdd11235813
Copy link
Contributor

although issue itself is a bit outdated, I just want to add that few atomics like atomicXor and atomicOr are still missing.

Few more notes:

  • Device functions have to provide the acc object in the signature when using CUDA/CUPLA functions
  • you might need an additional ALPAKA_NO_HOST_ACC_WARNING to suppress warnings/errors like calling device function from host code
    ALPAKA_NO_HOST_ACC_WARNING
    template< typename T_Acc >
    ALPAKA_FN_ACC
    void operator()( T_Acc const & acc, ... ) const
    {
        // ...
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants