Commit ef6c2366 authored by marina.kolpakova's avatar marina.kolpakova

restore missed gpu functionality after merge #dddd285d

parent dddd285d
...@@ -143,6 +143,7 @@ namespace cv { namespace gpu ...@@ -143,6 +143,7 @@ namespace cv { namespace gpu
int multi_processor_count_; int multi_processor_count_;
int majorVersion_; int majorVersion_;
int minorVersion_; int minorVersion_;
size_t sharedMemPerBlock_;
}; };
CV_EXPORTS void printCudaDeviceInfo(int device); CV_EXPORTS void printCudaDeviceInfo(int device);
......
...@@ -379,6 +379,8 @@ void cv::gpu::DeviceInfo::query() ...@@ -379,6 +379,8 @@ void cv::gpu::DeviceInfo::query()
sharedMemPerBlock_ = prop.sharedMemPerBlock; sharedMemPerBlock_ = prop.sharedMemPerBlock;
} }
size_t cv::gpu::DeviceInfo::sharedMemPerBlock() const {return sharedMemPerBlock_;}
void cv::gpu::DeviceInfo::queryMemory(size_t& free_memory, size_t& total_memory) const void cv::gpu::DeviceInfo::queryMemory(size_t& free_memory, size_t& total_memory) const
{ {
int prev_device_id = getDevice(); int prev_device_id = getDevice();
...@@ -802,6 +804,13 @@ void cv::gpu::ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m) ...@@ -802,6 +804,13 @@ void cv::gpu::ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m)
} }
} }
GpuMat cv::gpu::allocMatFromBuf(int rows, int cols, int type, GpuMat &mat)
{
if (!mat.empty() && mat.type() == type && mat.rows >= rows && mat.cols >= cols)
return mat(Rect(0, 0, cols, rows));
return mat = GpuMat(rows, cols, type);
}
namespace namespace
{ {
class GpuFuncTable class GpuFuncTable
......
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