Helper function to allocate workspace.
| 3321 | |
| 3322 | // Helper function to allocate workspace. |
| 3323 | port::Status AllocateWorkspace(void** workspace, |
| 3324 | ScratchAllocator* scratch_allocator, |
| 3325 | size_t num_bytes) { |
| 3326 | SE_ASSIGN_OR_RETURN(DeviceMemory<uint8> workspace_bytes, |
| 3327 | scratch_allocator->AllocateBytes(num_bytes)); |
| 3328 | *workspace = (void*)GpuMemoryMutable(&workspace_bytes); |
| 3329 | return port::Status::OK(); |
| 3330 | } |
| 3331 | |
| 3332 | template<typename T> |
| 3333 | blas::ComputationType ToComputationType(); |
no test coverage detected