Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Newbie Question

frank_m1
Beginner
262 Views
How are the Intel C++ Class Libraries parallel? Specifically, does dvec.h only use all available registers on a particular core, or does it use all available registers on all available cores? My preference is for the first case. The application I am working on are math routines (lots of mkl calls) to be feed into a stochastic optimizer so the math apps should be single core.
0 Kudos
1 Solution
TimP
Honored Contributor III
262 Views
It's parallel in the sense that using SIMD operations in xmm registers allows operations to be carried out simultaneously on multiple data, using all the slots in a 128-bit xmm register. The compiler will use as many of the 16 xmm registers on a single logical processor as it finds useful. The registers on other logical processors or cores are used only when the application is compiled with threading.
So, this header deals only with SIMD instruction level parallelism, not with threaded parallelism. For full performance, applications generally need both.
MKL functions include capability to spawn multiple threads inside the function, which you could prevent, e.g. by linking the mkl_sequential option.

View solution in original post

0 Kudos
2 Replies
TimP
Honored Contributor III
263 Views
It's parallel in the sense that using SIMD operations in xmm registers allows operations to be carried out simultaneously on multiple data, using all the slots in a 128-bit xmm register. The compiler will use as many of the 16 xmm registers on a single logical processor as it finds useful. The registers on other logical processors or cores are used only when the application is compiled with threading.
So, this header deals only with SIMD instruction level parallelism, not with threaded parallelism. For full performance, applications generally need both.
MKL functions include capability to spawn multiple threads inside the function, which you could prevent, e.g. by linking the mkl_sequential option.
0 Kudos
frank_m1
Beginner
262 Views
Thanks. That is just what I needed to know.
0 Kudos
Reply