Developer Guide for Intel® Data Analytics Acceleration Library 2016 Update 4
Intel DAAL provides the Environment class to manage settings of the computational environment in which the application that uses the library runs. The methods of this class enable you to specify the number of threads for the application to use or to check the type of the processor running the application. The Environment class is a singleton, which ensures that only one instance of the class is available in the Intel DAAL based application. To access the instance of the class, call the getInstance() method which returns a pointer to the instance. Once you get the instance of the class, you can use it for multiple purposes:
Detect the processor type.
To do this, call the getCpuId() method.
You can also use this method to switch to the library version intended for predefined processor types. For example: to select the version for Intel® Xeon® processors that support Intel® Advanced Vector Extensions 512 (Intel® AVX-512), pass the "avx512" parameter to the method.
Detect and modify the number of threads used by the Intel DAAL based application.
To do this, call the getNumberOfThreads() or setNumberOfThreads() method, respectively.
Specify the single-threaded of multi-threaded mode for Intel DAAL on Windows.
To do this, call to the setDynamicLibraryThreadingTypeOnWindows() method.
Call the freeInstance() method of the Environment class when you complete configuring the computational environment.
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 |