Verify reused dominators info in calculate_dominance_info
[official-gcc.git] / libgomp / libgomp-plugin.h
blob1072ae467be9819404d1046b509fba65e2895a2c
1 /* Copyright (C) 2014-2015 Free Software Foundation, Inc.
3 Contributed by Mentor Embedded.
5 This file is part of the GNU Offloading and Multi Processing Library
6 (libgomp).
8 Libgomp is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 more details.
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. */
27 /* An interface to various libgomp-internal functions for use by plugins. */
29 #ifndef LIBGOMP_PLUGIN_H
30 #define LIBGOMP_PLUGIN_H 1
32 #include <stddef.h>
33 #include <stdint.h>
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
39 /* Capabilities of offloading devices. */
40 #define GOMP_OFFLOAD_CAP_SHARED_MEM (1 << 0)
41 #define GOMP_OFFLOAD_CAP_NATIVE_EXEC (1 << 1)
42 #define GOMP_OFFLOAD_CAP_OPENMP_400 (1 << 2)
43 #define GOMP_OFFLOAD_CAP_OPENACC_200 (1 << 3)
45 /* Type of offload target device. Keep in sync with include/gomp-constants.h. */
46 enum offload_target_type
48 OFFLOAD_TARGET_TYPE_HOST = 2,
49 OFFLOAD_TARGET_TYPE_HOST_NONSHM = 3,
50 OFFLOAD_TARGET_TYPE_NVIDIA_PTX = 5,
51 OFFLOAD_TARGET_TYPE_INTEL_MIC = 6
54 /* Auxiliary struct, used for transferring pairs of addresses from plugin
55 to libgomp. */
56 struct addr_pair
58 uintptr_t start;
59 uintptr_t end;
62 /* Miscellaneous functions. */
63 extern void *GOMP_PLUGIN_malloc (size_t) __attribute__ ((malloc));
64 extern void *GOMP_PLUGIN_malloc_cleared (size_t) __attribute__ ((malloc));
65 extern void *GOMP_PLUGIN_realloc (void *, size_t);
67 extern void GOMP_PLUGIN_debug (int, const char *, ...)
68 __attribute__ ((format (printf, 2, 3)));
69 extern void GOMP_PLUGIN_error (const char *, ...)
70 __attribute__ ((format (printf, 1, 2)));
71 extern void GOMP_PLUGIN_fatal (const char *, ...)
72 __attribute__ ((noreturn, format (printf, 1, 2)));
74 #ifdef __cplusplus
76 #endif
78 #endif