[clinfo] 41/55: Correctly-rounded div and sqrt is only a flag for fp32
Andreas Beckmann
anbe at moszumanska.debian.org
Sat Jan 13 14:40:02 UTC 2018
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch master
in repository clinfo.
commit 2749190444945fadc6c86fe0e93108beff5748d6
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date: Wed Oct 25 15:20:45 2017 +0200
Correctly-rounded div and sqrt is only a flag for fp32
---
src/clinfo.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/clinfo.c b/src/clinfo.c
index bbc697c..b65828e 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -1532,7 +1532,14 @@ int device_info_fpconf(cl_device_id dev, cl_device_info param, const char *pname
szval += sprintf(strbuf, "(%s)", why);
}
if (get_it) {
- for (i = 0; i < fp_conf_count; ++i) {
+ /* The last flag, CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT is only considered
+ * in the single-precision case. half and double don't consider it,
+ * so we skip it altogether */
+ size_t num_flags = fp_conf_count;
+ if (param != CL_DEVICE_SINGLE_FP_CONFIG)
+ num_flags -= 1;
+
+ for (i = 0; i < num_flags; ++i) {
cl_device_fp_config cur = (cl_device_fp_config)(1) << i;
if (output_mode == CLINFO_HUMAN) {
szval += sprintf(strbuf + szval, "\n%s" I2_STR "%s",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git
More information about the Pkg-opencl-commits
mailing list