[cfe-dev] [OpenCL patch] Half type as native when OpenCL's cl_khr_fp16 extension is enabled
Anton Lokhmotov
Anton.Lokhmotov at arm.com
Thu Jan 17 08:50:45 PST 2013
> We are working on adding cl_khr_fp16 extension support to pocl
> (https://launchpad.net/pocl) based on this patch. FWIW it would be very
> helpful to us to have this patch committed to trunk. It has worked without
> problems so far.
Hi Timo,
Thanks for your interest and encouragement - I'm happy for the patch to go
in.
I'm reattaching it in case anyone has further comments. We haven't found a
solution to the FIXMEs yet, but will continue working on this once the patch
gets committed.
Many thanks,
Anton.
>
>
> Anton Lokhmotov wrote
> > Hi Doug,
> >
> >> > While the conformance tests are not sacred, it can be argued that the
> >> > composition of '&' and '[]' should result in half*, so should not be
> >> > rejected. Unfortunately, we found no obvious way to implement this
> >> > in Clang, so leave this case as TODO.
> >>
> >> One way to handle the "storage-only" version is for buffer[index] to
> >> produce a non-modifiable lvalue (so you can't write it) and to ban the
> >> lvalue-to-rvalue conversion for such a value (for the latter, see
> >> Sema::DefaultLValueConversion).
> >
> > We've tried to implement your proposal, but ended up with putting
> > OpenCLOptions into ASTContext, which is not the cleanest of solutions.
If
> > it's the only problem with this patch, would it be possible to commit it
> > as-is? Meanwhile, we'll try to come up with a better solution (fixing
the
> > FIXMEs).
> >
> > Many thanks,
> > Anton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-half.patch
Type: application/octet-stream
Size: 18502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130117/341d9a2b/attachment.obj>
More information about the cfe-dev
mailing list