MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / slice

Method slice

src/include/array_view.h:280–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278 void clear() { m_data = NULL; m_len = 0; m_stride = 0; }
279
280 array_view_strided slice (size_type pos, size_type n=npos) const {
281 if (pos > size())
282 throw (std::out_of_range ("OIIO::array_view_strided::slice"));
283 if (n == npos || pos + n > size())
284 n = size() - pos;
285 return array_view_strided (getptr(pos), n, m_stride);
286 }
287
288 friend bool operator== (array_view_strided<T> x, array_view_strided<T> y) {
289 if (x.size() != y.size()) // shortcut: different sizes are not ==

Callers

nothing calls this directly

Calls 3

array_view_stridedClass · 0.85
sizeFunction · 0.70
getptrFunction · 0.70

Tested by

no test coverage detected