From: Erik S. <esc...@pe...> - 2011-12-15 19:05:02
|
Since LLVM supports the half datatype (I believe it was added about nine months ago, especially for OpenCL), it generates these conversions itself. I just updated (read: corrected) the autoconf rules to determine whether half is supported. It seems that it is currently only supported on ARM. Other platforms will have this code disabled. I will push this to my branch soon. To my knowledge, the "traditional" implementation of half would be to perform all arithmetic operations in float precision, except possibly expensive iterative operations (divide, sqrt), where fewer iterations may be used that for float. -erik 2011/12/15 Pekka Jääskeläinen <pek...@tu...> > On 12/15/2011 06:24 PM, Erik Schnetter wrote: > > OpenCL supports only two operations for halfs: vload_half, converting it > > to a float, and vstore_half, converting from a float. Nothing else > > exists explicitly, not even vectors of halfs. Essentially the only thing > > one can do with the half type is to pass a half* to these load/store > > routines. > > OK, interesting. Who then generates the float <-> half conversion code > for the LLVM intrinsics? Does LLVM generate it automatically or > do we need to provide conversion routines in pocl? > > > -- > Pekka > -- Erik Schnetter <esc...@pe...> http://www.cct.lsu.edu/~eschnett/ AIM: eschnett247, Skype: eschnett, Google Talk: sch...@gm... |