MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / nearest_int

Function nearest_int

external/ggml/src/ggml-cpu/repack.cpp:27–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#define UNUSED GGML_UNUSED
26
27static inline int nearest_int(float fval) {
28 assert(fabsf(fval) <= 4194303.f);
29 float val = fval + 12582912.f;
30 int i; memcpy(&i, &val, sizeof(int));
31 return (i & 0x007fffff) - 0x00400000;
32}
33
34// Functions to create the interleaved data layout formats
35

Calls

no outgoing calls

Tested by

no test coverage detected