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

Method clone

src/openpose/core/array.cpp:263–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261
262 template<typename T>
263 Array<T> Array<T>::clone() const
264 {
265 try
266 {
267 // Constructor
268 Array<T> array{mSize};
269 // Clone data
270 // Equivalent: std::copy(spData.get(), spData.get() + mVolume, array.spData.get());
271 std::copy(pData, pData + mVolume, array.pData);
272 // Return
273 return array;
274 }
275 catch (const std::exception& e)
276 {
277 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
278 return Array<T>{};
279 }
280 }
281
282 template<typename T>
283 void Array<T>::reset(const int size)

Callers 15

CameraParameterReaderMethod · 0.45
readAndUndistortImageMethod · 0.45
keepTopPeopleMethod · 0.45
IntrinsicsMethod · 0.45
refineAndSaveExtrinsicsFunction · 0.45
reorderPointsFunction · 0.45
plotGridCornersFunction · 0.45
renderFaceMethod · 0.45
displayFrameMethod · 0.45
trackMethod · 0.45

Calls 3

copyFunction · 0.85
whatMethod · 0.80
errorFunction · 0.50

Tested by

no test coverage detected