<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 1/21/2015 11:35 PM, Christoph Viebig (lists) wrote:<br>
<blockquote class=" cite"
id="mid_311001457_7840_1421863520614_JavaMail_open_xchange_oxbaltgw41_schlund_de"
cite="mid:311001457.7840.1421863520614.JavaMail.open-xchange@oxbaltgw41.schlund.de"
type="cite">
<pre wrap="">My question is now: How can I construct or retrieve an instance of
Type that represents OpenCL float4 (e.g. from Sema or Context)?</pre>
</blockquote>
<br>
OpenCL vector types are represented as "extended vectors" in Clang<br>
<a class="moz-txt-link-freetext" href="http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors">http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors</a><br>
<br>
AstContext provides a method to construct these as a QualType:<br>
<a class="moz-txt-link-freetext" href="http://clang.llvm.org/doxygen/classclang_1_1ASTContext.html">http://clang.llvm.org/doxygen/classclang_1_1ASTContext.html</a><br>
<br>
QualType getExtVectorType (QualType VectorType, unsigned
NumElts) const<br>
Return the unique reference to an extended vector type of the
specified element type and size. <br>
<br>
Is this what you need?<br>
<br>
Sameer.<br>
<br>
</body>
</html>