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

Function mapped

engine/src/core/dflash2.cpp:30–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28double ms_since(Clock::time_point t) { return std::chrono::duration<double, std::milli>(Clock::now() - t).count(); }
29
30bool mapped(size_t bytes, void** h, void** d) {
31 if (cudaHostAlloc(h, bytes, cudaHostAllocMapped) != cudaSuccess) return false;
32 std::memset(*h, 0, bytes);
33 return cudaHostGetDevicePointer(d, *h, 0) == cudaSuccess;
34}
35
36constexpr int GGML_Q8_0 = 8;
37

Callers 1

allocMethod · 0.70

Calls 2

cudaHostAllocFunction · 0.50
cudaHostGetDevicePointerFunction · 0.50

Tested by

no test coverage detected