Commit ad693d73 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

fixed gpu module HOG test failing on x64 OS

parent d888b810
...@@ -94,16 +94,16 @@ struct CV_GpuHogDetectTestRunner: cv::gpu::HOGDescriptor ...@@ -94,16 +94,16 @@ struct CV_GpuHogDetectTestRunner: cv::gpu::HOGDescriptor
f.write((char*)&val, sizeof(val)); f.write((char*)&val, sizeof(val));
} }
} }
size_t nlocations = locations.size(); int nlocations = locations.size();
f.write((char*)&nlocations, sizeof(nlocations)); f.write((char*)&nlocations, sizeof(nlocations));
for (size_t i = 0; i < locations.size(); ++i) for (int i = 0; i < locations.size(); ++i)
f.write((char*)&locations[i], sizeof(locations[i])); f.write((char*)&locations[i], sizeof(locations[i]));
} }
#else #else
void compare(const cv::Mat& block_hists, const std::vector<cv::Point>& locations) void compare(const cv::Mat& block_hists, const std::vector<cv::Point>& locations)
{ {
int rows, cols; int rows, cols;
size_t nlocations; int nlocations;
f.read((char*)&rows, sizeof(rows)); f.read((char*)&rows, sizeof(rows));
f.read((char*)&cols, sizeof(cols)); f.read((char*)&cols, sizeof(cols));
...@@ -119,8 +119,8 @@ struct CV_GpuHogDetectTestRunner: cv::gpu::HOGDescriptor ...@@ -119,8 +119,8 @@ struct CV_GpuHogDetectTestRunner: cv::gpu::HOGDescriptor
} }
} }
f.read((char*)&nlocations, sizeof(nlocations)); f.read((char*)&nlocations, sizeof(nlocations));
CHECK(nlocations == locations.size(), cvtest::TS::FAIL_INVALID_OUTPUT); CHECK(nlocations == static_cast<int>(locations.size()), cvtest::TS::FAIL_INVALID_OUTPUT);
for (size_t i = 0; i < nlocations; ++i) for (int i = 0; i < nlocations; ++i)
{ {
cv::Point location; cv::Point location;
f.read((char*)&location, sizeof(location)); f.read((char*)&location, sizeof(location));
......
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