| 27 | } |
| 28 | |
| 29 | CvMatToOpInput::~CvMatToOpInput() |
| 30 | { |
| 31 | try |
| 32 | { |
| 33 | #ifdef USE_CUDA |
| 34 | if (mGpuResize) |
| 35 | { |
| 36 | // Free temporary memory |
| 37 | cudaCheck(__LINE__, __FUNCTION__, __FILE__); |
| 38 | if (pInputImageCuda != nullptr) |
| 39 | { |
| 40 | cudaFree(pInputImageCuda); |
| 41 | pInputImageCuda = nullptr; |
| 42 | } |
| 43 | if (pOutputImageCuda != nullptr) |
| 44 | { |
| 45 | cudaFree(pOutputImageCuda); |
| 46 | pOutputImageCuda = nullptr; |
| 47 | } |
| 48 | if (pInputImageReorderedCuda != nullptr) |
| 49 | { |
| 50 | cudaFree(pInputImageReorderedCuda); |
| 51 | pInputImageReorderedCuda = nullptr; |
| 52 | } |
| 53 | cudaCheck(__LINE__, __FUNCTION__, __FILE__); |
| 54 | } |
| 55 | #endif |
| 56 | } |
| 57 | catch (const std::exception& e) |
| 58 | { |
| 59 | errorDestructor(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | std::vector<Array<float>> CvMatToOpInput::createArray( |
| 64 | const Matrix& inputData, const std::vector<double>& scaleInputToNetInputs, |
nothing calls this directly
no test coverage detected