[PATCH] CUDA: Add option to allow host device functions to call host functions
Eli Bendersky
eliben at google.com
Tue Feb 24 08:45:41 PST 2015
================
Comment at: include/clang/Driver/CC1Options.td:612
@@ +611,3 @@
+def fcuda_host_device_functions_calling_host_functions : Flag<["-"],
+ "fcuda-host-device-functions-calling-host-functions">,
+ HelpText<"Allow host device functions to call host functions">;
----------------
I think the word "allow" should be in the flag somewhere.
How about: "fcuda-allow-host-calls-from-host-device" ?
Has the word "allow" AND is shorter ;-)
================
Comment at: test/SemaCUDA/function-target.cu:1
@@ -1,2 +1,2 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -fsyntax-only -fcuda-is-device -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST_HOST
+// RUN: %clang_cc1 -fsyntax-only -fcuda-is-device -verify %s -DTEST_DEVICE
----------------
Is DTEST_HOST and DTEST_DEVICE really different from the reliance on __CUDA_ARCH__ that was there before?
I think this test is getting too complex - maybe it's worthwhile splitting the HD parts to a separate test file
http://reviews.llvm.org/D7841
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list