MCPcopy Create free account
hub / github.com/antirez/ds4 / model_map_span_vec_finish

Function model_map_span_vec_finish

ds4.c:4306–4323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4304 if (t->ndim != ndim) {
4305 fprintf(stderr,
4306 "ds4: tensor %.*s has %u dimensions, expected %u\n",
4307 (int)t->name.len,
4308 t->name.ptr,
4309 t->ndim,
4310 ndim);
4311 exit(1);
4312 }
4313
4314 const uint64_t want[3] = { d0, d1, d2 };
4315 for (uint32_t i = 0; i < ndim; i++) {
4316 if (t->dim[i] == want[i]) continue;
4317 fprintf(stderr,
4318 "ds4: tensor %.*s has dim[%u]=%" PRIu64 ", expected %" PRIu64 "\n",
4319 (int)t->name.len,
4320 t->name.ptr,
4321 i,
4322 t->dim[i],
4323 want[i]);
4324 exit(1);
4325 }
4326}

Calls

no outgoing calls

Tested by

no test coverage detected