MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / to_vector

Method to_vector

smallthinker/src/llama-sampling.cpp:99–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 }
98
99 std::vector<T> to_vector() const {
100 std::vector<T> result;
101 result.reserve(sz);
102 for (size_t i = 0; i < sz; i++) {
103 result.push_back(data[(first + i) % capacity]);
104 }
105 return result;
106 }
107
108 void clear() {
109 // here only reset the status of the buffer

Callers

nothing calls this directly

Calls 2

reserveMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected