blob: 7b0f264582645becb0de060f72d7b1a2f390625b [file] [log] [blame]
<para>
The vector versions of the math functions operate component-wise.
The description is per-component.
</para>
<para>
The built-in math functions are not affected by the prevailing rounding
mode in the calling environment, and always return the same value as they
would if called with the round to nearest even rounding mode.
</para>
<para>
The built-in math functions take scalar or vector arguments. The generic type
name <type>gentype</type> is used to indicate that the function can take
<type>float</type>, <type>float2</type>, <type>float3</type>, <type>float4</type>,
<type>float8</type>, or <type>float16</type> as the type for the arguments. For
any specific use of these function, the actual type has to be the same for all
arguments and the return type.
</para>
<para>
If extended with <citerefentry><refentrytitle>cl_khr_fp64</refentrytitle></citerefentry>,
generic type name <type>gentype</type> may indicate <type>double</type> and
<type>double{2|3|4|8|16}</type> as arguments and return values. If extended with
<citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry>, generic type
name <type>gentype</type> may indicate <type>half</type> and <type>half{2|3|4|8|16}</type>
as arguments and return values.
</para>