const Size srcSize = GetParam();
const double eps = 1;
+ checkDeviceMaxMemoryAllocSize(srcSize, CV_8UC1);
+
UMat src(srcSize, CV_8UC1), dst(srcSize, CV_8UC1);
declare.in(src, WARMUP_RNG).out(dst);
SANITY_CHECK(dst, eps);
}
+///////////// calcHist ////////////////////////
+
+typedef TestBaseWithParam<Size> CalcHistFixture;
+
+OCL_PERF_TEST_P(CalcHistFixture, CalcHist, OCL_TEST_SIZES)
+{
+ const Size srcSize = GetParam();
+
+ const std::vector<int> channels(1, 0);
+ std::vector<float> ranges(2);
+ std::vector<int> histSize(1, 256);
+ ranges[0] = 0;
+ ranges[1] = 256;
+
+ checkDeviceMaxMemoryAllocSize(srcSize, CV_8UC1);
+
+ UMat src(srcSize, CV_8UC1), hist(256, 1, CV_32FC1);
+ declare.in(src, WARMUP_RNG).out(hist);
+
+ OCL_TEST_CYCLE() cv::calcHist(std::vector<UMat>(1, src), channels, noArray(), hist, histSize, ranges, false);
+
+ SANITY_CHECK(hist);
+}
+
/////////// CopyMakeBorder //////////////////////
CV_ENUM(Border, BORDER_CONSTANT, BORDER_REPLICATE, BORDER_REFLECT, BORDER_WRAP, BORDER_REFLECT_101)
const Size srcSize = get<0>(params);
const int type = get<1>(params), borderType = get<2>(params);
+ checkDeviceMaxMemoryAllocSize(srcSize, type);
+
UMat src(srcSize, type), dst;
const Size dstSize = srcSize + Size(12, 12);
dst.create(dstSize, type);
const int type = get<1>(params), borderType = BORDER_REFLECT;
const int blockSize = 7, apertureSize = 1 + 2 * 3;
+ checkDeviceMaxMemoryAllocSize(srcSize, type);
+
UMat src(srcSize, type), dst(srcSize, CV_32FC1);
declare.in(src, WARMUP_RNG).out(dst);
const Size srcSize = get<0>(params);
const int type = get<1>(params), borderType = BORDER_REFLECT;
+ checkDeviceMaxMemoryAllocSize(srcSize, type);
+
UMat src(srcSize, type), dst(srcSize, CV_32FC1);
declare.in(src, WARMUP_RNG).out(dst);
const Size srcSize = get<0>(params);
const int type = get<1>(params), borderType = BORDER_REFLECT;
+ checkDeviceMaxMemoryAllocSize(srcSize, type);
+
UMat src(srcSize, type), dst(srcSize, CV_32FC1);
declare.in(src, WARMUP_RNG).out(dst);
const Size srcSize = get<0>(params);
const int ddepth = get<1>(params);
+ checkDeviceMaxMemoryAllocSize(srcSize, ddepth);
+
UMat src(srcSize, CV_8UC1), dst(srcSize + Size(1, 1), ddepth);
declare.in(src, WARMUP_RNG).out(dst);
const int threshType = get<2>(params);
const double maxValue = 220.0, threshold = 50;
+ checkDeviceMaxMemoryAllocSize(srcSize, srcType);
+
UMat src(srcSize, srcType), dst(srcSize, srcType);
declare.in(src, WARMUP_RNG).out(dst);
{
const Size srcSize = GetParam();
+ checkDeviceMaxMemoryAllocSize(srcSize, CV_8UC1);
+
UMat src(srcSize, CV_8UC1), dst(srcSize, CV_8UC1);
const double clipLimit = 40.0;
declare.in(src, WARMUP_RNG).out(dst);