MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / nearest_int

Function nearest_int

tools/perplexity/perplexity.cpp:72–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static inline int nearest_int(float fval) {
73 //assert(fval <= 4194303.f);
74 float val = fval + 12582912.f;
75 int i; memcpy(&i, &val, sizeof(int));
76 return (i & 0x007fffff) - 0x00400000;
77}
78
79static double log_softmax(int n_vocab, const float * logits, uint16_t * log_prob, int tok) {
80 float max_logit = logits[0];

Callers 1

log_softmaxFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected