| 52 | |
| 53 | template<typename TDatums> |
| 54 | void WCvMatToOpInput<TDatums>::work(TDatums& tDatums) |
| 55 | { |
| 56 | try |
| 57 | { |
| 58 | if (checkNoNullNorEmpty(tDatums)) |
| 59 | { |
| 60 | // Debugging log |
| 61 | opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 62 | // Profiling speed |
| 63 | const auto profilerKey = Profiler::timerInit(__LINE__, __FUNCTION__, __FILE__); |
| 64 | // cv::Mat -> float* |
| 65 | for (auto& tDatumPtr : *tDatums) |
| 66 | tDatumPtr->inputNetData = spCvMatToOpInput->createArray( |
| 67 | tDatumPtr->cvInputData, tDatumPtr->scaleInputToNetInputs, tDatumPtr->netInputSizes); |
| 68 | // Profiling speed |
| 69 | Profiler::timerEnd(profilerKey); |
| 70 | Profiler::printAveragedTimeMsOnIterationX(profilerKey, __LINE__, __FUNCTION__, __FILE__); |
| 71 | // Debugging log |
| 72 | opLogIfDebug("", Priority::Low, __LINE__, __FUNCTION__, __FILE__); |
| 73 | } |
| 74 | } |
| 75 | catch (const std::exception& e) |
| 76 | { |
| 77 | this->stop(); |
| 78 | tDatums = nullptr; |
| 79 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | COMPILE_TEMPLATE_DATUM(WCvMatToOpInput); |
| 84 | } |
nothing calls this directly
no test coverage detected