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

Function host_device_pointer_raw

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

Source from the content-addressed store, hash-verified

421}
422Error host_unregister(void* p) { return free_alloc(p); }
423Error host_device_pointer_raw(void** dev, void* host) {
424 size_t off = 0;
425 const Alloc* a = find(host, &off);
426 if (!a) return fail(kErrorInvalidValue);
427 *dev = (void*) (uintptr_t) (a->gpu + off);
428 return kSuccess;
429}
430Error memset_device(void* p, int value, size_t bytes) {
431 StreamImpl* s = S(nullptr);
432 const Error e = encode_fill(s, p, value, bytes);

Callers 1

host_device_pointerFunction · 0.85

Calls 2

findFunction · 0.70
failFunction · 0.70

Tested by

no test coverage detected