minor chnages in GPU samples
This commit is contained in:
parent
bbffbe904a
commit
593fae4c02
@ -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_
|
||||
#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
|
||||
|
Loading…
x
Reference in New Issue
Block a user