| 63 | } |
| 64 | |
| 65 | EXPORT_C_FUNC XResult CudaQueueGet(HwQueueHandle *hwq, CUstream stream) |
| 66 | { |
| 67 | if (hwq == nullptr) { |
| 68 | XWARN("CudaQueueGet failed: hwq is nullptr"); |
| 69 | return kXSchedErrorInvalidValue; |
| 70 | } |
| 71 | if (stream == nullptr) { |
| 72 | XWARN("CudaQueueGet failed: does not support default stream"); |
| 73 | return kXSchedErrorNotSupported; |
| 74 | } |
| 75 | |
| 76 | HwQueueHandle hwq_h = GetHwQueueHandle(stream); |
| 77 | auto hwq_shptr = HwQueueManager::Get(hwq_h); |
| 78 | if (hwq_shptr == nullptr) return kXSchedErrorNotFound; |
| 79 | *hwq = hwq_h; |
| 80 | return kXSchedSuccess; |
| 81 | } |
| 82 | |
| 83 | EXPORT_C_FUNC XResult CudaQueueCreate(HwQueueHandle *hwq, CUstream stream) |
| 84 | { |
nothing calls this directly
no test coverage detected