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

Function f32_data

engine/src/split/src/model.cpp:206–210  ·  view source on GitHub ↗

an F32 tensor's first n values, read on the host

Source from the content-addressed store, hash-verified

204
205// an F32 tensor's first n values, read on the host
206const float* f32_data(const Tensor& t, size_t n) {
207 if (t.type != T_F32) throw std::runtime_error(t.name + " is not F32");
208 if (t.nbytes < n * sizeof(float)) throw std::runtime_error(t.name + " holds fewer than " + std::to_string(n) + " values");
209 return (const float*) t.data;
210}
211
212// The host-read tables locked in RAM as far as this machine lets the engine (memlock.hpp): the memory-lock limit raised as far as the hard limit allows, the free RAM
213// respected, the parts locked in the order given, the rest read into memory by the same 16 threads. Never a failed start because of the lock. Returns the one log

Callers 2

load_layers_27bFunction · 0.85
load_cardFunction · 0.85

Calls 1

to_stringFunction · 0.50

Tested by

no test coverage detected