Commit 593fae4c authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

minor chnages in GPU samples

parent bbffbe90
......@@ -50,7 +50,6 @@ CUcontext contexts[2];
int main()
{
int num_devices = getCudaEnabledDeviceCount();
if (num_devices < 2)
{
cout << "Two or more GPUs are required\n";
......@@ -69,6 +68,7 @@ int main()
}
}
// Init CUDA Driver API
safeCall(cuInit(0));
// Create context for GPU #0
......
......@@ -71,7 +71,7 @@ public:
private:
TestSystem(): can_flush_(false), cpu_elapsed_(0), gpu_elapsed_(0),
speedup_total_(0.0), num_subtests_called_(0) {};
speedup_total_(0.0), num_subtests_called_(0) {}
void flushSubtestData();
......@@ -135,4 +135,4 @@ void gen(cv::Mat& mat, int rows, int cols, int type, cv::Scalar low,
std::string abspath(const std::string& relpath);
#endif // OPENCV_GPU_SAMPLE_PERFORMANCE_H_
\ No newline at end of file
#endif // OPENCV_GPU_SAMPLE_PERFORMANCE_H_
......@@ -78,7 +78,6 @@ int main(int argc, char** argv)
}
int num_devices = getCudaEnabledDeviceCount();
if (num_devices < 2)
{
cout << "Two or more GPUs are required\n";
......@@ -111,6 +110,7 @@ int main(int argc, char** argv)
return -1;
}
// Init CUDA Driver API
safeCall(cuInit(0));
// Create context for the first GPU
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment