'\" t .\" Title: FP_CONTRACT, FP_FAST_FMAF, FP_FAST_FMA_HALF .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/03/2019 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "FP_CONTRACT, FP_FAST" "3clc" "02/03/2019" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" FP_CONTRACT,_FP_FAST_FMAF,_FP_FAST_FMA_HALF \- Control expression contraction; fast fma() .SH "FP_CONTRACT" .PP The \fBFP_CONTRACT\fR pragma takes the form: .PP .TS tab(:); l. T{ #pragma OPENCL FP_CONTRACT on\-off\-switch T} .TE .sp 1 .PP \fBFP_CONTRACT\fR can be used to allow (if the state is \fBon\fR) or disallow (if the state is \fBoff\fR) the implementation to contract expressions\&. Each pragma can occur either outside external declarations or preceding all explicit declarations and statements inside a compound statement\&. .PP The parameter \fIon\-off\-switch\fR is one of ON, OFF or DEFAULT\&. The DEFAULT value is ON\&. .PP When outside external declarations, the pragma takes effect from its occurrence until another \fBFP_CONTRACT\fR pragma is encountered, or until the end of the translation unit\&. When inside a compound statement, the pragma takes effect from its occurrence until another \fBFP_CONTRACT\fR pragma is encountered (including within a nested compound statement), or until the end of the compound statement; at the end of a compound statement the state for the pragma is restored to its condition just before the compound statement\&. If this pragma is used in any other context, the behavior is undefined\&. .SH "FP_FAST_FMAF AND FP_FAST_FMA" .PP The \fBFP_FAST_FMAF\fR macro indicates whether the \fBfma\fR(3clc) function is fast compared with direct code for single precision floating\-point\&. If defined, the \fBFP_FAST_FMAF\fR macro shall indicate that the \fBfma\fR(3clc)() function generally executes about as fast as, or faster than, a multiply and an add of float operands\&. .PP The \fBFP_FAST_FMA\fR macro indicates whether the \fBfma\fR(3clc) family of functions are fast compared with direct code for double precision floating\-point\&. If defined, the \fBFP_FAST_FMA\fR macro shall indicate that the \fBfma\fR(3clc)() function generally executes about as fast as, or faster than, a multiply and an add of double operands\&. .PP The \fBFP_FAST_FMA_HALF\fR macro indicates whether the \fBfma\fR(3clc)() family of functions are fast compared with direct code for half precision floating\-point\&. If defined, the \fBFP_FAST_FMA_HALF\fR macro shall indicate that the \fBfma\fR(3clc)() function generally executes about as fast as, or faster than, a multiply and an add of half operands .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBmathFunctions\fR(3clc), \fBmathConstants\fR(3clc), \fBmacroLimits\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 252, section 6.12.2.1 - Floating-point macros and pragmas .RE