MCPcopy Create free account
hub / github.com/davisking/dlib / operator+

Method operator+

dlib/cuda/cuda_data_ptr.h:82–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 !*/
81
82 cuda_data_void_ptr operator+ (size_t offset) const
83 /*!
84 requires
85 - offset < size()
86 ensures
87 - returns a pointer that is offset by the given amount.
88 !*/
89 {
90 DLIB_CASSERT(offset < num);
91 cuda_data_void_ptr temp;
92 temp.num = num-offset;
93 temp.pdata = std::shared_ptr<void>(pdata, ((char*)pdata.get())+offset);
94 return temp;
95 }
96
97 void shrink(size_t new_size)
98 /*!

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected