Skip to content

Error when building Sofa's pluging "no instance of overloaded function "atomicAdd" matches the argument list" #2660

Discussion options

You must be logged in to vote

@bakpaul I think you right.

Here is a solution suggested by Nvidia:

Note that any atomic operation can be implemented based on atomicCAS() (Compare And Swap). For example, atomicAdd() for double-precision floating-point numbers is not available on devices with compute capability lower than 6.0 but it can be implemented as follows:

#if __CUDA_ARCH__ < 600
__device__ double atomicAdd(double* address, double val)
{
    unsigned long long int* address_as_ull =
                              (unsigned long long int*)address;
    unsigned long long int old = *address_as_ull, assumed;

    do {
        assumed = old;
        old = atomicCAS(address_as_ull, assumed,
                        __dou…

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@longhathuc
Comment options

@hugtalbot
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@hugtalbot
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@bakpaul
Comment options

@alxbilger
Comment options

Answer selected by hugtalbot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants