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

Method push_back

smallthinker/common/sampling.cpp:44–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

ggml_cl_h2d_tensor_2dFunction · 0.45
buffered_allocMethod · 0.45
resegmentMethod · 0.45
tokenizeMethod · 0.45
llama_tokenize_internalFunction · 0.45
decode_utf8Function · 0.45
llama_grammar_acceptFunction · 0.45
llama_grammar_initFunction · 0.45
llama_sample_typicalFunction · 0.45
llama_sample_grammarFunction · 0.45

Calls

no outgoing calls

Tested by 6

mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36