Add example initializer for vector __int128 #50

Merged
ThinkOpenly merged 1 commits from int128 into master 4 years ago

@ -122,11 +122,12 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="VIPR.biendian">
vector double g = (vector double) { 3.5, -24.6 };</programlisting> vector double g = (vector double) { 3.5, -24.6 };</programlisting>
<para> <para>
Current C compilers do not support literals for Current C compilers do not support literals for
<code>__int128</code> types. When constructing a <code>vector <code>__int128</code> types. A <code>vector __int128</code>
__int128</code> constant from smaller literals such as constant can be constructed from smaller literals
<code>int</code> or <code>long long</code>, you must test for with appropriate cast-shift-or logic. For example,
endianness and reverse the order of the smaller literals for <programlisting>
little-endian mode. vector unsigned __int128 x = { (((unsigned __int128)0x1020304050607080) &lt;&lt; 64) | 0x90A0B0C0D0E0F000 };
</programlisting>
</para> </para>
</section> </section>



Loading…
Cancel
Save