Move 'libgomp/plugin/cuda/cuda.h' to 'include/cuda/cuda.h'
... so that it may be used by other projects that inherit GCC's 'include' directory. include/ * cuda/cuda.h: New file. libgomp/ * plugin/cuda/cuda.h: Remove file. * plugin/plugin-nvptx.c [PLUGIN_NVPTX_DYNAMIC]: Include "cuda/cuda.h" instead of <cuda.h>. * plugin/configfrag.ac <PLUGIN_NVPTX_DYNAMIC>: Don't set 'PLUGIN_NVPTX_CPPFLAGS'. * configure: Regenerate.
This commit is contained in:
parent
790e981445
commit
5e431ae4cc
4 changed files with 8 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
/* CUDA API description.
|
||||
/* CUDA Driver API description.
|
||||
Copyright (C) 2017-2022 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -22,9 +22,8 @@ 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/>.
|
||||
|
||||
This header provides the minimum amount of typedefs, enums and function
|
||||
declarations to be able to compile plugin-nvptx.c if cuda.h and
|
||||
libcuda.so.1 are not available. */
|
||||
This header provides parts of the CUDA Driver API, without having to rely on
|
||||
the proprietary CUDA toolkit. */
|
||||
|
||||
#ifndef GCC_CUDA_H
|
||||
#define GCC_CUDA_H
|
1
libgomp/configure
vendored
1
libgomp/configure
vendored
|
@ -15362,7 +15362,6 @@ rm -f core conftest.err conftest.$ac_objext \
|
|||
&& (test "x$CUDA_DRIVER_LIB" = x \
|
||||
|| test "x$CUDA_DRIVER_LIB" = xno); then
|
||||
PLUGIN_NVPTX=1
|
||||
PLUGIN_NVPTX_CPPFLAGS='-I$(srcdir)/plugin/cuda'
|
||||
PLUGIN_NVPTX_LIBS='-ldl'
|
||||
PLUGIN_NVPTX_DYNAMIC=1
|
||||
else
|
||||
|
|
|
@ -197,7 +197,6 @@ if test x"$enable_offload_targets" != x; then
|
|||
&& (test "x$CUDA_DRIVER_LIB" = x \
|
||||
|| test "x$CUDA_DRIVER_LIB" = xno); then
|
||||
PLUGIN_NVPTX=1
|
||||
PLUGIN_NVPTX_CPPFLAGS='-I$(srcdir)/plugin/cuda'
|
||||
PLUGIN_NVPTX_LIBS='-ldl'
|
||||
PLUGIN_NVPTX_DYNAMIC=1
|
||||
else
|
||||
|
|
|
@ -41,7 +41,11 @@
|
|||
#include "oacc-int.h"
|
||||
|
||||
#include <pthread.h>
|
||||
#include <cuda.h>
|
||||
#if PLUGIN_NVPTX_DYNAMIC
|
||||
# include "cuda/cuda.h"
|
||||
#else
|
||||
# include <cuda.h>
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue