[Openmp-commits] [openmp] [OpenMP][NFC] Extract device image handling into a class/header (PR #74129)

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


================
@@ -0,0 +1,39 @@
+//===-- DeviceImage.h - Representation of the device code/image -*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef OMPTARGET_DEVICE_IMAGE_H
+#define OMPTARGET_DEVICE_IMAGE_H
+
+#include "Shared/APITypes.h"
+
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Object/OffloadBinary.h"
+
+class DeviceImageTy {
+
+  std::unique_ptr<llvm::object::OffloadBinary> Binary;
+
+  __tgt_device_image Image;
+  __tgt_image_info ImageInfo;
----------------
jdoerfert wrote:

Agreed.

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


More information about the Openmp-commits mailing list