MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / ~CvMatToOpInput

Method ~CvMatToOpInput

src/openpose/core/cvMatToOpInput.cpp:29–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 3

cudaCheckFunction · 0.85
whatMethod · 0.80
errorDestructorFunction · 0.50

Tested by

no test coverage detected