mirror of
https://github.com/opencv/opencv.git
synced 2024-11-26 04:00:30 +08:00
Merge pull request #3161 from ElenaGvozdeva:ocl_perf_gemm
This commit is contained in:
commit
21f1a0ee49
@ -54,20 +54,21 @@ namespace ocl {
|
|||||||
|
|
||||||
///////////// gemm ////////////////////////
|
///////////// gemm ////////////////////////
|
||||||
|
|
||||||
typedef tuple<Size, int> GemmParams;
|
CV_ENUM(FlagType, 0, GEMM_1_T, GEMM_2_T, GEMM_3_T, GEMM_1_T|GEMM_2_T, GEMM_2_T|GEMM_3_T)
|
||||||
|
|
||||||
|
typedef tuple<Size, FlagType, MatType> GemmParams;
|
||||||
typedef TestBaseWithParam<GemmParams> GemmFixture;
|
typedef TestBaseWithParam<GemmParams> GemmFixture;
|
||||||
|
|
||||||
OCL_PERF_TEST_P(GemmFixture, Gemm, ::testing::Combine(
|
OCL_PERF_TEST_P(GemmFixture, Gemm, ::testing::Combine(
|
||||||
::testing::Values(Size(1000, 1000), Size(1500, 1500)),
|
::testing::Values(Size(640, 640), Size(1280, 1280)),
|
||||||
Values((int)cv::GEMM_3_T, (int)cv::GEMM_3_T | (int)cv::GEMM_2_T,
|
FlagType::all(), testing::Values(CV_32FC1, CV_32FC2)))
|
||||||
(int)cv::GEMM_1_T, (int)cv::GEMM_1_T | (int)cv::GEMM_2_T)))
|
|
||||||
{
|
{
|
||||||
GemmParams params = GetParam();
|
GemmParams params = GetParam();
|
||||||
const Size srcSize = get<0>(params);
|
const Size srcSize = get<0>(params);
|
||||||
const int flags = get<1>(params);
|
const int flags = get<1>(params);
|
||||||
|
const int type = get<2>(params);
|
||||||
|
|
||||||
UMat src1(srcSize, CV_32FC1), src2(srcSize, CV_32FC1),
|
UMat src1(srcSize, type), src2(srcSize, type), src3(srcSize, type), dst(srcSize, type);
|
||||||
src3(srcSize, CV_32FC1), dst(srcSize, CV_32FC1);
|
|
||||||
declare.in(src1, src2, src3).out(dst);
|
declare.in(src1, src2, src3).out(dst);
|
||||||
randu(src1, -10.0f, 10.0f);
|
randu(src1, -10.0f, 10.0f);
|
||||||
randu(src2, -10.0f, 10.0f);
|
randu(src2, -10.0f, 10.0f);
|
||||||
|
Loading…
Reference in New Issue
Block a user