| 133 | |
| 134 | template <typename T> |
| 135 | port::StatusOr<std::unique_ptr<TemporaryDeviceMemory<T>>> |
| 136 | TemporaryMemoryManager::AllocateArray(uint64 element_count) { |
| 137 | port::StatusOr<std::unique_ptr<TemporaryDeviceMemoryBase>> temporary_memory = |
| 138 | AllocateArrayBase(element_count, sizeof(T)); |
| 139 | if (!temporary_memory.ok()) { |
| 140 | return temporary_memory.status(); |
| 141 | } |
| 142 | |
| 143 | return std::unique_ptr<TemporaryDeviceMemory<T>>( |
| 144 | reinterpret_cast<TemporaryDeviceMemory<T>*>( |
| 145 | temporary_memory.ConsumeValueOrDie().release())); |
| 146 | } |
| 147 | |
| 148 | } // namespace internal |
| 149 | } // namespace stream_executor |
nothing calls this directly
no test coverage detected