MCPcopy Create free account
hub / github.com/ROCm/clr / GetAccess

Method GetAccess

hipamd/src/hip_mempool_impl.cpp:479–489  ·  view source on GitHub ↗

================================================================================================

Source from the content-addressed store, hash-verified

477
478// ================================================================================================
479void MemoryPool::GetAccess(hip::Device* device, hipMemAccessFlags* flags) {
480 amd::ScopedLock lock(lock_pool_ops_);
481
482 // Current pool device has full access to memory allocation
483 *flags = (device == device_) ? hipMemAccessFlagsProtReadWrite : hipMemAccessFlagsProtNone;
484
485 // Check if access was enabled before
486 if (access_map_.find(device) != access_map_.end()) {
487 *flags = access_map_[device];
488 }
489}
490
491// ================================================================================================
492void MemoryPool::FreeAllMemory(Stream* stream) {

Callers 2

hipMemPoolGetAccessFunction · 0.45
capturehipMallocAsyncFunction · 0.45

Calls 1

endMethod · 0.45

Tested by

no test coverage detected