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

Method setTo

src/openpose/core/array.cpp:400–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399 template<typename T>
400 void Array<T>::setTo(const T value)
401 {
402 try
403 {
404 if (mVolume > 0)
405 {
406 // OpenCV is efficient on copying (AVX, SSE, etc.)
407 if (mCvMatData.first)
408 mCvMatData.second.setTo((double)value);
409 else
410 for (auto i = 0u ; i < mVolume ; i++)
411 operator[](i) = value;
412 }
413 }
414 catch (const std::exception& e)
415 {
416 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
417 }
418 }
419
420 template<typename T>
421 int Array<T>::getSize(const int index) const

Callers 1

renderPoseKeypointsCpuFunction · 0.45

Calls 2

whatMethod · 0.80
errorFunction · 0.50

Tested by

no test coverage detected