aboutsummaryrefslogtreecommitdiff
path: root/libgomp/plugin/plugin-nvptx.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-04-07 23:10:16 +0200
committerThomas Schwinge <thomas@codesourcery.com>2022-05-12 14:14:13 +0200
commitcd644ce8be2d1ba8d759ce4c00a2ded5a040b70d (patch)
treeadf56f4be183630db7aa855ab51ee71c7feacc12 /libgomp/plugin/plugin-nvptx.c
parentedbd2b1caaa79d68467418a4571c3b09f9602805 (diff)
downloadgcc-cd644ce8be2d1ba8d759ce4c00a2ded5a040b70d.zip
gcc-cd644ce8be2d1ba8d759ce4c00a2ded5a040b70d.tar.gz
gcc-cd644ce8be2d1ba8d759ce4c00a2ded5a040b70d.tar.bz2
libgomp nvptx plugin: Split 'PLUGIN_NVPTX_DYNAMIC' into 'PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H' and 'PLUGIN_NVPTX_LINK_LIBCUDA'
Including the GCC-shipped 'include/cuda/cuda.h' vs. system <cuda.h> and 'dlopen'ing the CUDA Driver library vs. linking it are separate concerns. libgomp/ * plugin/Makefrag.am: Handle 'PLUGIN_NVPTX_DYNAMIC'. * plugin/configfrag.ac (PLUGIN_NVPTX_DYNAMIC): Change 'AC_DEFINE_UNQUOTED' into 'AM_CONDITIONAL'. * plugin/plugin-nvptx.c: Split 'PLUGIN_NVPTX_DYNAMIC' into 'PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H' and 'PLUGIN_NVPTX_LINK_LIBCUDA'. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise.
Diffstat (limited to 'libgomp/plugin/plugin-nvptx.c')
-rw-r--r--libgomp/plugin/plugin-nvptx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index b28dfca..387bcbb 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -41,7 +41,7 @@
#include "oacc-int.h"
#include <pthread.h>
-#if PLUGIN_NVPTX_DYNAMIC
+#ifndef PLUGIN_NVPTX_INCLUDE_SYSTEM_CUDA_H
# include "cuda/cuda.h"
#else
# include <cuda.h>
@@ -85,7 +85,7 @@ CUresult cuOccupancyMaxPotentialBlockSize(int *, int *, CUfunction,
#define DO_PRAGMA(x) _Pragma (#x)
-#if PLUGIN_NVPTX_DYNAMIC
+#ifndef PLUGIN_NVPTX_LINK_LIBCUDA
# include <dlfcn.h>
struct cuda_lib_s {