File: isnan.cl

package info (click to toggle)
libclc 0~git20140101-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,040 kB
  • ctags: 532
  • sloc: lisp: 863; ansic: 665; python: 578; cpp: 74; makefile: 22; pascal: 5; sh: 1
file content (17 lines) | stat: -rw-r--r-- 398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <clc/clc.h>

_CLC_DEFINE_UNARY_BUILTIN(int, isnan, __builtin_isnan, float)

#ifdef cl_khr_fp64

#pragma OPENCL EXTENSION cl_khr_fp64 : enable

// The scalar version of isnan(double) returns an int, but the vector versions
// return long.
_CLC_DEF _CLC_OVERLOAD int isnan(double x) {
  return __builtin_isnan(x);
}

_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, long, isnan, double)

#endif