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

Function alloc_bytes

engine/src/core/native_dense.cpp:38–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36constexpr uint64_t kAllocGranule = 2ull << 20;
37constexpr uint64_t kSmallAlloc = 1ull << 20;
38uint64_t alloc_bytes(uint64_t bytes) {
39 return bytes < kSmallAlloc ? bytes : (bytes + kAllocGranule - 1) / kAllocGranule * kAllocGranule;
40}
41int g_layer_lb = -1, g_layer_le = -1; // set_layer_range; -1: every layer
42bool in_range(const std::string& name) {
43 if (g_layer_lb < 0 || name.rfind("blk.", 0) != 0) return true;

Callers 2

weight_bytes_forMethod · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected