[libclc] libclc: clspv: update gen_convert.cl for clspv (PR #66902)
Kévin Petit via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 04:23:52 PDT 2024
================
@@ -26,6 +27,12 @@
#
# convert_<destTypen><_sat><_roundingMode>(<sourceTypen>)
+import sys
+
+clspv = False
+if len(sys.argv) == 2 and sys.argv[1] == "--clspv":
+ clspv = True
+
----------------
kpet wrote:
```suggestion
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--clspv', help="Generate the clspv variant of the code")
args = parser.parse_args()
clspv = args.clspv
```
It's not that much more code and will be easier to maintain, use, and extend.
https://github.com/llvm/llvm-project/pull/66902
More information about the cfe-commits
mailing list