atomic
OpenCL - atomic_cmpxchg
What does this function do??. I couldn\'t understand a thing from the OpenCL specification!! The code below is a snippet from spMV code.[详细]
2023-03-16 10:57 分类:问答How can I print value of std::atomic<unsigned int>?
I am using std::atomic<unsigned int> in my program. How can I print its value using printf? It doesn\'t work if I just use %u. I know I can use std::cout, but my program is littered with printf[详细]
2023-03-16 02:54 分类:问答fastest way to atomically compare two integers in C?
uint64_t n;// two 32-bit integers return ( (uint32_t)(n >> 32) == (uint32_t)n ); What is the fastest way to atomically compare the 32 most-significant bits to the 32 least-significant bits of[详细]
2023-03-15 05:45 分类:问答Is there an atomic |= operation?
Is there such a thing as an atomic |开发者_运维技巧= or and atomic or? If no what is the recommended technique for setting a bit in an variable that needs to be threadsafe? (I am avoiding locks)There[详细]
2023-03-15 04:38 分类:问答ConcurrentSkipListSet and replace remove(key)
I am using ConcurrentSkipListSet, which I fill with 20 keys. I want to replace these keys continuously. However, ConcurrentSkipListSet doesn\'t seem to have an atomic replace function.[详细]
2023-03-14 23:09 分类:问答fs.write(); fs.flush(); When is it really written to disk? What if kernel-panic or power outage?
I need to implement some atomic writes to secondary storage. How can I make this fool proof? If I open a C# file handle using File.Open I will receive a handle. I can write some data to it. Flush it[详细]
2023-03-13 22:10 分类:问答What exception guarantees do gcc atomic builtins offer?
I cannot find documentation which states what exception guarantees (none, basic, strong, nothrow) the gcc atomic builti开发者_JS百科ns (e.g. __sync_synchronize()) offer. Can anyone provide details on[详细]
2023-03-12 04:35 分类:问答Which version of GCC introduced support for atomic builtins?
I see it\'s available in 4.1.0 but was it available 开发者_开发技巧earlier than this? I\'m interested specifically in 3.4.3 but can\'t find a definitive answer.Looking at the online documentation, it[详细]
2023-03-12 03:32 分类:问答Is accessing a variable of type sig_atomic_t with pointer atomic
I want to have a hash table where access to every element should be atomic and I don\'t want to use开发者_Go百科 locks. Can I use pointers to refer variables of type sig_atomic_t?No. sig_atomic_t is f[详细]
2023-03-08 20:39 分类:问答Atomic Add with long int is not working
As cuda programming guide suggests, I want to call Atom开发者_Python百科icAdd function: unsigned long long int atomicAdd(unsigned long long int* address,[详细]
2023-03-08 12:53 分类:问答
加载中,请稍侯......