Contents

mathMode

An indication of whether the compiler can perform optimizations for floating-point arithmetic that may violate the IEEE 754 standard.

Declaration

var mathMode: MTLMathMode { get set }

Discussion

This property replaces the fastMathEnabled property.

If fastMathEnabled is true, the system sets mathMode to MTLMathMode.fast and mathFloatingPointFunctions to MTLMathFloatingPointFunctions.fast.

If fastMathEnabled is false, the system sets mathMode to MTLMathMode.safe and mathFloatingPointFunctions to MTLMathFloatingPointFunctions.precise.

Subsequent calls to mathMode or mathFloatingPointFunctions set the variables directly.

Topics

Supporting types

See Also

Configuring the compiler options