This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: nvptx offloading patches [4/n]
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bernds at codesourcery dot com>
- Date: Wed, 28 Jan 2015 20:59:45 +0300
- Subject: Re: nvptx offloading patches [4/n]
- Authentication-results: sourceware.org; auth=none
- References: <5454CDF1 dot 3070307 at codesourcery dot com> <87zj92vnsa dot fsf at kepler dot schwinge dot homeip dot net>
On 28 Jan 18:05, Thomas Schwinge wrote:
> + fprintf (out, "#define PTX_ID 1\n");
> + fprintf (out, "static __attribute__((constructor)) void init (void)\n{\n");
> + fprintf (out, " GOMP_offload_register (__OPENMP_TARGET__, PTX_ID,\n");
The file include/gomp-constants.h already contains:
#define GOMP_DEVICE_NVIDIA_PTX 5
I guess it would be better to include gomp-constants.h into mkoffload and to use
this define.
-- Ilya