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

Function generate_data

tests/test-quantize-perf.cpp:64–68  ·  view source on GitHub ↗

Generate synthetic data

Source from the content-addressed store, hash-verified

62
63// Generate synthetic data
64static void generate_data(float offset, size_t n, float * dst) {
65 for (size_t i = 0; i < n; i++) {
66 dst[i] = 0.1 + 2*cosf(i + offset);
67 }
68}
69
70static float gigabytes_per_second(size_t bytes, int64_t usecs) {
71 return bytes / (float) usecs * 1000000 / (1024*1024*1024);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected