MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ProcessBufferInfoFormat

Function ProcessBufferInfoFormat

python/common/PyUtil.cpp:92–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92static std::string ProcessBufferInfoFormat(const std::string &fmt)
93{
94 // pybind11 (as of v2.6.2) doesn't recognize formats 'l' and 'L',
95 // which according to https://docs.python.org/3/library/struct.html#format-characters
96 // are equal to 'i' and 'I', respectively.
97 if (fmt == "l")
98 {
99 return "i";
100 }
101 else if (fmt == "L")
102 {
103 return "I";
104 }
105 else
106 {
107 return fmt;
108 }
109}
110
111py::dtype ToDType(const py::buffer_info &info)
112{

Callers 1

ToDTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected