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

Function encode_fill

engine/metal/src/gpu/runtime.cpp:221–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221Error encode_fill(StreamImpl* s, void* p, int value, size_t n) {
222 size_t off = 0;
223 const Alloc* a = find(p, &off);
224 if (!a) return fail(kErrorInvalidValue);
225 check_purged(a, "fill");
226 end_encoder(s);
227 MTL::BlitCommandEncoder* b = open_cb(s)->blitCommandEncoder();
228 b->fillBuffer(a->buf, NS::Range::Make(off, n), (uint8_t) value);
229 b->endEncoding();
230 ++rt().stats.blits;
231 return kSuccess;
232}
233
234Error encode_dispatch(StreamImpl* s, const Op& o) {
235 MTL::ComputeCommandEncoder* e = encoder(s);

Callers 3

run_opFunction · 0.85
memset_deviceFunction · 0.85
memset_asyncFunction · 0.85

Calls 5

check_purgedFunction · 0.85
end_encoderFunction · 0.85
open_cbFunction · 0.85
findFunction · 0.70
failFunction · 0.70

Tested by

no test coverage detected