12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541 |
- /*M///////////////////////////////////////////////////////////////////////////////////////
- //
- // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
- //
- // By downloading, copying, installing or using the software you agree to this license.
- // If you do not agree to this license, do not download, install,
- // copy or use the software.
- //
- //
- // License Agreement
- // For Open Source Computer Vision Library
- //
- // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
- // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
- // Third party copyrights are property of their respective owners.
- //
- // Redistribution and use in source and binary forms, with or without modification,
- // are permitted provided that the following conditions are met:
- //
- // * Redistribution's of source code must retain the above copyright notice,
- // this list of conditions and the following disclaimer.
- //
- // * Redistribution's in binary form must reproduce the above copyright notice,
- // this list of conditions and the following disclaimer in the documentation
- // and/or other materials provided with the distribution.
- //
- // * The name of the copyright holders may not be used to endorse or promote products
- // derived from this software without specific prior written permission.
- //
- // This software is provided by the copyright holders and contributors "as is" and
- // any express or implied warranties, including, but not limited to, the implied
- // warranties of merchantability and fitness for a particular purpose are disclaimed.
- // In no event shall the Intel Corporation or contributors be liable for any direct,
- // indirect, incidental, special, exemplary, or consequential damages
- // (including, but not limited to, procurement of substitute goods or services;
- // loss of use, data, or profits; or business interruption) however caused
- // and on any theory of liability, whether in contract, strict liability,
- // or tort (including negligence or otherwise) arising in any way out of
- // the use of this software, even if advised of the possibility of such damage.
- //
- //M*/
- #include "perf_precomp.hpp"
- namespace opencv_test { namespace {
- #define ARITHM_MAT_DEPTH Values(CV_8U, CV_16U, CV_32F, CV_64F)
- //////////////////////////////////////////////////////////////////////
- // AddMat
- DEF_PARAM_TEST(Sz_Depth, cv::Size, MatDepth);
- PERF_TEST_P(Sz_Depth, AddMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::add(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::add(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // AddScalar
- PERF_TEST_P(Sz_Depth, AddScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::add(d_src, s, dst);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::add(src, s, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // SubtractMat
- PERF_TEST_P(Sz_Depth, SubtractMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::subtract(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::subtract(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // SubtractScalar
- PERF_TEST_P(Sz_Depth, SubtractScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::subtract(d_src, s, dst);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::subtract(src, s, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MultiplyMat
- PERF_TEST_P(Sz_Depth, MultiplyMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::multiply(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst, 1e-6);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::multiply(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MultiplyScalar
- PERF_TEST_P(Sz_Depth, MultiplyScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::multiply(d_src, s, dst);
- CUDA_SANITY_CHECK(dst, 1e-6);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::multiply(src, s, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // DivideMat
- PERF_TEST_P(Sz_Depth, DivideMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::divide(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst, 1e-6);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::divide(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // DivideScalar
- PERF_TEST_P(Sz_Depth, DivideScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::divide(d_src, s, dst);
- CUDA_SANITY_CHECK(dst, 1e-6);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::divide(src, s, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // DivideScalarInv
- PERF_TEST_P(Sz_Depth, DivideScalarInv,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::divide(s[0], d_src, dst);
- CUDA_SANITY_CHECK(dst, 1e-6);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::divide(s, src, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // AbsDiffMat
- PERF_TEST_P(Sz_Depth, AbsDiffMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::absdiff(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::absdiff(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // AbsDiffScalar
- PERF_TEST_P(Sz_Depth, AbsDiffScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::absdiff(d_src, s, dst);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::absdiff(src, s, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Abs
- PERF_TEST_P(Sz_Depth, Abs,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_16S, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::abs(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- FAIL_NO_CPU();
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Sqr
- PERF_TEST_P(Sz_Depth, Sqr,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::sqr(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- FAIL_NO_CPU();
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Sqrt
- PERF_TEST_P(Sz_Depth, Sqrt,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- cv::randu(src, 0, 100000);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::sqrt(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::sqrt(src, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Log
- PERF_TEST_P(Sz_Depth, Log,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- cv::randu(src, 0, 100000);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::log(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::log(src, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Exp
- PERF_TEST_P(Sz_Depth, Exp,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- cv::randu(src, 0, 10);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::exp(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::exp(src, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Pow
- DEF_PARAM_TEST(Sz_Depth_Power, cv::Size, MatDepth, double);
- PERF_TEST_P(Sz_Depth_Power, Pow,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16S, CV_32F),
- Values(0.3, 2.0, 2.4)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const double power = GET_PARAM(2);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::pow(d_src, power, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::pow(src, power, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // CompareMat
- CV_ENUM(CmpCode, cv::CMP_EQ, cv::CMP_GT, cv::CMP_GE, cv::CMP_LT, cv::CMP_LE, cv::CMP_NE)
- DEF_PARAM_TEST(Sz_Depth_Code, cv::Size, MatDepth, CmpCode);
- PERF_TEST_P(Sz_Depth_Code, CompareMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH,
- CmpCode::all()))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int cmp_code = GET_PARAM(2);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::compare(d_src1, d_src2, dst, cmp_code);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::compare(src1, src2, dst, cmp_code);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // CompareScalar
- PERF_TEST_P(Sz_Depth_Code, CompareScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- ARITHM_MAT_DEPTH,
- CmpCode::all()))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int cmp_code = GET_PARAM(2);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::compare(d_src, s, dst, cmp_code);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::compare(src, s, dst, cmp_code);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseNot
- PERF_TEST_P(Sz_Depth, BitwiseNot,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_not(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_not(src, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseAndMat
- PERF_TEST_P(Sz_Depth, BitwiseAndMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_and(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_and(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseAndScalar
- DEF_PARAM_TEST(Sz_Depth_Cn, cv::Size, MatDepth, MatCn);
- PERF_TEST_P(Sz_Depth_Cn, BitwiseAndScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- CUDA_CHANNELS_1_3_4))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int channels = GET_PARAM(2);
- const int type = CV_MAKE_TYPE(depth, channels);
- cv::Mat src(size, type);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- cv::Scalar_<int> is = s;
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_and(d_src, is, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_and(src, is, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseOrMat
- PERF_TEST_P(Sz_Depth, BitwiseOrMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_or(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_or(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseOrScalar
- PERF_TEST_P(Sz_Depth_Cn, BitwiseOrScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- CUDA_CHANNELS_1_3_4))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int channels = GET_PARAM(2);
- const int type = CV_MAKE_TYPE(depth, channels);
- cv::Mat src(size, type);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- cv::Scalar_<int> is = s;
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_or(d_src, is, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_or(src, is, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseXorMat
- PERF_TEST_P(Sz_Depth, BitwiseXorMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_xor(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_xor(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // BitwiseXorScalar
- PERF_TEST_P(Sz_Depth_Cn, BitwiseXorScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- CUDA_CHANNELS_1_3_4))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int channels = GET_PARAM(2);
- const int type = CV_MAKE_TYPE(depth, channels);
- cv::Mat src(size, type);
- declare.in(src, WARMUP_RNG);
- cv::Scalar s;
- declare.in(s, WARMUP_RNG);
- cv::Scalar_<int> is = s;
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::bitwise_xor(d_src, is, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::bitwise_xor(src, is, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // RShift
- PERF_TEST_P(Sz_Depth_Cn, RShift,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- CUDA_CHANNELS_1_3_4))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int channels = GET_PARAM(2);
- const int type = CV_MAKE_TYPE(depth, channels);
- cv::Mat src(size, type);
- declare.in(src, WARMUP_RNG);
- const cv::Scalar_<int> val = cv::Scalar_<int>::all(4);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::rshift(d_src, val, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- FAIL_NO_CPU();
- }
- }
- //////////////////////////////////////////////////////////////////////
- // LShift
- PERF_TEST_P(Sz_Depth_Cn, LShift,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32S),
- CUDA_CHANNELS_1_3_4))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int channels = GET_PARAM(2);
- const int type = CV_MAKE_TYPE(depth, channels);
- cv::Mat src(size, type);
- declare.in(src, WARMUP_RNG);
- const cv::Scalar_<int> val = cv::Scalar_<int>::all(4);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::lshift(d_src, val, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- FAIL_NO_CPU();
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MinMat
- PERF_TEST_P(Sz_Depth, MinMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::min(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::min(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MinScalar
- PERF_TEST_P(Sz_Depth, MinScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar val;
- declare.in(val, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::min(d_src, val[0], dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::min(src, val[0], dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MaxMat
- PERF_TEST_P(Sz_Depth, MaxMat,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src1(size, depth);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::max(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::max(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MaxScalar
- PERF_TEST_P(Sz_Depth, MaxScalar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- cv::Scalar val;
- declare.in(val, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::max(d_src, val[0], dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::max(src, val[0], dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // AddWeighted
- DEF_PARAM_TEST(Sz_3Depth, cv::Size, MatDepth, MatDepth, MatDepth);
- PERF_TEST_P(Sz_3Depth, AddWeighted,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F),
- Values(CV_8U, CV_16U, CV_32F, CV_64F),
- Values(CV_8U, CV_16U, CV_32F, CV_64F)))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth1 = GET_PARAM(1);
- const int depth2 = GET_PARAM(2);
- const int dst_depth = GET_PARAM(3);
- cv::Mat src1(size, depth1);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, depth2);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::addWeighted(d_src1, 0.5, d_src2, 0.5, 10.0, dst, dst_depth);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::addWeighted(src1, 0.5, src2, 0.5, 10.0, dst, dst_depth);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MagnitudeComplex
- PERF_TEST_P(Sz, MagnitudeComplex,
- CUDA_TYPICAL_MAT_SIZES)
- {
- const cv::Size size = GetParam();
- cv::Mat src(size, CV_32FC2);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::magnitude(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat xy[2];
- cv::split(src, xy);
- cv::Mat dst;
- TEST_CYCLE() cv::magnitude(xy[0], xy[1], dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MagnitudeSqrComplex
- PERF_TEST_P(Sz, MagnitudeSqrComplex,
- CUDA_TYPICAL_MAT_SIZES)
- {
- const cv::Size size = GetParam();
- cv::Mat src(size, CV_32FC2);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::magnitudeSqr(d_src, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- FAIL_NO_CPU();
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Magnitude
- PERF_TEST_P(Sz, Magnitude,
- CUDA_TYPICAL_MAT_SIZES)
- {
- const cv::Size size = GetParam();
- cv::Mat src1(size, CV_32FC1);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, CV_32FC1);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::magnitude(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::magnitude(src1, src2, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // MagnitudeSqr
- PERF_TEST_P(Sz, MagnitudeSqr,
- CUDA_TYPICAL_MAT_SIZES)
- {
- const cv::Size size = GetParam();
- cv::Mat src1(size, CV_32FC1);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, CV_32FC1);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::magnitudeSqr(d_src1, d_src2, dst);
- CUDA_SANITY_CHECK(dst);
- }
- else
- {
- FAIL_NO_CPU();
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Phase
- DEF_PARAM_TEST(Sz_AngleInDegrees, cv::Size, bool);
- DEF_PARAM_TEST(Sz_Type_AngleInDegrees, cv::Size, MatType, bool);
- PERF_TEST_P(Sz_AngleInDegrees, Phase,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Bool()))
- {
- const cv::Size size = GET_PARAM(0);
- const bool angleInDegrees = GET_PARAM(1);
- cv::Mat src1(size, CV_32FC1);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, CV_32FC1);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::phase(d_src1, d_src2, dst, angleInDegrees);
- CUDA_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::phase(src1, src2, dst, angleInDegrees);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // CartToPolar
- PERF_TEST_P(Sz_AngleInDegrees, CartToPolar,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Bool()))
- {
- const cv::Size size = GET_PARAM(0);
- const bool angleInDegrees = GET_PARAM(1);
- cv::Mat src1(size, CV_32FC1);
- declare.in(src1, WARMUP_RNG);
- cv::Mat src2(size, CV_32FC1);
- declare.in(src2, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src1(src1);
- const cv::cuda::GpuMat d_src2(src2);
- cv::cuda::GpuMat magnitude;
- cv::cuda::GpuMat angle;
- TEST_CYCLE() cv::cuda::cartToPolar(d_src1, d_src2, magnitude, angle, angleInDegrees);
- CUDA_SANITY_CHECK(magnitude);
- CUDA_SANITY_CHECK(angle, 1e-6, ERROR_RELATIVE);
- }
- else
- {
- cv::Mat magnitude;
- cv::Mat angle;
- TEST_CYCLE() cv::cartToPolar(src1, src2, magnitude, angle, angleInDegrees);
- CPU_SANITY_CHECK(magnitude);
- CPU_SANITY_CHECK(angle);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // PolarToCart
- PERF_TEST_P(Sz_Type_AngleInDegrees, PolarToCart,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- testing::Values(CV_32FC1, CV_64FC1),
- Bool()))
- {
- const cv::Size size = GET_PARAM(0);
- const int type = GET_PARAM(1);
- const bool angleInDegrees = GET_PARAM(2);
- cv::Mat magnitude(size, type);
- declare.in(magnitude, WARMUP_RNG);
- cv::Mat angle(size, type);
- declare.in(angle, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_magnitude(magnitude);
- const cv::cuda::GpuMat d_angle(angle);
- cv::cuda::GpuMat x;
- cv::cuda::GpuMat y;
- TEST_CYCLE() cv::cuda::polarToCart(d_magnitude, d_angle, x, y, angleInDegrees);
- CUDA_SANITY_CHECK(x);
- CUDA_SANITY_CHECK(y);
- }
- else
- {
- cv::Mat x;
- cv::Mat y;
- TEST_CYCLE() cv::polarToCart(magnitude, angle, x, y, angleInDegrees);
- CPU_SANITY_CHECK(x);
- CPU_SANITY_CHECK(y);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // Threshold
- CV_ENUM(ThreshOp, cv::THRESH_BINARY, cv::THRESH_BINARY_INV, cv::THRESH_TRUNC, cv::THRESH_TOZERO, cv::THRESH_TOZERO_INV)
- DEF_PARAM_TEST(Sz_Depth_Op, cv::Size, MatDepth, ThreshOp);
- PERF_TEST_P(Sz_Depth_Op, Threshold,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F),
- ThreshOp::all()))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int threshOp = GET_PARAM(2);
- cv::Mat src(size, depth);
- declare.in(src, WARMUP_RNG);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::threshold(d_src, dst, 100.0, 255.0, threshOp);
- CUDA_SANITY_CHECK(dst, 1e-10);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::threshold(src, dst, 100.0, 255.0, threshOp);
- CPU_SANITY_CHECK(dst);
- }
- }
- //////////////////////////////////////////////////////////////////////
- // InRange
- PERF_TEST_P(Sz_Depth_Cn, InRange,
- Combine(CUDA_TYPICAL_MAT_SIZES,
- Values(CV_8U, CV_16U, CV_32F, CV_64F),
- CUDA_CHANNELS_1_3_4))
- {
- const cv::Size size = GET_PARAM(0);
- const int depth = GET_PARAM(1);
- const int channels = GET_PARAM(2);
- cv::Mat src(size, CV_MAKE_TYPE(depth, channels));
- declare.in(src, WARMUP_RNG);
- const cv::Scalar lowerb(10, 50, 100);
- const cv::Scalar upperb(70, 85, 200);
- if (PERF_RUN_CUDA())
- {
- const cv::cuda::GpuMat d_src(src);
- cv::cuda::GpuMat dst;
- TEST_CYCLE() cv::cuda::inRange(d_src, lowerb, upperb, dst);
- CUDA_SANITY_CHECK(dst, 0);
- }
- else
- {
- cv::Mat dst;
- TEST_CYCLE() cv::inRange(src, lowerb, upperb, dst);
- CPU_SANITY_CHECK(dst);
- }
- }
- }} // namespace
|