[llvm] [LLVMOffload] Add internal StreamTy (PR #216374)
Sophia Herrmann via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 09:37:38 PDT 2026
================
@@ -0,0 +1,33 @@
+//===-- Stream.h - Kernel language stream state ---------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_OFFLOAD_LANGUAGES_KERNEL_INCLUDE_STREAM_H
+#define LLVM_OFFLOAD_LANGUAGES_KERNEL_INCLUDE_STREAM_H
+
+#include "OffloadAPI.h"
+
+namespace llvm {
+namespace offload {
+
+enum class QueueKind {
+ LegacyDefault,
+ PerThreadDefault,
+ ExplicitBlocking,
+ ExplicitNonBlocking,
+};
+
+struct StreamTy {
+ ol_queue_handle_t Queue = nullptr;
+ ol_device_handle_t Device = nullptr;
----------------
jellytabby wrote:
Its used as a convenience to avoid having to call `olGetQueueInfo(..., OL_QUEUE_INFO_DEVICE, ...)` everytime we want to access it. `ol_queue_handle_t` doesnt directly expose the fields of the underlying struct
https://github.com/llvm/llvm-project/pull/216374
More information about the llvm-commits
mailing list