<div dir="ltr"><div>Ping. I just realized that I had this sitting around in my local repository and never got any review (yay for the holidays causing things to get lost).<br><br></div>--Aaron<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 17, 2014 at 10:52 PM, Aaron Watry <span dir="ltr"><<a href="mailto:awatry@gmail.com" target="_blank">awatry@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The tests are skipped for devices that don't support doubles, and<br>
when the primary data type for a file is double, we enable the cl_khr_fp64 pragma<br>
before writing any kernels.<br>
<br>
Signed-off-by: Aaron Watry <<a href="mailto:awatry@gmail.com">awatry@gmail.com</a>><br>
---<br>
generated_tests/genclbuiltins.py | 10 +++++++++-<br>
1 file changed, 9 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/generated_tests/genclbuiltins.py b/generated_tests/genclbuiltins.py<br>
index 7e85a51..9a8e85e 100644<br>
--- a/generated_tests/genclbuiltins.py<br>
+++ b/generated_tests/genclbuiltins.py<br>
@@ -395,8 +395,13 @@ def gen(types, minVersions, functions, testDefs, dirName):<br>
'[config]\n' +<br>
'name: Test '+dataType+' '+fnName+' built-in on CL 1.1\n' +<br>
'clc_version_min: '+str(clcVersionMin)+'\n' +<br>
- 'dimensions: 1\n\n'<br>
+ 'dimensions: 1\n'<br>
)<br>
+ if (dataType == 'double'):<br>
+ f.write('require_device_extensions: cl_khr_fp64\n')<br>
+<br>
+ # Blank line to provide separation between config header and tests<br>
+ f.write('\n')<br>
<br>
# Write all tests for the built-in function<br>
tests = functionDef['values']<br>
@@ -416,6 +421,9 @@ def gen(types, minVersions, functions, testDefs, dirName):<br>
# Terminate the header section<br>
f.write('!*/\n\n')<br>
<br>
+ if (dataType == 'double'):<br>
+ f.write('#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n\n')<br>
+<br>
# Generate the actual kernels<br>
generate_kernels(f, dataType, fnName, functionDef)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.2.0<br>
<br>
</font></span></blockquote></div><br></div>