cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

boxerab
Challenger

64 bit atomics

Jump to solution

I would like to use 64 bit atomic_add on my HD 7700

I have added  the following line at the top of my kernel:

#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable

But, when I try to perform atomic_add on a long, I get a compiler error:

no instance of overloaded function "atomic_add" matches the argument list.


This works fine with int.

0 Likes
1 Solution

Accepted Solutions
knightast
Adept I

Re: 64 bit atomics

Jump to solution

In OpenCL, atomic_add is for int32, while atom_add for int64.

View solution in original post

0 Likes
2 Replies
knightast
Adept I

Re: 64 bit atomics

Jump to solution

In OpenCL, atomic_add is for int32, while atom_add for int64.

View solution in original post

0 Likes
boxerab
Challenger

Re: 64 bit atomics

Jump to solution

Great. Thanks!

0 Likes