MCPcopy Create free account
hub / github.com/davisking/dlib / shrink

Method shrink

dlib/cuda/cuda_data_ptr.h:97–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 void shrink(size_t new_size)
98 /*!
99 requires
100 - new_size <= num
101 ensures
102 - #size() == new_size
103 - Doesn't actually deallocate anything, just changes the size() metadata to a
104 smaller number and only for this instance of the pointer.
105 !*/
106 {
107 DLIB_CASSERT(new_size <= num);
108 num = new_size;
109 }
110
111 private:
112

Callers 1

cuda_data_ptrClass · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected