core/ocl: added perf test infra + "Add" perf test

This commit is contained in:
Alexander Alekhin
2013-12-02 21:37:32 +04:00
parent fe01bc21c0
commit 7d9150460a
7 changed files with 299 additions and 9 deletions

View File

@@ -865,9 +865,18 @@ void TestBase::declareArray(SizeVector& sizes, cv::InputOutputArray a, WarmUpTyp
void TestBase::warmup(cv::InputOutputArray a, WarmUpType wtype)
{
if (a.empty()) return;
if (a.kind() != cv::_InputArray::STD_VECTOR_MAT && a.kind() != cv::_InputArray::STD_VECTOR_VECTOR)
if (a.empty())
{
return;
}
else if (a.isUMat())
{
return; // TODO current warmup_impl is not useful for GPU-based data
}
else if (a.kind() != cv::_InputArray::STD_VECTOR_MAT && a.kind() != cv::_InputArray::STD_VECTOR_VECTOR)
{
warmup_impl(a.getMat(), wtype);
}
else
{
size_t total = a.total();