提交 c326de43 编写于 作者: A Andrey Kamaev

More natural sorting of MatType constants in performance reports.

上级 61cb83b4
......@@ -87,7 +87,7 @@ PERF_TEST_P(Size_MatType, meanStdDev_mask, TYPICAL_MATS)
SANITY_CHECK(dev, 1e-6);
}
PERF_TEST_P(Size_MatType, countNonZero, TYPICAL_MATS_C1)
PERF_TEST_P(Size_MatType, countNonZero, testing::Combine( testing::Values( TYPICAL_MAT_SIZES ), testing::Values( CV_8UC1, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32FC1, CV_64FC1 ) ))
{
Size sz = get<0>(GetParam());
int matType = get<1>(GetParam());
......
......@@ -232,10 +232,10 @@ typedef int (*CountNonZeroFunc)(const uchar*, int);
static CountNonZeroFunc countNonZeroTab[] =
{
(CountNonZeroFunc)GET_OPTIMIZED(countNonZero8u), (CountNonZeroFunc)(countNonZero8u),
(CountNonZeroFunc)(countNonZero16u), (CountNonZeroFunc)(countNonZero16u),
(CountNonZeroFunc)(countNonZero32s), (CountNonZeroFunc)GET_OPTIMIZED(countNonZero32f),
(CountNonZeroFunc)countNonZero64f, 0
(CountNonZeroFunc)GET_OPTIMIZED(countNonZero8u), (CountNonZeroFunc)GET_OPTIMIZED(countNonZero8u),
(CountNonZeroFunc)GET_OPTIMIZED(countNonZero16u), (CountNonZeroFunc)GET_OPTIMIZED(countNonZero16u),
(CountNonZeroFunc)GET_OPTIMIZED(countNonZero32s), (CountNonZeroFunc)GET_OPTIMIZED(countNonZero32f),
(CountNonZeroFunc)GET_OPTIMIZED(countNonZero64f), 0
};
......
......@@ -2,8 +2,13 @@ import testlog_parser, sys, os, xml, glob, re
from table_formatter import *
from optparse import OptionParser
convert = lambda text: int(text) if text.isdigit() else text
alphanum_keyselector = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ]
numeric_re = re.compile("(\d+)")
cvtype_re = re.compile("(8U|8S|16U|16S|32S|32F|64F)C(\d{1,3})")
cvtypes = { '8U': 0, '8S': 1, '16U': 2, '16S': 3, '32S': 4, '32F': 5, '64F': 6 }
convert = lambda text: int(text) if text.isdigit() else text
keyselector = lambda a: cvtype_re.sub(lambda match: " " + str(cvtypes.get(match.group(1), 7) + (int(match.group(2))-1) * 8) + " ", a)
alphanum_keyselector = lambda key: [ convert(c) for c in numeric_re.split(keyselector(key)) ]
def getSetName(tset, idx, columns, short = True):
if columns and len(columns) > idx:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册