MCPcopy Create free account
hub / github.com/Niko1221/Strata / pattern

Function pattern

engine/src/core/conversation_file_test.cpp:44–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44ConversationBuffer pattern(size_t n, uint8_t seed) {
45 ConversationBuffer b;
46 b.resize(n);
47 b.visit(0, n, [&](uint8_t* p, size_t c, size_t at) {
48 for (size_t i = 0; i < c; ++i) p[i] = uint8_t((at + i) * 131u + seed);
49 return true;
50 });
51 return b;
52}
53
54std::vector<uint8_t> bytes_of(size_t n, uint8_t seed) {
55 std::vector<uint8_t> v(n);

Callers 1

sampleFunction · 0.70

Calls 2

visitMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected