MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / push_back

Method push_back

subprojects/llama.cpp/common/sampling.cpp:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 }
44
45 void push_back(const T & value) {
46 if (sz == capacity) {
47 // advance the start when buffer is full
48 first = (first + 1) % capacity;
49 } else {
50 sz++;
51 }
52 data[pos] = value;
53 pos = (pos + 1) % capacity;
54 }
55
56 T pop_front() {
57 if (sz == 0) {

Callers 6

to_vectorMethod · 0.45
common_sampler_initFunction · 0.45
common_sampler_acceptFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected