| 584 | } |
| 585 | |
| 586 | bool 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 | |
| 601 | strata::kernels::QsaShapes shapes_of(const ModelGeometry& g) { return qsa_shapes(g); } |
| 602 |
no test coverage detected