[cfe-dev] [OpenCL patch] sampler_t as a builtin type

Tanya Lattner lattner at apple.com
Wed Mar 16 17:04:07 PDT 2011


ping.. any comments?

On Mar 9, 2011, at 4:54 PM, Tanya Lattner wrote:

> This patch adds the OpenCL sampler type as a built in type. The sampler type is defined as follows:
> 
> The sampler_t type is a 32-bit unsigned int constant and is interpreted as a bit-field that specifies the following properties:
> Addressing Mode, Filter Mode, Normalized Coordinates. These properties control how elements of an image object are read by read_image{f|i|ui}.
> 
> We made this a built in type because we needed a way to distinguish it from normal integers when checking for special properties of the sampler type (ie. global samplers are not required to be in the constant address space while global integers are).
> 
> A simple test case is included.
> 
> I was not sure what to do about these warnings since I'm not familiar with this code. If you have some suggestions, please let me know:
> 
> CIndexUSRs.cpp: In member function ‘void<unnamed>::USRGenerator::VisitType(clang::QualType)’:
> CIndexUSRs.cpp:526: warning: enumeration value ‘Sampler’ not handled in switch
> 
> CIndex.cpp: In member function ‘bool<unnamed>::CursorVisitor::VisitBuiltinTypeLoc(clang::BuiltinTypeLoc)’:
> CIndex.cpp:1356: warning: enumeration value ‘Sampler’ not handled in switch
> 
> For your review:
> 
> <samplerTy.patch>
> 
> 
> Thanks,
> Tanya
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110316/4cce66ee/attachment.html>


More information about the cfe-dev mailing list