| 45 | namespace c_api { |
| 46 | |
| 47 | constexpr mm::memory_kind_id GetMemoryKind(const daliBufferPlacement_t &placement) { |
| 48 | if (placement.device_type == DALI_STORAGE_GPU) { |
| 49 | return mm::memory_kind_id::device; |
| 50 | } else { |
| 51 | assert(placement.device_type == DALI_STORAGE_CPU); |
| 52 | return placement.pinned ? mm::memory_kind_id::pinned : mm::memory_kind_id::host; |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | ////////////////////////////////////////////////////////////////////////////// |
| 57 | // Interfaces |