aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2022-10-13 17:07:31 -0700
committerMarc Poulhiès <poulhies@adacore.com>2022-11-07 09:36:34 +0100
commitaa0e7d31a803f948504f8692c4ae48e3ba1b677b (patch)
tree7a82b4350c1fb82382de5fe668bf0fdc38c00476 /gcc/cp
parent7dee088c9db6a420b60379dd576493d12c055ffd (diff)
downloadgcc-aa0e7d31a803f948504f8692c4ae48e3ba1b677b.zip
gcc-aa0e7d31a803f948504f8692c4ae48e3ba1b677b.tar.gz
gcc-aa0e7d31a803f948504f8692c4ae48e3ba1b677b.tar.bz2
ada: Rework CUDA host-side invocation of device-side elaboration code
When the binder is invoked with a "-d_c" switch, add an argument to that switch which is the library name on the device side; so "-d_c" becomes "-d_c=some_library_name". This does not effect the case where "-d_c" is specified as a switch for compilation (as opposed to binding). Use this new piece of information in the code generated by the binder to invoke elaboration code on the device side from the host side. gcc/ada/ * opt.ads: Declare new string pointer variable, CUDA_Device_Library_Name. Modify comments for existing Boolean variable Enable_CUDA_Device_Expansion. * switch-b.adb: When "-d_c" switch is encountered, check that the next character is an "'='; use the remaining characters to initialize Opt.CUDA_Device_Library_Name. * bindgen.adb: Remove (for now) most support for host-side invocation of device-side finalization. Make use of the new CUDA_Device_Library_Name in determining the string used to refer (on the host side) to the device-side initialization procedure. Declare the placeholder routine that is named in the CUDA_Execute pragma (and the CUDA_Register_Function call) as an exported null procedure, rather than as an imported procedure. It is not clear whether it is really necessary to specify the link-name for this should-never-be-called subprogram on the host side, but for now it shouldn't hurt to do so.
Diffstat (limited to 'gcc/cp')
0 files changed, 0 insertions, 0 deletions