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

Method getSize

src/openpose/core/array.cpp:421–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419
420 template<typename T>
421 int Array<T>::getSize(const int index) const
422 {
423 try
424 {
425 // Matlab style:
426 // If empty -> return 0
427 // If index >= # dimensions -> return 1
428 if ((unsigned int)index < mSize.size() && 0 <= index)
429 return mSize[index];
430 // Long version:
431 // else if (mSize.empty())
432 // return 0;
433 // else // if mSize.size() <= (unsigned int)index
434 // return 1;
435 // Equivalent to:
436 else
437 return (!mSize.empty());
438 }
439 catch (const std::exception& e)
440 {
441 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
442 return 0;
443 }
444 }
445
446 template<typename T>
447 std::string Array<T>::printSize() const

Callers 15

castMethod · 0.45
castMethod · 0.45
reconstructArrayThreadFunction · 0.45
adamFastFitMethod · 0.45
formatToCvMatMethod · 0.45
ArrayCpuGpuMethod · 0.45
ArrayMethod · 0.45
keepTopPeopleMethod · 0.45
unrollArrayToUCharCvMatFunction · 0.45
getDistanceFunction · 0.45
averageKeypointsFunction · 0.45
scaleKeypointsFunction · 0.45

Calls 4

whatMethod · 0.80
errorFunction · 0.50
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected