Add missing as_{float,double} functions

git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@192381 91177308-0d34-0410-b5e6-96231b3b80d8
Implement isnan() builtin

git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@192382 91177308-0d34-0410-b5e6-96231b3b80d8
Implement nextafter() builtin

There are two implementations of nextafter():
1. Using clang's __builtin_nextafter.  Clang replaces this builtin with
a call to nextafter which is part of libm.  Therefore, this
implementation will only work for targets with an implementation of
libm (e.g. most CPU targets).

2. The other implementation is written in OpenCL C.  This function is
known internally as __clc_nextafter and can be used by targets that
don't have access to libm.

git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@192383 91177308-0d34-0410-b5e6-96231b3b80d8
Implement sign() builtin

git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@192384 91177308-0d34-0410-b5e6-96231b3b80d8
Port pocl's gen_convert.py script to libclc

This script generates implementations for the entire set of convert_*
functions,

git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@192385 91177308-0d34-0410-b5e6-96231b3b80d8