#include <clc/math/maxmag.h>
#include <clc/math/minmag.h>
#include <clc/math/modf.h>
+#include <clc/math/nan.h>
#include <clc/math/nextafter.h>
#include <clc/math/pow.h>
#include <clc/math/pown.h>
--- /dev/null
+#define __CLC_CONCAT(x, y) x ## y
+#define __CLC_XCONCAT(x, y) __CLC_CONCAT(x, y)
+
+#define __CLC_BODY <clc/math/nan.inc>
+#include <clc/math/gentype.inc>
+
+#undef __CLC_XCONCAT
+#undef __CLC_CONCAT
--- /dev/null
+#ifdef __CLC_SCALAR
+#define __CLC_VECSIZE
+#endif
+
+#if __CLC_FPSIZE == 64
+#define __CLC_NATN __CLC_XCONCAT(ulong, __CLC_VECSIZE)
+#else
+#define __CLC_NATN __CLC_XCONCAT(uint, __CLC_VECSIZE)
+#endif
+
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE nan(__CLC_NATN code);
+
+#undef __CLC_NATN
+#ifdef __CLC_SCALAR
+#undef __CLC_VECSIZE
+#endif
math/maxmag.cl
math/minmag.cl
math/modf.cl
+math/nan.cl
math/native_cos.cl
math/native_divide.cl
math/native_exp.cl
--- /dev/null
+#include <clc/clc.h>
+#include "utils.h"
+
+#define __CLC_AS_GENTYPE __CLC_XCONCAT(as_, __CLC_GENTYPE)
+#define __CLC_BODY <nan.inc>
+#include <clc/math/gentype.inc>
--- /dev/null
+#ifdef __CLC_SCALAR
+#define __CLC_VECSIZE
+#endif
+
+#if __CLC_FPSIZE == 64
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE nan(__CLC_XCONCAT(ulong, __CLC_VECSIZE) code)
+{
+ return __CLC_AS_GENTYPE(code | 0x7ff0000000000000ul);
+}
+#else
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE nan(__CLC_XCONCAT(uint, __CLC_VECSIZE) code)
+{
+ return __CLC_AS_GENTYPE(code | 0x7fc00000);
+}
+#endif
+
+
+#ifdef __CLC_SCALAR
+#undef __CLC_VECSIZE
+#endif