diff options
author | Ghjuvan Lacambre <lacambre@adacore.com> | 2021-06-16 15:17:13 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-09-20 12:31:28 +0000 |
commit | 2c5ed0df53131328cfd4e072b79d5f0d21eeff15 (patch) | |
tree | 9abe71a5655f3af0c2db14aef41006f7aa441009 /gcc/ada/gnat_cuda.ads | |
parent | 5e86334302c9315a56ba419f85ad388ca0c0a940 (diff) | |
download | gcc-2c5ed0df53131328cfd4e072b79d5f0d21eeff15.zip gcc-2c5ed0df53131328cfd4e072b79d5f0d21eeff15.tar.gz gcc-2c5ed0df53131328cfd4e072b79d5f0d21eeff15.tar.bz2 |
[Ada] Move Build_And_Insert_Cuda_Initialization to Expand_CUDA_Package
gcc/ada/
* exp_ch7.adb (Expand_N_Package_Body): Replace
Build_And_Insert_Cuda_Initialization with Expand_CUDA_Package.
* gnat_cuda.adb (Expand_CUDA_Package): New procedure.
(Build_And_Insert_Cuda_Initialization): Make internal.
* gnat_cuda.ads (Expand_CUDA_Package): New procedure.
(Build_And_Insert_Cuda_Initialization): Remove from spec.
Diffstat (limited to 'gcc/ada/gnat_cuda.ads')
-rw-r--r-- | gcc/ada/gnat_cuda.ads | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/gcc/ada/gnat_cuda.ads b/gcc/ada/gnat_cuda.ads index 200aeeb..d35bc8a 100644 --- a/gcc/ada/gnat_cuda.ads +++ b/gcc/ada/gnat_cuda.ads @@ -82,26 +82,8 @@ package GNAT_CUDA is -- Kernel is a procedure entity marked with CUDA_Global, Pack_Id is the -- entity of its parent package body. - procedure Build_And_Insert_CUDA_Initialization (N : Node_Id); - -- Builds declarations necessary for CUDA initialization and inserts them - -- in N, the package body that contains CUDA_Global nodes. These - -- declarations are: - -- - -- * A symbol to hold the pointer to the CUDA fat binary - -- - -- * A type definition for a wrapper that contains the pointer to the - -- CUDA fat binary - -- - -- * An object of the aforementioned type to hold the aforementioned - -- pointer. - -- - -- * For each CUDA_Global procedure in the package, a declaration of a C - -- string containing the function's name. - -- - -- * A function that takes care of calling CUDA functions that register - -- CUDA_Global procedures with the runtime. - -- - -- * A boolean that holds the result of the call to the aforementioned - -- function. + procedure Expand_CUDA_Package (N : Node_Id); + -- When compiling for the host, generate code to register kernels with the + -- CUDA runtime and post-process kernels. end GNAT_CUDA; |