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

Function generate_data

tests/test-quantize-fns.cpp:26–30  ·  view source on GitHub ↗

Generate synthetic data

Source from the content-addressed store, hash-verified

24
25// Generate synthetic data
26static void generate_data(float offset, size_t n, float * dst) {
27 for (size_t i = 0; i < n; i++) {
28 dst[i] = 0.1 + 2*cosf(i + offset);
29 }
30}
31
32// Calculate RMSE between two float arrays
33static float array_rmse(const float * a1, const float * a2, size_t n) {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected