MCPcopy Create free account
hub / github.com/alibaba/zvec / reset

Method reset

src/ailego/container/vector_array.h:305–310  ·  view source on GitHub ↗

Reset the vector array

Source from the content-addressed store, hash-verified

303
304 //! Reset the vector array
305 void reset(size_t dim) {
306 dimension_ = (dim + (sizeof(ValueType) << 1) - 1) /
307 (sizeof(ValueType) << 1) * sizeof(ValueType)
308 << 1;
309 buffer_.clear();
310 }
311
312 //! Requests the removal of unused capacity.
313 void shrink_to_fit() {

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected