Thread-safety with GpuMat

asked 2020-10-07 11:24:44 -0600

dvfreese gravatar image

I have a single thread that produces a GpuMat. I was looking at a design where I would pass that to N threads as a const GpuMat, and then let them operate on that matrix arbitrarily.

If none of the threads are modifying the GpuMat, is this considered thread safe generally? with cavaets? never?

edit retag flag offensive close merge delete

Comments

The reference counting is atomic, so that part looks fine, but I wasn't sure if anything in particular with the cuda context might cause problems.

dvfreese gravatar imagedvfreese ( 2020-10-07 11:25:53 -0600 )edit