]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] NVPTX GOMP_OFFLOAD_openacc_async_construct arg fix and gomp_print_* support
authorJulian Brown <julian@codesourcery.com>
Mon, 29 Jul 2019 22:05:35 +0000 (15:05 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:50:41 +0000 (12:50 +0100)
libgomp/
* config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer,
gomp_print_double): New.
* plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add
dummy device parameter.

(cherry picked from openacc-gcc-9-branch commit
3df3ea7e8163b9ec0c7227c70c6e1154bf95c24a)

libgomp/ChangeLog.omp
libgomp/config/nvptx/gomp_print.c [new file with mode: 0644]
libgomp/plugin/plugin-nvptx.c

index c03f87144089e680d3ccfab7c551a9153ac3e8d1..c850203e1455d07881cc02d49c8a6af0ac80b01f 100644 (file)
@@ -1,3 +1,10 @@
+2019-07-31  Julian Brown  <julian@codesourcery.com>
+
+       * config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer,
+       gomp_print_double): New.
+       * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_construct): Add
+       dummy device parameter.
+
 2019-07-31  Julian Brown  <julian@codesourcery.com>
 
        * libgomp.map (GOMP_2.0.GOMP_4_BRANCH): Remove GOACC_parallel_keyed_v2.
diff --git a/libgomp/config/nvptx/gomp_print.c b/libgomp/config/nvptx/gomp_print.c
new file mode 100644 (file)
index 0000000..811bdd6
--- /dev/null
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <stdint.h>
+
+void
+gomp_print_string (const char *msg, const char *value)
+{
+  printf ("%s%s\n", msg, value);
+}
+
+void
+gomp_print_integer (const char *msg, int64_t value)
+{
+  printf ("%s%ld\n", msg, value);
+}
+
+void
+gomp_print_double (const char *msg, double value)
+{
+  printf ("%s%f\n", msg, value);
+}
index 09567ce852c235e3a528182210778d46d6ec2834..4beb3222e8f887992bbdb9493ec1a093f7b34365 100644 (file)
@@ -1732,7 +1732,7 @@ GOMP_OFFLOAD_openacc_cuda_set_stream (struct goacc_asyncqueue *aq, void *stream)
 }
 
 struct goacc_asyncqueue *
-GOMP_OFFLOAD_openacc_async_construct (void)
+GOMP_OFFLOAD_openacc_async_construct (int device __attribute__((unused)))
 {
   CUstream stream = NULL;
   CUDA_CALL_ERET (NULL, cuStreamCreate, &stream, CU_STREAM_DEFAULT);