diff options
author | Alexey Suhov <asuhov@users.noreply.github.com> | 2019-01-21 21:31:31 +0300 |
---|---|---|
committer | openvino-pushbot <44090433+openvino-pushbot@users.noreply.github.com> | 2019-01-21 21:31:31 +0300 |
commit | 9de27f16bc8b712a5b8c99d1d4b4a66c9144942d (patch) | |
tree | 01a383efe94d92b9870d513c2c5ea5d15b07010a /inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp | |
parent | fbc7a4a710c24def8ab199926a7da90a0394b87d (diff) | |
download | dldt-9de27f16bc8b712a5b8c99d1d4b4a66c9144942d.tar.gz dldt-9de27f16bc8b712a5b8c99d1d4b4a66c9144942d.tar.bz2 dldt-9de27f16bc8b712a5b8c99d1d4b4a66c9144942d.zip |
Publishing R5 content (#72)
* Publishing R5 content
* Updated ade revision
* updated readme
* add possibility to build CPU plugin with Intel MKL package
Diffstat (limited to 'inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp')
-rw-r--r-- | inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp b/inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp index 6759294c1..9741c21dc 100644 --- a/inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp +++ b/inference-engine/thirdparty/mkl-dnn/src/common/mkldnn_thread.hpp @@ -24,8 +24,15 @@ #define MKLDNN_THR_OMP 1 #define MKLDNN_THR_TBB 2 +/* Ideally this condition below should never happen (if the library is built + * using regular cmake). For the 3rd-party projects that build the library + * from the sources on their own try to guess the right threading... */ #if !defined(MKLDNN_THR) -#define MKLDNN_THR MKLDNN_THR_SEQ +# if defined(_OPENMP) +# define MKLDNN_THR MKLDNN_THR_OMP +# else +# define MKLDNN_THR MKLDNN_THR_SEQ +# endif #endif #if MKLDNN_THR == MKLDNN_THR_SEQ @@ -49,8 +56,8 @@ inline void mkldnn_thr_barrier() { } #elif MKLDNN_THR == MKLDNN_THR_TBB -#include "tbb/parallel_for.h" #include "tbb/task_arena.h" +#include "tbb/parallel_for.h" #define MKLDNN_THR_SYNC 0 inline int mkldnn_get_max_threads() |