search for: get_thread_id

Displaying 2 results from an estimated 2 matches for "get_thread_id".

2013 Nov 11
0
[LLVMdev] Add a new llvm intrinsic?
Hi Jeff, It’s not really meaningful to talk about threads being created in the context of an OpenCL kernel. The other threads are always present. void kernel(int * restrict array, int * restrict array2) { int value = array[0] + get_thread_id() + 1; barrier(); array[get_thread_id()] = value; barrier(); array2[get_thread_id()] = array[0]; } In this example code, the kernel is well synchronized; there are no data races on any elements of either array. However, the results will differ if we CSE the later read of array[0] with the ear...
2013 Nov 11
2
[LLVMdev] Add a new llvm intrinsic?
Sorry for the delay in getting back to you. I don't know if anything came out of this, since Xiaoyi never wrote back. What does some of the affected code look like? My opinion is still that 'restrict' should mean that no other thread should use a pointer aliasing the restrict pointer, although if many threads are started after the lifetime of the restrict pointer starts, and they