an F32 tensor's first n values, read on the host
| 204 | |
| 205 | // an F32 tensor's first n values, read on the host |
| 206 | const 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 |
no test coverage detected