From c00e9cfa27f1a3f118c44edd2f8e0e4bb084244e Mon Sep 17 00:00:00 2001 From: Andrey Morozov Date: Thu, 15 Jul 2010 09:18:39 +0000 Subject: [PATCH] fixed problem with compiled on linux --- modules/gpu/src/precomp.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/gpu/src/precomp.hpp b/modules/gpu/src/precomp.hpp index deff3df08d..f09780922e 100644 --- a/modules/gpu/src/precomp.hpp +++ b/modules/gpu/src/precomp.hpp @@ -50,6 +50,8 @@ #include #endif +#include + #include "opencv2/gpu/gpu.hpp" #include "opencv2/gpu/gpumat.hpp" @@ -79,13 +81,16 @@ namespace cv { if( cudaSuccess != err) { - fprintf(stderr, "%s(%i) : cudaSafeCall() Runtime API error : %s.\n", file, line, cudaGetErrorString(err) ); + std::cerr << file << "(" << line << ") : cudaSafeCall() Runtime API error : " << cudaGetErrorString(err) << "\n"; exit(-1); } } template - inline DevMem2D_ getDevMem(const GpuMat& mat) { return DevMem2D_(m.rows, m.cols, m.data, m.step); } + inline DevMem2D_ getDevMem(const GpuMat& mat) + { + return DevMem2D_(mat.rows, mat.cols, mat.data, mat.step); + } } }