Package com.jogamp.opencl
Interface CLProgram.CompilerOptions

 Enclosing class:
 CLProgram
public static interface CLProgram.CompilerOptions
Common compiler options for the OpenCL compiler.


Field Summary
Fields Modifier and Type Field Description static String
DENORMS_ARE_ZERO
This option controls how single precision and double precision denormalized numbers are handled.static String
DISABLE_OPT
This option disables all optimizations.static String
DISABLE_WARNINGS
Inhibit all warning messages.static String
ENABLE_MAD
Allow a * b + c to be replaced by a mad.static String
FAST_RELAXED_MATH
Sets the optimization options clfinitemathonly (FINITE_MATH_ONLY
) and clunsafemathoptimizations (UNSAFE_MATH
).static String
FINITE_MATH_ONLY
Allow optimizations for floatingpoint arithmetic that assume that arguments and results are not NaNs or plus/minus infinity.static String
NO_SIGNED_ZEROS
Allow optimizations for floatingpoint arithmetic that ignore the signedness of zero.static String
SINGLE_PRECISION_CONSTANTS
Treat double precision floatingpoint constant as single precision constant.static String
STRICT_ALIASING
This option allows the compiler to assume the strictest aliasing rules.static String
UNSAFE_MATH
Allow optimizations for floatingpoint arithmetic that
(a) assume that arguments and results are valid,
(b) may violate IEEE 754 standard and
(c) may violate the OpenCL numerical compliance requirements as defined in section 7.4 for singleprecision floatingpoint, section 9.3.9 for doubleprecision floatingpoint, and edge case behavior in section 7.5.static String
WARNINGS_ARE_ERRORS
Make all warnings into errors.



Field Detail

SINGLE_PRECISION_CONSTANTS
static final String SINGLE_PRECISION_CONSTANTS
Treat double precision floatingpoint constant as single precision constant. See Also:
 Constant Field Values

DENORMS_ARE_ZERO
static final String DENORMS_ARE_ZERO
This option controls how single precision and double precision denormalized numbers are handled. If specified as a build option, the single precision denormalized numbers may be flushed to zero and if the optional extension for double precision is supported, double precision denormalized numbers may also be flushed to zero. This is intended to be a performance hint and the OpenCL compiler can choose not to flush denorms to zero if the device supports single precision (or double precision) denormalized numbers.
This option is ignored for single precision numbers if the device does not support single precision denormalized numbers i.e.CLDevice.FPConfig.DENORM
is not present in the set returned byCLDevice.getSingleFPConfig()
This option is ignored for double precision numbers if the device does not support double precision or if it does support double precision butCLDevice.FPConfig.DENORM
is not present in the set returned byCLDevice.getDoubleFPConfig()
.
This flag only applies for scalar and vector single precision floatingpoint variables and computations on these floatingpoint variables inside a program. It does not apply to reading from or writing to image objects. See Also:
 Constant Field Values

DISABLE_OPT
static final String DISABLE_OPT
This option disables all optimizations. The default is optimizations are enabled. See Also:
 Constant Field Values

STRICT_ALIASING
static final String STRICT_ALIASING
This option allows the compiler to assume the strictest aliasing rules. See Also:
 Constant Field Values

ENABLE_MAD
static final String ENABLE_MAD
Allow a * b + c to be replaced by a mad. The mad computes a * b + c with reduced accuracy. For example, some OpenCL devices implement mad as truncate the result of a * b before adding it to c. See Also:
 Constant Field Values

NO_SIGNED_ZEROS
static final String NO_SIGNED_ZEROS
Allow optimizations for floatingpoint arithmetic that ignore the signedness of zero. IEEE 754 arithmetic specifies the behavior of distinct +0.0 and 0.0 values, which then prohibits simplification of expressions such as x+0.0 or 0.0*x (even with clfinitemathonly (FINITE_MATH_ONLY
)). This option implies that the sign of a zero result isn't significant. See Also:
 Constant Field Values

UNSAFE_MATH
static final String UNSAFE_MATH
Allow optimizations for floatingpoint arithmetic that
(a) assume that arguments and results are valid,
(b) may violate IEEE 754 standard and
(c) may violate the OpenCL numerical compliance requirements as defined in section 7.4 for singleprecision floatingpoint, section 9.3.9 for doubleprecision floatingpoint, and edge case behavior in section 7.5. This option includes the clnosignedzeros (NO_SIGNED_ZEROS
) and clmadenable (ENABLE_MAD
) options. See Also:
 Constant Field Values

FINITE_MATH_ONLY
static final String FINITE_MATH_ONLY
Allow optimizations for floatingpoint arithmetic that assume that arguments and results are not NaNs or plus/minus infinity. This option may violate the OpenCL numerical compliance requirements defined in in section 7.4 for singleprecision floatingpoint, section 9.3.9 for doubleprecision floatingpoint, and edge case behavior in section 7.5. See Also:
 Constant Field Values

FAST_RELAXED_MATH
static final String FAST_RELAXED_MATH
Sets the optimization options clfinitemathonly (FINITE_MATH_ONLY
) and clunsafemathoptimizations (UNSAFE_MATH
). This allows optimizations for floatingpoint arithmetic that may violate the IEEE 754 standard and the OpenCL numerical compliance requirements defined in the specification in section 7.4 for singleprecision floatingpoint, section 9.3.9 for doubleprecision floatingpoint, and edge case behavior in section 7.5. This option causes the preprocessor macro __FAST_RELAXED_MATH__ to be defined in the OpenCL program. See Also:
 Constant Field Values

DISABLE_WARNINGS
static final String DISABLE_WARNINGS
Inhibit all warning messages. See Also:
 Constant Field Values

WARNINGS_ARE_ERRORS
static final String WARNINGS_ARE_ERRORS
Make all warnings into errors. See Also:
 Constant Field Values

