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

Function wrap

external/ggml/tests/test-roll.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include <vector>
14
15int64_t wrap(int64_t i, int64_t ne) {
16 if (i < 0) {
17 return i + ne;
18 } else if (i >= ne) {
19 return i - ne;
20 }
21 return i;
22}
23
24std::vector<float> roll_reference(
25 const float * src, std::array<int64_t, 4> ne, std::array<int, 4> shift) {

Callers 1

roll_referenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected