[Openmp-commits] [openmp] [OpenMP][NFC] Extract OffloadPolicy into a helper class (PR #74029)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 1 10:35:44 PST 2023


================
@@ -0,0 +1,63 @@
+//===-- OffloadPolicy.h - Configuration of offload behavior -----*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// Configuration for offload behavior, e.g., if offload is disabled, can be
+// disabled, is mandatory, etc.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef OMPTARGET_OFFLOAD_POLICY_H
+#define OMPTARGET_OFFLOAD_POLICY_H
+
+#include "PluginManager.h"
+
+enum kmp_target_offload_kind_t {
+  tgt_disabled = 0,
+  tgt_default = 1,
+  tgt_mandatory = 2
+};
+
+extern "C" int __kmpc_get_target_offload(void) __attribute__((weak));
----------------
jdoerfert wrote:

It was weak, so I kept it that way for now. I honestly don't know.

https://github.com/llvm/llvm-project/pull/74029


More information about the Openmp-commits mailing list