| 131 | } |
| 132 | |
| 133 | void TensorAllocator::allocate() |
| 134 | { |
| 135 | // Align to 64-byte boundaries by default if alignment is not specified |
| 136 | const size_t alignment_to_use = (alignment() != 0) ? alignment() : 64; |
| 137 | if (_associated_memory_group == nullptr) |
| 138 | { |
| 139 | _memory.set_owned_region(std::make_unique<MemoryRegion>(info().total_size(), alignment_to_use)); |
| 140 | } |
| 141 | else |
| 142 | { |
| 143 | _associated_memory_group->finalize_memory(_owner, _memory, info().total_size(), alignment_to_use); |
| 144 | } |
| 145 | info().set_is_resizable(false); |
| 146 | } |
| 147 | |
| 148 | void TensorAllocator::free() |
| 149 | { |
nothing calls this directly
no test coverage detected