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

doAtomic returns old value #1788

Open
DavidDureau opened this issue Nov 22, 2024 · 1 comment
Open

doAtomic returns old value #1788

DavidDureau opened this issue Nov 22, 2024 · 1 comment
Labels
arcane:accelerator Arcane Accelerator API/Runtime enhancement New feature or request

Comments

@DavidDureau
Copy link
Collaborator

In some algorithms, we need to get atomically the previous value ("old" value) just before the atomic operation.

Now, doAtomic doesn't return any value.

Could doAtomic return the "old" value like CUDA atomicAdd (or Min, ...)?

In addition, I need to perform an atomic ++ on an integer.
Is it possible to have an eAtomicOperation::Inc like CUDA?
I guess it would be more efficient.

@DavidDureau DavidDureau added enhancement New feature or request arcane:accelerator Arcane Accelerator API/Runtime labels Nov 22, 2024
@grospelliergilles
Copy link
Member

Good idea.
I will do it on Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arcane:accelerator Arcane Accelerator API/Runtime enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants