added perf tests for T-API core functions
This commit is contained in:
@@ -268,7 +268,8 @@ std::string Regression::getCurrentTestNodeName()
|
||||
|
||||
bool Regression::isVector(cv::InputArray a)
|
||||
{
|
||||
return a.kind() == cv::_InputArray::STD_VECTOR_MAT || a.kind() == cv::_InputArray::STD_VECTOR_VECTOR;
|
||||
return a.kind() == cv::_InputArray::STD_VECTOR_MAT || a.kind() == cv::_InputArray::STD_VECTOR_VECTOR ||
|
||||
a.kind() == cv::_InputArray::STD_VECTOR_UMAT;
|
||||
}
|
||||
|
||||
double Regression::getElem(cv::Mat& m, int y, int x, int cn)
|
||||
@@ -866,17 +867,27 @@ void TestBase::declareArray(SizeVector& sizes, cv::InputOutputArray a, WarmUpTyp
|
||||
void TestBase::warmup(cv::InputOutputArray a, WarmUpType wtype)
|
||||
{
|
||||
if (a.empty())
|
||||
return;
|
||||
else if (a.isUMat() && wtype != WARMUP_READ)
|
||||
{
|
||||
int depth = a.depth();
|
||||
if (depth == CV_8U)
|
||||
cv::randu(a, 0, 256);
|
||||
else if (depth == CV_8S)
|
||||
cv::randu(a, -128, 128);
|
||||
else if (depth == CV_16U)
|
||||
cv::randu(a, 0, 1024);
|
||||
else if (depth == CV_32F || depth == CV_64F)
|
||||
cv::randu(a, -1.0, 1.0);
|
||||
else if (depth == CV_16S || depth == CV_32S)
|
||||
cv::randu(a, -4096, 4096);
|
||||
else
|
||||
CV_Error(cv::Error::StsUnsupportedFormat, "Unsupported format");
|
||||
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user