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

Function launch_host_func

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

Source from the content-addressed store, hash-verified

505 return wait_event(s, e);
506}
507Error launch_host_func(Stream st, HostFn fn, void* arg) {
508 // skeleton: in stream order by completing the stream first (the engine's uses are rare; Phase 2 replaces this by a
509 // completion handler + a shared-event wait so the host thread does not block)
510 StreamImpl* s = S(st);
511 if (s->rec) return fail(kErrorUnsupported);
512 flush(s);
513 wait_value(s->tl, s->submitted);
514 fn(arg);
515 return kSuccess;
516}
517
518Error event_create(Event* e, unsigned) { *e = new EventImpl; return kSuccess; }
519Error event_destroy(Event e) {

Callers 1

cudaLaunchHostFuncFunction · 0.85

Calls 5

wait_valueFunction · 0.85
SFunction · 0.70
failFunction · 0.70
flushFunction · 0.70
fnFunction · 0.50

Tested by

no test coverage detected