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

Function mapped

engine/src/core/verify.cpp:586–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584}
585
586bool mapped(size_t bytes, void** h, void** d) {
587#if defined(STRATA_USE_HIP)
588 if (g_coherent) {
589 if (hipHostMalloc(h, bytes, hipHostMallocMapped | hipHostMallocCoherent |
590 (peer_portable() ? hipHostMallocPortable : 0)) != hipSuccess)
591 return false;
592 std::memset(*h, 0, bytes);
593 return cudaHostGetDevicePointer(d, *h, 0) == cudaSuccess;
594 }
595#endif
596 if (strata::core::host_alloc_guarded(h, bytes, cudaHostAllocMapped | (peer_portable() ? cudaHostAllocPortable : 0)) != cudaSuccess) return false; // multi-GPU: portable only with a peer - the peer card writes its rows into them
597 std::memset(*h, 0, bytes);
598 return cudaHostGetDevicePointer(d, *h, 0) == cudaSuccess;
599}
600
601strata::kernels::QsaShapes shapes_of(const ModelGeometry& g) { return qsa_shapes(g); }
602

Callers 3

verify.cppFile · 0.70
init_slotsMethod · 0.70
init_deferred_commitMethod · 0.70

Calls 3

host_alloc_guardedFunction · 0.85
peer_portableFunction · 0.70
cudaHostGetDevicePointerFunction · 0.50

Tested by

no test coverage detected