@@ -22,13 +22,13 @@
#include "config.h"
#include <libgen.h>
+#include "libgomp-plugin.h"
#include "system.h"
#include "coretypes.h"
#include "obstack.h"
#include "intl.h"
#include "diagnostic.h"
#include "collect-utils.h"
-#include <libgomp_target.h>
const char tool_name[] = "intelmic mkoffload";
@@ -1,5 +1,19 @@
2015-01-12 Thomas Schwinge <thomas@codesourcery.com>
+ * env.c: Don't include "libgomp_target.h".
+ * libgomp-plugin.c: Likewise.
+ * oacc-async.c: Likewise.
+ * oacc-cuda.c: Likewise.
+ * oacc-init.c: Likewise.
+ * oacc-mem.c: Likewise.
+ * oacc-parallel.c: Likewise.
+ * oacc-plugin.c: Likewise.
+ * plugin/plugin-host.c: Likewise.
+ * plugin/plugin-nvptx.c: Likewise.
+ * target.c: Likewise.
+ * libgomp_target.h: Remove file after merging its content into...
+ * libgomp-plugin.h: ... this file. Adjust all users.
+
* plugin/plugin-nvptx.c (struct ptx_device): Turn stream_lock
member into a pthread_mutex_t. Adjust all users.
(ptx_event_lock): Likewise.
@@ -28,7 +28,6 @@
#include "libgomp.h"
#include "libgomp_f.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
#include <ctype.h>
#include <stdlib.h>
@@ -30,7 +30,6 @@
#include "libgomp.h"
#include "libgomp-plugin.h"
-#include "libgomp_target.h"
void *
GOMP_PLUGIN_malloc (size_t size)
@@ -29,6 +29,39 @@
#ifndef LIBGOMP_PLUGIN_H
#define LIBGOMP_PLUGIN_H 1
+#include <stddef.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Capabilities of offloading devices. */
+#define GOMP_OFFLOAD_CAP_SHARED_MEM (1 << 0)
+#define GOMP_OFFLOAD_CAP_NATIVE_EXEC (1 << 1)
+#define GOMP_OFFLOAD_CAP_OPENMP_400 (1 << 2)
+#define GOMP_OFFLOAD_CAP_OPENACC_200 (1 << 3)
+
+/* Type of offload target device. Keep in sync with include/gomp-constants.h. */
+enum offload_target_type
+{
+ OFFLOAD_TARGET_TYPE_HOST = 2,
+ OFFLOAD_TARGET_TYPE_HOST_NONSHM = 3,
+ OFFLOAD_TARGET_TYPE_NVIDIA_PTX = 5,
+ OFFLOAD_TARGET_TYPE_INTEL_MIC = 6
+};
+
+/* Auxiliary struct, used for transferring a host-target address range mapping
+ from plugin to libgomp. */
+struct mapping_table
+{
+ uintptr_t host_start;
+ uintptr_t host_end;
+ uintptr_t tgt_start;
+ uintptr_t tgt_end;
+};
+
+/* Miscellaneous functions. */
extern void *GOMP_PLUGIN_malloc (size_t) __attribute__((malloc));
extern void *GOMP_PLUGIN_malloc_cleared (size_t) __attribute__((malloc));
extern void *GOMP_PLUGIN_realloc (void *, size_t);
@@ -40,4 +73,8 @@ extern void GOMP_PLUGIN_error (const char *, ...)
extern void GOMP_PLUGIN_fatal (const char *, ...)
__attribute__((noreturn, format (printf, 1, 2)));
+#ifdef __cplusplus
+}
+#endif
+
#endif
@@ -38,6 +38,7 @@
#include "config.h"
#include "gstdint.h"
+#include "libgomp-plugin.h"
#include <pthread.h>
#include <stdbool.h>
@@ -632,7 +633,6 @@ extern void gomp_free_thread (void *);
extern void gomp_init_targets_once (void);
extern int gomp_get_num_devices (void);
-#include "libgomp_target.h"
#include "splay-tree.h"
struct target_mem_desc {
deleted file mode 100644
@@ -1,53 +0,0 @@
-/* Copyright (C) 2014-2015 Free Software Foundation, Inc.
-
- This file is part of the GNU Offloading and Multi Processing Library
- (libgomp).
-
- Libgomp is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- Under Section 7 of GPL version 3, you are granted additional
- permissions described in the GCC Runtime Library Exception, version
- 3.1, as published by the Free Software Foundation.
-
- You should have received a copy of the GNU General Public License and
- a copy of the GCC Runtime Library Exception along with this program;
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef LIBGOMP_TARGET_H
-#define LIBGOMP_TARGET_H 1
-
-/* Capabilities of offloading devices. */
-#define GOMP_OFFLOAD_CAP_SHARED_MEM (1 << 0)
-#define GOMP_OFFLOAD_CAP_NATIVE_EXEC (1 << 1)
-#define GOMP_OFFLOAD_CAP_OPENMP_400 (1 << 2)
-#define GOMP_OFFLOAD_CAP_OPENACC_200 (1 << 3)
-
-/* Type of offload target device. Keep in sync with include/gomp-constants.h. */
-enum offload_target_type
-{
- OFFLOAD_TARGET_TYPE_HOST = 2,
- OFFLOAD_TARGET_TYPE_HOST_NONSHM = 3,
- OFFLOAD_TARGET_TYPE_NVIDIA_PTX = 5,
- OFFLOAD_TARGET_TYPE_INTEL_MIC = 6
-};
-
-/* Auxiliary struct, used for transferring a host-target address range mapping
- from plugin to libgomp. */
-struct mapping_table
-{
- uintptr_t host_start;
- uintptr_t host_end;
- uintptr_t tgt_start;
- uintptr_t tgt_end;
-};
-
-#endif /* LIBGOMP_TARGET_H */
@@ -29,7 +29,6 @@
#include "openacc.h"
#include "libgomp.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
int
@@ -29,7 +29,6 @@
#include "openacc.h"
#include "config.h"
#include "libgomp.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
void *
@@ -27,7 +27,6 @@
<http://www.gnu.org/licenses/>. */
#include "libgomp.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
#include "openacc.h"
#include <assert.h>
@@ -30,7 +30,6 @@
#include "config.h"
#include "libgomp.h"
#include "gomp-constants.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
#include <stdio.h>
#include <stdint.h>
@@ -30,7 +30,6 @@
#include "libgomp.h"
#include "libgomp_g.h"
#include "gomp-constants.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
#include <stdio.h>
#include <string.h>
@@ -28,7 +28,6 @@
#include "libgomp.h"
#include "oacc-plugin.h"
-#include "libgomp_target.h"
#include "oacc-int.h"
void
@@ -33,7 +33,6 @@
#include "openacc.h"
#include "config.h"
#include "libgomp.h"
-#include "libgomp_target.h"
#ifdef HOST_NONSHM_PLUGIN
#include "libgomp-plugin.h"
#include "oacc-plugin.h"
@@ -34,7 +34,6 @@
#include "openacc.h"
#include "config.h"
#include "libgomp.h"
-#include "libgomp_target.h"
#include "libgomp-plugin.h"
#include "oacc-ptx.h"
#include "oacc-plugin.h"
@@ -27,7 +27,6 @@
#include "config.h"
#include "libgomp.h"
-#include "libgomp_target.h"
#include "oacc-plugin.h"
#include "oacc-int.h"
#include "gomp-constants.h"
@@ -34,7 +34,7 @@
#include <string.h>
#include <utility>
#include <vector>
-#include <libgomp_target.h>
+#include "libgomp-plugin.h"
#include "compiler_if_host.h"
#include "main_target_image.h"