Contents

Usage Examples for CNR Support Functions

The following examples illustrate usage of support functions for conditional numerical reproducibility.

Setting Automatically Detected CNR Branch

#include <mkl.h> int main(void) { int my_cbwr_branch; /* Find the available MKL_CBWR_BRANCH automatically */ my_cbwr_branch = mkl_cbwr_get_auto_branch(); /* User code without Intel MKL calls */ /* Piece of the code where CNR of Intel MKL is needed */ /* The performance of Intel MKL functions might be reduced for CNR mode */ if (mkl_cbwr_set(my_cbwr_branch)!=MKL_CBWR_SUCCESS) { printf("Error in setting MKL_CBWR_BRANCH! Aborting…\n"); return; } /* CNR calls to Intel MKL + any other code */ }

Use of the
mkl_cbwr_get
Function

#include <mkl.h> int main(void) { int my_cbwr_branch; /* Piece of the code where CNR of Intel MKL is analyzed */ my_cbwr_branch = mkl_cbwr_get(MKL_CBWR_BRANCH); switch (my_cbwr_branch) { case MKL_CBWR_AUTO: /* actions in case of automatic mode */ break; case MKL_CBWR_SSSE3: /* actions for SSSE3 code */ break; default: /* all other cases */ } /* User code */ }
Optimization Notice
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.
1

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reservered for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804