MCPcopy Create free account
hub / github.com/creatale/node-dv / swap

Function swap

deps/opencv/modules/core/src/matrix.cpp:54–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52namespace cv {
53
54void swap( Mat& a, Mat& b )
55{
56 std::swap(a.flags, b.flags);
57 std::swap(a.dims, b.dims);
58 std::swap(a.rows, b.rows);
59 std::swap(a.cols, b.cols);
60 std::swap(a.data, b.data);
61 std::swap(a.refcount, b.refcount);
62 std::swap(a.datastart, b.datastart);
63 std::swap(a.dataend, b.dataend);
64 std::swap(a.datalimit, b.datalimit);
65 std::swap(a.allocator, b.allocator);
66
67 std::swap(a.size.p, b.size.p);
68 std::swap(a.step.p, b.step.p);
69 std::swap(a.step.buf[0], b.step.buf[0]);
70 std::swap(a.step.buf[1], b.step.buf[1]);
71
72 if( a.step.p == b.step.buf )
73 {
74 a.step.p = a.step.buf;
75 a.size.p = &a.rows;
76 }
77
78 if( b.step.p == a.step.buf )
79 {
80 b.step.p = b.step.buf;
81 b.size.p = &b.rows;
82 }
83}
84
85
86static inline void setSize( Mat& m, int _dims, const int* _sz,

Callers 15

transposeMethod · 0.70
LUImplFunction · 0.70
JacobiImpl_Function · 0.70
JacobiSVDImpl_Function · 0.70
_SVDcomputeFunction · 0.70
gpumat.cppFile · 0.70
swapMethod · 0.70
medianPartitionFunction · 0.70
findNearestMethod · 0.70
addMethod · 0.70
randShuffle_Function · 0.70
transposeI_Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected