MathFu
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Friends Groups Pages
Build Configuration

Macros that control build configuration. More...

Detailed Description

Macros that control build configuration.

By default MathFu will attempt to build with SIMD optimizations enabled based upon the target architecture and compiler options. However, it's possible to change the default build configuration using the following macros:

MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT MATHFU_COMPILE_FORCE_PADDING Configuration
undefined undefined or 1 Default build configuration, SIMD optimization is enabled based upon the target architecture, compiler options and MathFu library support.
undefined 0 If SIMD is supported, padding of data structures is disabled. See MATHFU_COMPILE_FORCE_PADDING for more information.
defined undefined/0/1 Builds MathFu with explicit SIMD optimization disabled. The compiler could still potentially optimize some code paths with SIMD instructions based upon the compiler options.

Macros

#define MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT
 Disable SIMD build configuration. More...
 
#define MATHFU_COMPILE_FORCE_PADDING
 Enable / disable padding of data structures. More...
 

Macro Definition Documentation

#define MATHFU_COMPILE_FORCE_PADDING

Enable / disable padding of data structures.

By default, when MATHFU_COMPILE_FORCE_PADDING is not defined, data structures are padded when SIMD is enabled (i.e when MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT is also not defined).

If MATHFU_COMPILE_FORCE_PADDING is defined as 1, all data structures are padded to a power of 2 size which enables more efficient SIMD operations. This is the default build configuration when SIMD is enabled.

If MATHFU_COMPILE_FORCE_PADDING is defined as 0, all data structures are packed by the compiler (with no padding) even when the SIMD build configuration is enabled. This build option can be useful in the rare occasion an application is CPU memory bandwidth constrained, at the expense of additional instructions to copy to / from SIMD registers.

To use this build option, this macro must be defined in all modules of the project.

See Also
MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT
#define MATHFU_COMPILE_WITHOUT_SIMD_SUPPORT

Disable SIMD build configuration.

When defined, this macro disables the default behavior of trying to build the library with SIMD enabled based upon the target architecture and compiler options.

To use this build option, this macro must be defined in all modules of the project.