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

Function writeElems

deps/opencv/modules/core/src/out.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55template<typename _Tp> static void writeElems(std::ostream& out, const _Tp* data,
56 int nelems, int cn, char obrace, char cbrace)
57{
58 typedef typename DataType<_Tp>::work_type _WTp;
59 nelems *= cn;
60 for(int i = 0; i < nelems; i += cn)
61 {
62 if(cn == 1)
63 {
64 out << (_WTp)data[i] << (i+1 < nelems ? ", " : "");
65 continue;
66 }
67 out << obrace;
68 for(int j = 0; j < cn; j++)
69 out << (_WTp)data[i + j] << (j+1 < cn ? ", " : "");
70 out << cbrace << (i+cn < nelems ? ", " : "");
71 }
72}
73
74
75static void writeElems(std::ostream& out, const void* data, int nelems, int type, char brace)

Callers 6

writeMatFunction · 0.85
writeMethod · 0.85
writeMethod · 0.85
writeMethod · 0.85
writeMethod · 0.85
writeMethod · 0.85

Calls 1

getCloseBraceFunction · 0.85

Tested by

no test coverage detected