Skip to content
Snippets Groups Projects
Commit 5f533e21 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Atomic: workaround due to fucked up const_cast in CUDA 10.1.105

Fixes #30
parent e28a9e4d
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,10 @@ public:
{
// CUDA does not have a native atomic load:
// https://stackoverflow.com/questions/32341081/how-to-have-atomic-load-in-cuda
return const_cast<Atomic*>(this)->fetch_add( 0 );
// const-cast on pointer fails in CUDA 10.1.105
// return const_cast<Atomic*>(this)->fetch_add( 0 );
return const_cast<Atomic&>(*this).fetch_add( 0 );
}
__cuda_callable__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment