| 117 | } // namespace |
| 118 | |
| 119 | XRTBufferAllocation::XRTBufferAllocation(const se::DeviceMemoryBase& allocation, |
| 120 | int device_ordinal, |
| 121 | se::DeviceMemoryAllocator* allocator) |
| 122 | : allocation_(allocation), |
| 123 | device_ordinal_(device_ordinal), |
| 124 | allocator_(allocator) { |
| 125 | if (VLOG_IS_ON(2)) { |
| 126 | auto stats = |
| 127 | GetAllocStats()->ReportAlloc(device_ordinal_, allocation_.size()); |
| 128 | LOG(INFO) << "XRT Allocation Stats: device=" << device_ordinal_ |
| 129 | << " count=" << stats.count << " size=" << stats.size; |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | XRTBufferAllocation::~XRTBufferAllocation() { |
| 134 | if (VLOG_IS_ON(2)) { |
nothing calls this directly
no test coverage detected