[cfe-commits] r120545 - in /cfe/trunk: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/AttributeList.h lib/Sema/AttributeList.cpp lib/Sema/SemaDeclAttr.cpp test/CMakeLists.txt test/SemaCUDA/ test/SemaCUDA/cuda.h test/SemaCUDA/qualifiers.cu
Peter Collingbourne
peter at pcc.me.uk
Mon Dec 6 12:36:51 PST 2010
On Sun, Dec 05, 2010 at 10:04:06AM -0800, Chris Lattner wrote:
> > +++ cfe/trunk/test/SemaCUDA/cuda.h Tue Nov 30 21:15:31 2010
> > @@ -0,0 +1,7 @@
> > +/* Minimal declarations for CUDA support. Testing purposes only. */
> > +
> > +#define __constant__ __attribute__((constant))
> > +#define __device__ __attribute__((device))
> > +#define __global__ __attribute__((global))
> > +#define __host__ __attribute__((host))
> > +#define __shared__ __attribute__((shared))
>
> Should this go in clang/lib/Headers? When you do a make install, you'd want to install what-this-grows-into, right?
Hi Chris,
This header is for testing purposes only. It is a partial replacement
for the set of declarations and macro definitions that you would find
in a full CUDA implementation, and is only meant to help the semantic
analyser understand our test CUDA code. In a non-test scenario the
CUDA implementation would provide these declarations and there would
be no need for our test header file.
For example, to semantically analyse a kernel call expression we
require that there be an earlier declaration of a function with a
specific name which we use to analyse the execution configuration (the
stuff between the <<<...>>>). When the support for semantic analysis
of kernel calls is added this header will contain a declaration for
this function to support testing of semantic analysis of kernel calls.
Thanks,
--
Peter
More information about the cfe-commits
mailing list