C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

Public Types | Static Public Member Functions | List of all members
Environment Class Reference

Class that provides methods to interact with the environment, including processor detection and control by the number of threads. More...

Public Types

enum  CpuTypeEnable { cpu_default = 0, avx512_mic = 1, avx512 = 2, avx512_mic_e1 = 4 }
 CPU types. More...
 
enum  LibraryThreadingType { MultiThreaded = 0, SingleThreaded = 1 }
 
typedef struct
daal::services::interface1::Environment::_envStruct 
env
 The environment structure. More...
 

Static Public Member Functions

static EnvironmentgetInstance ()
 
static DAAL_DEPRECATED int freeInstance ()
 

Class Declaration

Member Typedef Documentation

Member Enumeration Documentation

Deprecated:
This item will be removed in a future release.
Enumerator
cpu_default 

Default processor type

avx512_mic 

Intel(R) Xeon Phi(TM) processors/coprocessors based on Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512)

Deprecated:
This item will be removed in a future release.
avx512 

Intel(R) Xeon(R) processors based on Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512)

Deprecated:
This item will be removed in a future release.
avx512_mic_e1 

Intel(R) Xeon Phi(TM) processors based on Intel(R) Advanced Vector Extensions 512 (Intel(R) AVX-512) with support of AVX512_4FMAPS and AVX512_4VNNIW instruction groups

The threading mode of the library

Enumerator
MultiThreaded 

Multi-threaded mode

SingleThreaded 

Single-threaded mode

Member Function Documentation

int enableInstructionsSet ( int  enable)

Enable dispatching for new Intel(R) architectures

Parameters
[in]enableAn enabling flag
Returns
CPU ID
Deprecated:
This item will be removed in a future release.
void enableThreadPinning ( bool  enableThreadPinningFlag = true)

Enables thread pinning

Parameters
[in]enableThreadPinningFlagFlag to thread pinning enable
static DAAL_DEPRECATED int freeInstance ( )
static

Decreases the instance counter

Returns
The return code
Deprecated:
This item will be removed in a future release.
int getCpuId ( int  enable = cpu_default)

Detects the processor type

Parameters
[in]enableAn enabling flag
Deprecated:
This item will be removed in a future release.
Returns
The CPU ID
static Environment* getInstance ( )
static

Returns the environment instance

Returns
The environment instance
size_t getNumberOfThreads ( ) const

Returns the number of used threads

Returns
The number of used threads
int setCpuId ( int  cpuid)

Restrict dispatching to the required code path

Parameters
[in]cpuidCPU ID
Returns
CPU ID if success; ErrorCpuInvalid if cpuid value is out of CpuType enum
void setDynamicLibraryThreadingTypeOnWindows ( LibraryThreadingType  type)

Sets the threading mode on Windows*

Parameters
[in]typeThe threading mode of the library
int setMemoryLimit ( MemType  type,
size_t  limit 
)

Limits the amount of memory of the given type available to internal function calls

Parameters
[in]typeMemory type
[in]limitLimit in megabytes
void setNumberOfThreads ( const size_t  numThreads)

Sets the number of threads to use

Parameters
[in]numThreadsThe number of threads

The documentation for this class was generated from the following file:

For more complete information about compiler optimizations, see our Optimization Notice.