[PATCH] Add support for CUDA unroll pragma
Mark Heffernan
meheff at google.com
Mon Jul 7 16:12:00 PDT 2014
On Tue, Jul 1, 2014 at 5:36 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> One question: you list the unroll count as 'n'. Must that be a constant
> integer? The clang pragma intends to allow an arbitrary integer constant
> expression there. That might be a good reason for us to introduce our own
> syntax for it, if we're providing a slightly more general form.
>
nvcc (CUDA) only supports a literal integer constant. icc seems to support
only literal constants as well. xlc supports integer constant expressions.
Given xlc and icc share the same syntax ("#pragma unroll (_value_)") there
is no way to be perfectly compatible with both icc and xlc so I'm inclined
to support expressions in "#pragma unroll" as planned with the other loop
pragmas and just be more permissive than nvcc and icc.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140707/fd8171de/attachment.html>
More information about the cfe-commits
mailing list