How to make specific lines of cuda kernel to be executed only by a single thread?
For example, memory has to be allocated for 50 elements(nodes of a linked list) of the cuda kernel on which 50 threads are working i.e. each thread will work on one element.
But the memory should be allocated only once.
Is there any way to handle such situation?