added resetDevice function, removed MultiGpuManager

This commit is contained in:
Vladislav Vinogradov
2011-06-01 10:11:27 +00:00
parent b6c195d44c
commit f906c9b259
5 changed files with 31 additions and 215 deletions

View File

@@ -36,8 +36,6 @@ using namespace cv::gpu;
struct Worker { void operator()(int device_id) const; };
MultiGpuManager multi_gpu_mgr;
int main()
{
int num_devices = getCudaEnabledDeviceCount();
@@ -58,8 +56,6 @@ int main()
}
}
multi_gpu_mgr.init();
// Execute calculation in two threads using two GPUs
int devices[] = {0, 1};
parallel_do(devices, devices + 2, Worker());
@@ -70,7 +66,7 @@ int main()
void Worker::operator()(int device_id) const
{
multi_gpu_mgr.gpuOn(device_id);
setDevice(device_id);
Mat src(1000, 1000, CV_32F);
Mat dst;
@@ -95,8 +91,6 @@ void Worker::operator()(int device_id) const
// after context is extracted from the stack
d_src.release();
d_dst.release();
multi_gpu_mgr.gpuOff();
}
#endif