I tried using NPP in a program with several CPU threads and NPP returns unexpected results in some cases. Is there a way to use NPP safely in multi-threaded code?
If we use NPP in a program with several CPU threads and call the following function in each CPU thread:
void function X( cudaStream_t hStream )
nppSetStream( hStream ) ;
nppDoSomething(…) ; // Calling an NPP function.
Does NPP get the connection between CPU-Thread and the CUDA-Stream? Or if the active CPU thread changes between execution of “SetStream” and “DoSmt” everything gets mixed up?