Ensure the Cuda context is initialized correctly as long as the setDevice is not called in a multi-thread environment.

pull/6087/head
Mathieu Barnachon 9 years ago
parent f9f5313670
commit b030ac0433
  1. 1
      modules/core/src/cuda_info.cpp

@ -70,6 +70,7 @@ void cv::cuda::setDevice(int device)
(void) device;
throw_no_cuda();
#else
cudaFree(0);
cudaSafeCall( cudaSetDevice(device) );
#endif
}

Loading…
Cancel
Save