projects
/
contrib
/
beignet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e2f925
)
Refine isnan builtin.
author
Yang Rong
<rong.r.yang@intel.com>
Mon, 25 Nov 2013 07:08:09 +0000
(15:08 +0800)
committer
Zhigang Gong
<zhigang.gong@intel.com>
Mon, 2 Dec 2013 04:24:10 +0000
(12:24 +0800)
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@intel.com>
backend/src/ocl_stdlib.tmpl.h
patch
|
blob
|
history
diff --git
a/backend/src/ocl_stdlib.tmpl.h
b/backend/src/ocl_stdlib.tmpl.h
index
555c63c
..
851a9aa
100644
(file)
--- a/
backend/src/ocl_stdlib.tmpl.h
+++ b/
backend/src/ocl_stdlib.tmpl.h
@@
-248,9
+248,7
@@
INLINE_OVERLOADABLE int isinf(float x) {
return (u.u & 0x7FFFFFFF) == 0x7F800000;
}
INLINE_OVERLOADABLE int isnan(float x) {
- union { uint u; float f; } u;
- u.f = x;
- return (u.u & 0x7FFFFFFF) > 0x7F800000;
+ return x != x;
}
INLINE_OVERLOADABLE int isnormal(float x) {
union { uint u; float f; } u;