From 351ac8a5eb7ac2a6162799e2524ae83bbcb0ab34 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 8 Apr 2024 05:13:08 -0700 Subject: [PATCH 001/120] init commit --- dev/make/compiler_definitions/icx.mkl.32e.mk | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index b22bcfe22ac..8753085b971 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -18,19 +18,23 @@ # Intel compiler definitions for makefile #-- -PLATs.icx = lnx32e mac32e +PLATs.icx = lnx32e win32e CMPLRDIRSUFF.icx = _icx CORE.SERV.COMPILER.icx = generic --Zl.icx = -no-intel-lib=libirc +-Zl.icx = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib=libirc -DEBC.icx = -g +-Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) + COMPILER.lnx.icx = icpx -m64 \ -Werror -Wreturn-type +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Wno-error -Qopenmp-simd -Wno-deprecated-declarations -Wno-error=unused-command-line-argument + link.dynamic.lnx.icx = icpx -m64 pedantic.opts.icx = -pedantic \ @@ -40,7 +44,7 @@ pedantic.opts.icx = -pedantic \ pedantic.opts.lnx.icx = $(pedantic.opts.icx) -p4_OPT.icx = $(-Q)march=nocona -mc3_OPT.icx = $(-Q)march=nehalem -avx2_OPT.icx = $(-Q)march=haswell -skx_OPT.icx = $(-Q)march=skx +p4_OPT.icx = -march=nocona +mc3_OPT.icx = -march=nehalem +avx2_OPT.icx = -march=haswell +skx_OPT.icx = -march=skx \ No newline at end of file From 7a3d95caa30f6cfb9433d9fe99868e675760382e Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 02:46:34 -0700 Subject: [PATCH 002/120] minor fix --- cpp/daal/include/services/daal_defines.h | 4 ++-- cpp/daal/src/services/service_defines.h | 2 +- makefile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index 5415d31dcb7..f0e4e8b772f 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -50,10 +50,10 @@ #ifdef __DAAL_IMPLEMENTATION #define DAAL_EXPORT __declspec(dllexport) #else - #define DAAL_EXPORT + #define DAAL_EXPORT __declspec(dllexport) #endif #else - #define DAAL_EXPORT + #define DAAL_EXPORT __declspec(dllexport) #endif #if (defined(__INTEL_CXX11_MODE__) || __cplusplus > 199711L) diff --git a/cpp/daal/src/services/service_defines.h b/cpp/daal/src/services/service_defines.h index 667bd6913e5..c6e0f8f3424 100644 --- a/cpp/daal/src/services/service_defines.h +++ b/cpp/daal/src/services/service_defines.h @@ -71,7 +71,7 @@ DAAL_EXPORT bool daal_check_is_intel_cpu(); #define PRAGMA_ICC_TO_STR(ARGS) #define PRAGMA_ICC_OMP(ARGS) #define PRAGMA_ICC_NO16(ARGS) - #define DAAL_TYPENAME + #define DAAL_TYPENAME typename #else #define PRAGMA_IVDEP #define PRAGMA_NOVECTOR diff --git a/makefile b/makefile index 18211bbe973..da2889d58eb 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),,$(-Q)std=c++11) +-cxx11 := $(if $(COMPILER_is_vc),/std:c++11,$(-Q)std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) From b3225ba658ce7fc1d6452a3a9bc5a17d773c9883 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 03:06:16 -0700 Subject: [PATCH 003/120] minor fix --- cpp/daal/include/services/daal_defines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index f0e4e8b772f..5415d31dcb7 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -50,10 +50,10 @@ #ifdef __DAAL_IMPLEMENTATION #define DAAL_EXPORT __declspec(dllexport) #else - #define DAAL_EXPORT __declspec(dllexport) + #define DAAL_EXPORT #endif #else - #define DAAL_EXPORT __declspec(dllexport) + #define DAAL_EXPORT #endif #if (defined(__INTEL_CXX11_MODE__) || __cplusplus > 199711L) From ebe2e7133cd309e0cd4d2742842192b47f98a401 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 03:08:56 -0700 Subject: [PATCH 004/120] drop c++11 --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- makefile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 8753085b971..9f68a273a1e 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -47,4 +47,4 @@ pedantic.opts.lnx.icx = $(pedantic.opts.icx) p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem avx2_OPT.icx = -march=haswell -skx_OPT.icx = -march=skx \ No newline at end of file +skx_OPT.icx = -march=skx diff --git a/makefile b/makefile index da2889d58eb..9956595822c 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,6 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),/std:c++11,$(-Q)std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) From a49da6afaffc458e9e213bcfd08ff5c0942d1a89 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 03:48:21 -0700 Subject: [PATCH 005/120] minor fixes --- cpp/daal/include/services/daal_defines.h | 6 +----- makefile | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index 5415d31dcb7..e2e22789ccc 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -47,11 +47,7 @@ #endif #if defined(_WIN32) || defined(_WIN64) - #ifdef __DAAL_IMPLEMENTATION - #define DAAL_EXPORT __declspec(dllexport) - #else - #define DAAL_EXPORT - #endif + #define DAAL_EXPORT __declspec(dllexport) #else #define DAAL_EXPORT #endif diff --git a/makefile b/makefile index 9956595822c..da2889d58eb 100644 --- a/makefile +++ b/makefile @@ -116,6 +116,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) +-cxx11 := $(if $(COMPILER_is_vc),/std:c++11,$(-Q)std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) From 204dcb99fa81113b13d0dbfd50255ac75449ea4c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 04:39:18 -0700 Subject: [PATCH 006/120] minor fix --- cpp/daal/include/services/daal_defines.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index e2e22789ccc..72a4d5e49d1 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -47,7 +47,11 @@ #endif #if defined(_WIN32) || defined(_WIN64) - #define DAAL_EXPORT __declspec(dllexport) + #ifdef __DAAL_IMPLEMENTATION + #define DAAL_EXPORT __declspec(dllexport) + #else + #define DAAL_EXPORT __declspec(dllimport) + #endif #else #define DAAL_EXPORT #endif From d8c5f8be90a56420deba9726e0c367848e4830a9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 05:45:49 -0700 Subject: [PATCH 007/120] drop c++11 --- cpp/daal/include/services/daal_defines.h | 2 +- makefile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index 72a4d5e49d1..5415d31dcb7 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -50,7 +50,7 @@ #ifdef __DAAL_IMPLEMENTATION #define DAAL_EXPORT __declspec(dllexport) #else - #define DAAL_EXPORT __declspec(dllimport) + #define DAAL_EXPORT #endif #else #define DAAL_EXPORT diff --git a/makefile b/makefile index da2889d58eb..616526d83aa 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,6 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),/std:c++11,$(-Q)std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) @@ -481,8 +480,9 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -$(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += -D__DAAL_IMPLEMENTATION \ + -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) $(CORE.objs_a): COPT += @$(CORE.tmpdir_a)/inc_a_folders.txt @@ -491,7 +491,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -838,7 +838,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From 3b36216412e188f8a85df8c01810b5701c878522 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 06:13:07 -0700 Subject: [PATCH 008/120] minor fixes with extern --- cpp/daal/include/services/daal_defines.h | 2 +- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- makefile | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index 5415d31dcb7..7f8636b7832 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -50,7 +50,7 @@ #ifdef __DAAL_IMPLEMENTATION #define DAAL_EXPORT __declspec(dllexport) #else - #define DAAL_EXPORT + #define DAAL_EXPORT extern #endif #else #define DAAL_EXPORT diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 9f68a273a1e..588e54e90cb 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -18,7 +18,7 @@ # Intel compiler definitions for makefile #-- -PLATs.icx = lnx32e win32e +PLATs.icx = lnx32e win32e mac32e CMPLRDIRSUFF.icx = _icx diff --git a/makefile b/makefile index 616526d83aa..f5d9eddc091 100644 --- a/makefile +++ b/makefile @@ -481,8 +481,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt $(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -$(CORE.objs_a): COPT += -D__DAAL_IMPLEMENTATION \ - -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ +$(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) $(CORE.objs_a): COPT += @$(CORE.tmpdir_a)/inc_a_folders.txt From fe8ac3a99cb4e6957cfc9cb711d37e4fe728a540 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 06:33:27 -0700 Subject: [PATCH 009/120] remove DAAL_IMPLEMENTATION --- cpp/daal/include/services/daal_defines.h | 6 +----- makefile | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index 7f8636b7832..e2e22789ccc 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -47,11 +47,7 @@ #endif #if defined(_WIN32) || defined(_WIN64) - #ifdef __DAAL_IMPLEMENTATION - #define DAAL_EXPORT __declspec(dllexport) - #else - #define DAAL_EXPORT extern - #endif + #define DAAL_EXPORT __declspec(dllexport) #else #define DAAL_EXPORT #endif diff --git a/makefile b/makefile index f5d9eddc091..0c36a0697cf 100644 --- a/makefile +++ b/makefile @@ -491,8 +491,7 @@ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt $(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -$(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ - -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ +$(CORE.objs_y): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) $(CORE.objs_y): COPT += @$(CORE.tmpdir_y)/inc_y_folders.txt @@ -845,7 +844,6 @@ $(THR.objs_a): COPT += @$(THR.tmpdir_a)/thr_inc_a_folders.txt $(THR.objs_y): $(THR.tmpdir_y)/thr_inc_y_folders.txt $(THR.objs_y): COPT += @$(THR.tmpdir_y)/thr_inc_y_folders.txt -$(THR.objs_y): COPT += -D__DAAL_IMPLEMENTATION $(THR.tmpdir_a)/thr_inc_a_folders.txt: makefile.lst | $(THR.tmpdir_a)/. $(CORE.incdirs) ; $(call WRITE.PREREQS,$(addprefix -I, $(CORE.incdirs)),$(space)) $(THR.tmpdir_y)/thr_inc_y_folders.txt: makefile.lst | $(THR.tmpdir_y)/. $(CORE.incdirs) ; $(call WRITE.PREREQS,$(addprefix -I, $(CORE.incdirs)),$(space)) From 15c48390583c0ea232f9fcc0cab3ce87bfcee08b Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 9 Apr 2024 06:58:33 -0700 Subject: [PATCH 010/120] minor fix --- cpp/daal/include/services/daal_defines.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index e2e22789ccc..c433ba9bc39 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -46,11 +46,14 @@ #define __int64 long long int #endif -#if defined(_WIN32) || defined(_WIN64) - #define DAAL_EXPORT __declspec(dllexport) -#else - #define DAAL_EXPORT -#endif +#ifndef DAAL_EXPORT + #if defined(_WIN32) || defined(_WIN64) + /// @brief Microsoft-specific dllexport storage-class attribute + #define DAAL_EXPORT __declspec(dllexport) + #else + #define DAAL_EXPORT + #endif +#endif // DAAL_EXPORT #if (defined(__INTEL_CXX11_MODE__) || __cplusplus > 199711L) #define DAAL_C11_OVERRIDE override From 45f9eab68ae96909bed987efb1b1abc2572be7a9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 10 Apr 2024 03:48:08 -0700 Subject: [PATCH 011/120] aligning win and lnx --- cpp/daal/include/services/daal_defines.h | 9 +++++---- dev/make/compiler_definitions/icx.mkl.32e.mk | 7 +++++-- makefile | 4 +++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index c433ba9bc39..5415d31dcb7 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -46,14 +46,15 @@ #define __int64 long long int #endif -#ifndef DAAL_EXPORT - #if defined(_WIN32) || defined(_WIN64) - /// @brief Microsoft-specific dllexport storage-class attribute +#if defined(_WIN32) || defined(_WIN64) + #ifdef __DAAL_IMPLEMENTATION #define DAAL_EXPORT __declspec(dllexport) #else #define DAAL_EXPORT #endif -#endif // DAAL_EXPORT +#else + #define DAAL_EXPORT +#endif #if (defined(__INTEL_CXX11_MODE__) || __cplusplus > 199711L) #define DAAL_C11_OVERRIDE override diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 588e54e90cb..6e3c27153a4 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -18,7 +18,7 @@ # Intel compiler definitions for makefile #-- -PLATs.icx = lnx32e win32e mac32e +PLATs.icx = lnx32e win32e CMPLRDIRSUFF.icx = _icx @@ -33,9 +33,11 @@ COMPILER.lnx.icx = icpx -m64 \ -Werror -Wreturn-type -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Wno-error -Qopenmp-simd -Wno-deprecated-declarations -Wno-error=unused-command-line-argument +COMPILER.win.icx = icpx -m64 \ + -Werror -Wreturn-type link.dynamic.lnx.icx = icpx -m64 +link.dynamic.win.icx = icpx -m64 pedantic.opts.icx = -pedantic \ -Wall \ @@ -43,6 +45,7 @@ pedantic.opts.icx = -pedantic \ -Wno-unused-parameter pedantic.opts.lnx.icx = $(pedantic.opts.icx) +pedantic.opts.win.icx = $(pedantic.opts.icx) p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem diff --git a/makefile b/makefile index 0c36a0697cf..f5d9eddc091 100644 --- a/makefile +++ b/makefile @@ -491,7 +491,8 @@ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt $(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -$(CORE.objs_y): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ +$(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ + -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) $(CORE.objs_y): COPT += @$(CORE.tmpdir_y)/inc_y_folders.txt @@ -844,6 +845,7 @@ $(THR.objs_a): COPT += @$(THR.tmpdir_a)/thr_inc_a_folders.txt $(THR.objs_y): $(THR.tmpdir_y)/thr_inc_y_folders.txt $(THR.objs_y): COPT += @$(THR.tmpdir_y)/thr_inc_y_folders.txt +$(THR.objs_y): COPT += -D__DAAL_IMPLEMENTATION $(THR.tmpdir_a)/thr_inc_a_folders.txt: makefile.lst | $(THR.tmpdir_a)/. $(CORE.incdirs) ; $(call WRITE.PREREQS,$(addprefix -I, $(CORE.incdirs)),$(space)) $(THR.tmpdir_y)/thr_inc_y_folders.txt: makefile.lst | $(THR.tmpdir_y)/. $(CORE.incdirs) ; $(call WRITE.PREREQS,$(addprefix -I, $(CORE.incdirs)),$(space)) From a21bc6ab8099a694f72c0a2755c3e91ab95f52c1 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 00:51:04 -0700 Subject: [PATCH 012/120] drop icc --- .ci/scripts/describe_system.sh | 6 +- dev/bazel/flags.bzl | 11 -- dev/bazel/toolchains/cc_toolchain_lnx.bzl | 3 - dev/bazel/toolchains/common.bzl | 4 +- dev/make/common.mk | 10 +- dev/make/compiler_definitions/dpcpp.mk | 4 +- dev/make/compiler_definitions/icc.mkl.32e.mk | 106 +++++++++---------- dev/make/compiler_definitions/icx.mkl.32e.mk | 9 +- dev/make/deps.mk | 2 - dev/make/function_definitions/32e.mk | 4 +- samples/daal/cpp/mysql/makefile_lnx | 2 +- samples/daal/cpp/mysql/makefile_mac | 2 +- 12 files changed, 72 insertions(+), 91 deletions(-) diff --git a/.ci/scripts/describe_system.sh b/.ci/scripts/describe_system.sh index 498e91dce0d..e31e884b5c8 100755 --- a/.ci/scripts/describe_system.sh +++ b/.ci/scripts/describe_system.sh @@ -50,9 +50,9 @@ if [ -x "$(command -v clang)" ]; then echo "Clang:" clang --version fi -if [ -x "$(command -v icc)" ]; then - echo "ICC:" - icc --version +if [ -x "$(command -v icx)" ]; then + echo "ICX:" + icx --version fi if [ -x "$(command -v icpx)" ]; then echo "ICPX:" diff --git a/dev/bazel/flags.bzl b/dev/bazel/flags.bzl index 71d5f3b867f..69ce4c6f8d1 100644 --- a/dev/bazel/flags.bzl +++ b/dev/bazel/flags.bzl @@ -41,12 +41,6 @@ def get_default_flags(arch_id, os_id, compiler_id, category = "common"): _check_flag_category(category) if os_id == "lnx": flags = lnx_cc_flags[category] - if compiler_id == "icc" and category == "common": - flags = flags + [ - "-qopenmp-simd", - "-mGLOB_freestanding=TRUE", - "-mCG_no_libirc=TRUE", - ] if compiler_id == "icx" and category == "common": flags = flags + [ "-qopenmp-simd", @@ -75,11 +69,6 @@ def get_cpu_flags(arch_id, os_id, compiler_id): sse42 = ["-march=corei7"] avx2 = ["-march=haswell"] avx512 = ["-march=haswell"] - elif compiler_id == "icc": - sse2 = ["-xSSE2"] - sse42 = ["-xSSE4.2"] - avx2 = ["-xCORE-AVX2"] - avx512 = ["-xCORE-AVX512", "-qopt-zmm-usage=high"] elif compiler_id in ["icx", "icpx"]: sse2 = ["-march=nocona"] sse42 = ["-march=nehalem"] diff --git a/dev/bazel/toolchains/cc_toolchain_lnx.bzl b/dev/bazel/toolchains/cc_toolchain_lnx.bzl index 4dd36108503..e1cf9e06e3a 100644 --- a/dev/bazel/toolchains/cc_toolchain_lnx.bzl +++ b/dev/bazel/toolchains/cc_toolchain_lnx.bzl @@ -292,9 +292,6 @@ def configure_cc_toolchain_lnx(repo_ctx, reqs): tools.cc, "-pass-exit-codes", ) + - ( - ["-no-cilk", "-static-intel"] if reqs.compiler_id == "icc" else [] - ) + ( ["-static-intel"] if reqs.compiler_id in ["icx", "icpx"] else [] ) + diff --git a/dev/bazel/toolchains/common.bzl b/dev/bazel/toolchains/common.bzl index 6f926f6c27f..23d83742880 100644 --- a/dev/bazel/toolchains/common.bzl +++ b/dev/bazel/toolchains/common.bzl @@ -64,8 +64,8 @@ def detect_compiler(repo_ctx, os_id): return "cl" elif "icx" in compiler_path: return "icx" - elif "icc" in compiler_path: - return "icc" + elif "icpx" in compiler_path: + return "icpx" def get_starlark_dict(dictionary): entries = [ "\"{}\":\"{}\"".format(k, v) for k, v in dictionary.items() ] diff --git a/dev/make/common.mk b/dev/make/common.mk index 291ca7e406b..fe54740f66c 100644 --- a/dev/make/common.mk +++ b/dev/make/common.mk @@ -67,10 +67,10 @@ md5sum.cmd.win = md5sum md5sum.cmd.mac = md5 -q # Enable compiler-provided defences as recommended by Intel Security Development Lifecycle document (SW.01) -secure.opts.icc.win = -GS -secure.opts.icc.lnx = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong +secure.opts.icx.win = -GS +secure.opts.icx.lnx = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -secure.opts.icc.mac = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector +secure.opts.icx.mac = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector secure.opts.link.win = -DYNAMICBASE -NXCOMPAT secure.opts.link.lnx = -z relro -z now -z noexecstack @@ -81,11 +81,11 @@ RC.COMPILE = rc.exe $(RCOPT) -fo$@ $< # Used as $(eval $(call set_c_compile,$(COMPILER),$(_OS),$(gcc_toolchain)) C.COMPILE = $(if $(COMPILER.$(_OS).$(COMPILER)),$(COMPILER.$(_OS).$(COMPILER)),$(error COMPILER.$(_OS).$(COMPILER) must be defined)) \ $(if $(C.COMPILE.gcc_toolchain),--gcc-toolchain=$(C.COMPILE.gcc_toolchain)) \ - -c $(secure.opts.icc.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< + -c $(secure.opts.icx.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< DPC.COMPILE = $(if $(COMPILER.$(_OS).dpcpp),$(COMPILER.$(_OS).dpcpp),$(error COMPILER.$(_OS).dpcpp must be defined)) \ $(if $(DPC.COMPILE.gcc_toolchain),--gcc-toolchain=$(DPC.COMPILE.gcc_toolchain)) \ - -c $(secure.opts.icc.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< + -c $(secure.opts.icx.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< # Enable additional options to follow ISO C++ standards pedantic.opts = $(pedantic.opts.$(_OS).$(COMPILER)) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index 848f36c2db1..fc6f0f4c3af 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -30,11 +30,11 @@ CORE.SERV.COMPILER.dpcpp = generic COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel -COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ +COMPILER.win.dpcpp = icpx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel -link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel +link.dynamic.win.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel pedantic.opts.lnx.dpcpp = -pedantic \ -Wall \ diff --git a/dev/make/compiler_definitions/icc.mkl.32e.mk b/dev/make/compiler_definitions/icc.mkl.32e.mk index a6ff2410ecc..e4e500a334b 100644 --- a/dev/make/compiler_definitions/icc.mkl.32e.mk +++ b/dev/make/compiler_definitions/icc.mkl.32e.mk @@ -1,53 +1,53 @@ -#=============================================================================== -# Copyright 2012 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#=============================================================================== - -#++ -# Intel compiler definitions for makefile -#-- - -PLATs.icc = lnx32e win32e mac32e - -CMPLRDIRSUFF.icc = - -CORE.SERV.COMPILER.icc = generic --DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) - --Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE --Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) - -COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ - -Werror -Wreturn-type -diag-disable=10441 -COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) -COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 -COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ - -Werror -Wreturn-type -diag-disable=10441 - -link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 -link.dynamic.mac.icc = icc -diag-disable=10441 - -pedantic.opts.lnx.icc = -pedantic \ - -Wall \ - -Wextra \ - -Wno-unused-parameter - -daaldep.lnx32e.rt.icc = -static-intel -daaldep.lnx32.rt.icc = -static-intel - -p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) -mc3_OPT.icc = $(-Q)xSSE4.2 -avx2_OPT.icc = $(-Q)xCORE-AVX2 -skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high -#TODO add march opts in GCC style +# #=============================================================================== +# # Copyright 2012 Intel Corporation +# # +# # Licensed under the Apache License, Version 2.0 (the "License"); +# # you may not use this file except in compliance with the License. +# # You may obtain a copy of the License at +# # +# # http://www.apache.org/licenses/LICENSE-2.0 +# # +# # Unless required by applicable law or agreed to in writing, software +# # distributed under the License is distributed on an "AS IS" BASIS, +# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# # See the License for the specific language governing permissions and +# # limitations under the License. +# #=============================================================================== + +# #++ +# # Intel compiler definitions for makefile +# #-- + +# PLATs.icc = lnx32e win32e mac32e + +# CMPLRDIRSUFF.icc = + +# CORE.SERV.COMPILER.icc = generic +# -DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) + +# -Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE +# -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) + +# COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ +# -Werror -Wreturn-type -diag-disable=10441 +# COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) +# COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 +# COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ +# -Werror -Wreturn-type -diag-disable=10441 + +# link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 +# link.dynamic.mac.icc = icc -diag-disable=10441 + +# pedantic.opts.lnx.icc = -pedantic \ +# -Wall \ +# -Wextra \ +# -Wno-unused-parameter + +# daaldep.lnx32e.rt.icc = -static-intel +# daaldep.lnx32.rt.icc = -static-intel + +# p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) +# mc3_OPT.icc = $(-Q)xSSE4.2 +# avx2_OPT.icc = $(-Q)xCORE-AVX2 +# skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high +# #TODO add march opts in GCC style diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 6e3c27153a4..9ec96865362 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -29,15 +29,13 @@ CORE.SERV.COMPILER.icx = generic -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) -COMPILER.lnx.icx = icpx -m64 \ +COMPILER.lnx.icx = icx -m64 \ -Werror -Wreturn-type -COMPILER.win.icx = icpx -m64 \ - -Werror -Wreturn-type +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Wno-error -Qopenmp-simd -Wno-deprecated-declarations -Wno-error=unused-command-line-argument -link.dynamic.lnx.icx = icpx -m64 -link.dynamic.win.icx = icpx -m64 +link.dynamic.lnx.icx = icx -m64 pedantic.opts.icx = -pedantic \ -Wall \ @@ -45,7 +43,6 @@ pedantic.opts.icx = -pedantic \ -Wno-unused-parameter pedantic.opts.lnx.icx = $(pedantic.opts.icx) -pedantic.opts.win.icx = $(pedantic.opts.icx) p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem diff --git a/dev/make/deps.mk b/dev/make/deps.mk index 07c5d37971c..6f95fba1370 100644 --- a/dev/make/deps.mk +++ b/dev/make/deps.mk @@ -77,8 +77,6 @@ $1 = $$(if $$(or $$(.sources-changed),$$(and $$(.mkfiles-changed),$$(call .trigg # Enhance build commands with support for dependency generation # (does not depend on macro from which particular command if called, only on command executable name) dep-gen-enhanced-common = $(call $(SELF),$1 $(.copt-gen-deps)) && $(.keep-raw-deps) sed -n $(sed.-i) $(sed.fix-deps) $(sed.rm-abs-paths) -e '/./{ p; $(sed.mk-phony-targets)}' $(.dep-file-tmp) -dep-gen-enhanced.icc = $(dep-gen-enhanced-common) -dep-gen-enhanced.icl = $(dep-gen-enhanced-common) dep-gen-enhanced.icx = $(dep-gen-enhanced-common) dep-gen-enhanced.g++ = $(dep-gen-enhanced-common) dep-gen-enhanced.dpcpp = $(if $(OS_is_win),,$(dep-gen-enhanced-common)) diff --git a/dev/make/function_definitions/32e.mk b/dev/make/function_definitions/32e.mk index 41dfbb96fe9..720e9711c6b 100644 --- a/dev/make/function_definitions/32e.mk +++ b/dev/make/function_definitions/32e.mk @@ -19,8 +19,8 @@ ifeq ($(filter mkl ref,$(BACKEND_CONFIG)),) Supported config for '$(PLAT)' are ['mkl', 'ref']) endif -COMPILERs = icc icx gnu clang vc -COMPILER ?= icc +COMPILERs = icx gnu clang vc +COMPILER ?= icx CPUs := sse2 sse42 avx2 avx512 CPUs.files := nrh neh hsw skx diff --git a/samples/daal/cpp/mysql/makefile_lnx b/samples/daal/cpp/mysql/makefile_lnx index a0dd6494d40..03bed8f96f1 100644 --- a/samples/daal/cpp/mysql/makefile_lnx +++ b/samples/daal/cpp/mysql/makefile_lnx @@ -84,7 +84,7 @@ RES = $(addprefix $(RES_DIR)/, $(if $(filter run, $(mode)), $(addsuffix .res ,$( ifeq ($(compiler),intel) - CC = icc + CC = icx endif ifeq ($(compiler),gnu) diff --git a/samples/daal/cpp/mysql/makefile_mac b/samples/daal/cpp/mysql/makefile_mac index 71fbb6a1b0c..a8143453737 100644 --- a/samples/daal/cpp/mysql/makefile_mac +++ b/samples/daal/cpp/mysql/makefile_mac @@ -77,7 +77,7 @@ RES = $(addprefix $(RES_DIR)/, $(if $(filter run, $(mode)), $(addsuffix .res ,$( ifeq ($(compiler),intel) - CC = icc + CC = icx endif ifeq ($(compiler),gnu) From c15acbe5090426bcca2ba21ad1cde726a770acd5 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 01:54:48 -0700 Subject: [PATCH 013/120] minor fix --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 ++ makefile | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 9ec96865362..25e4a60cbb6 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -40,9 +40,11 @@ link.dynamic.lnx.icx = icx -m64 pedantic.opts.icx = -pedantic \ -Wall \ -Wextra \ + -Wwritable-strings \ -Wno-unused-parameter pedantic.opts.lnx.icx = $(pedantic.opts.icx) +pedantic.opts.win.icx = $(pedantic.opts.icx) p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem diff --git a/makefile b/makefile index f5d9eddc091..da2889d58eb 100644 --- a/makefile +++ b/makefile @@ -116,6 +116,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) +-cxx11 := $(if $(COMPILER_is_vc),/std:c++11,$(-Q)std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) @@ -480,7 +481,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) $(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) @@ -490,7 +491,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -837,7 +838,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From 1691cb89d609269b7a13444f0cf0958557d8d504 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 02:59:35 -0700 Subject: [PATCH 014/120] drop c++11 --- makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index da2889d58eb..f5d9eddc091 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,6 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),/std:c++11,$(-Q)std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) @@ -481,7 +480,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) @@ -491,7 +490,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -838,7 +837,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From f99d304b9fb9a1ce4671ffe63251e898ae3fa93d Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 03:21:57 -0700 Subject: [PATCH 015/120] update tokens --- .../src/externals/core_threading_win_dll.cpp | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index bfd7ac01a32..68a2e423849 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -770,7 +770,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -781,11 +781,11 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ + if (fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr##argcall; \ + fn_dpref##fn_name##_ptr##argcall; \ } #if defined(_WIN64) @@ -793,18 +793,18 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ + if (fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr##argcall; \ + fn_dpref##fn_name##_ptr##argcall; \ } #else #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) #endif #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -815,9 +815,9 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ + if (fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ return fn_dpref##fn_name##_ptr##argcall; \ } @@ -827,9 +827,9 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ + if (fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ return fn_dpref##fn_name##_ptr##argcall; \ } @@ -837,6 +837,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) #endif + /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ CALL_VOID_FUNC_FROM_DLL(fpk_blas_, dsyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const double * alpha, const double * a, From 6f62aa995e915aa31e5dc47c9869b7e1fa3509ad Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 04:05:37 -0700 Subject: [PATCH 016/120] minor fix --- .../src/externals/core_threading_win_dll.cpp | 132 +++++++++--------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 68a2e423849..fbf43433fb2 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -233,7 +233,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func("_threaded_scalable_malloc"); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); } return _threaded_malloc_ptr(size, alignment); } @@ -243,7 +243,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func("_threaded_scalable_free"); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); } _threaded_free_ptr(ptr); } @@ -253,7 +253,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for"); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -263,7 +263,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func("_daal_threader_for_simple"); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -273,7 +273,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func("_daal_threader_for_int32ptr"); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -283,7 +283,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func("_daal_threader_for_int64"); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); } _daal_threader_for_int64_ptr(n, a, func); } @@ -293,7 +293,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func("_daal_static_threader_for"); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); } _daal_static_threader_for_ptr(n, a, func); } @@ -303,7 +303,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func("_daal_parallel_sort_int32"); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -313,7 +313,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func("_daal_parallel_sort_uint64"); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -324,7 +324,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_int32_uint64"); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -334,7 +334,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp32_uint64"); + _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -344,7 +344,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp64_uint64"); + _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -354,7 +354,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func("_daal_threader_for_blocked"); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -364,7 +364,7 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func("_daal_threader_for_blocked_size"); + _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -374,7 +374,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for_optional"); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -385,7 +385,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func("_daal_parallel_reduce_int32_int64"); + _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -397,7 +397,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32_int64_simple"); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -410,7 +410,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32ptr_int64_simple"); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -420,7 +420,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func("_daal_threader_for_break"); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -430,7 +430,7 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func("_daal_threader_get_max_threads"); + _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); } return _daal_threader_get_max_threads_ptr(); } @@ -441,7 +441,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func("_daal_threader_get_current_thread_index"); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); } return _daal_threader_get_current_thread_index_ptr(); } @@ -451,7 +451,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func("_daal_get_tls_ptr"); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); } return _daal_get_tls_ptr_ptr(a, func); } @@ -461,7 +461,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func("_daal_del_tls_ptr"); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -471,7 +471,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func("_daal_get_tls_local"); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -481,7 +481,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func("_daal_reduce_tls"); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -491,7 +491,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func("_daal_parallel_reduce_tls"); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -501,7 +501,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func("_daal_get_ls_ptr"); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); } return _daal_get_ls_ptr_ptr(a, func); } @@ -511,7 +511,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func("_daal_del_ls_ptr"); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -521,7 +521,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func("_daal_get_ls_local"); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); } return _daal_get_ls_local_ptr(lsPtr); } @@ -531,7 +531,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func("_daal_release_ls_local"); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -541,7 +541,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func("_daal_reduce_ls"); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -551,7 +551,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func("_daal_new_mutex"); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); } return _daal_new_mutex_ptr(); } @@ -561,7 +561,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func("_daal_lock_mutex"); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); } _daal_lock_mutex_ptr(mutexPtr); } @@ -571,7 +571,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func("_daal_unlock_mutex"); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -581,7 +581,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func("_daal_del_mutex"); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); } _daal_del_mutex_ptr(mutexPtr); } @@ -591,7 +591,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func("_daal_new_task_group"); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); } return _daal_new_task_group_ptr(); } @@ -601,7 +601,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func("_daal_del_task_group"); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -611,7 +611,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func("_daal_run_task_group"); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -621,7 +621,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func("_daal_wait_task_group"); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -631,7 +631,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func("_daal_is_in_parallel"); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); } return _daal_is_in_parallel_ptr(); } @@ -652,7 +652,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func("_daal_tbb_task_scheduler_free"); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -662,7 +662,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func("_setNumberOfThreads"); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -672,7 +672,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func("_daal_threader_env"); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); } return _daal_threader_env_ptr(); } @@ -683,7 +683,7 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func("_thread_pinner_thread_pinner_init"); + _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); } _thread_pinner_thread_pinner_init_ptr(); } @@ -693,7 +693,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func("_thread_pinner_read_topology"); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); } _thread_pinner_read_topology_ptr(); } @@ -703,7 +703,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func("_thread_pinner_on_scheduler_entry"); + _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -713,7 +713,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func("_thread_pinner_on_scheduler_exit"); + _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -723,7 +723,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func("_thread_pinner_execute"); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); } _thread_pinner_execute_ptr(task); } @@ -733,7 +733,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func("_thread_pinner_get_status"); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); } return _thread_pinner_get_status_ptr(); } @@ -743,7 +743,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func("_thread_pinner_get_pinning"); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); } return _thread_pinner_get_pinning_ptr(); } @@ -753,7 +753,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func("_thread_pinner_set_pinning"); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); } return _thread_pinner_set_pinning_ptr(p); } @@ -763,14 +763,14 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func("_getThreadPinner"); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -783,9 +783,9 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); \ if (fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ } \ - fn_dpref##fn_name##_ptr##argcall; \ + fn_dpref##fn_name##_ptr argcall; \ } #if defined(_WIN64) @@ -795,16 +795,16 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); \ if (fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ } \ - fn_dpref##fn_name##_ptr##argcall; \ + fn_dpref##fn_name##_ptr argcall; \ } #else #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) #endif #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -817,9 +817,9 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); \ if (fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ } \ - return fn_dpref##fn_name##_ptr##argcall; \ + return fn_dpref##fn_name##_ptr argcall; \ } #if defined(_WIN64) @@ -829,9 +829,9 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); \ if (fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ } \ - return fn_dpref##fn_name##_ptr##argcall; \ + return fn_dpref##fn_name##_ptr argcall; \ } #else #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) @@ -1115,7 +1115,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_64f_I, (Ipp64f * CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * pSrcDst, Ipp32f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); #define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*##fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT void fn_dpref##fn_name##argdecl \ { \ @@ -1124,11 +1124,11 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr##argcall; \ + ##fn_dpref##fn_name##_ptr argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*##fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name##argdecl \ { \ @@ -1137,7 +1137,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - return fn_dpref##fn_name##_ptr##argcall; \ + return fn_dpref##fn_name##_ptr argcall; \ } CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_serv_, set_num_threads, (int nth), (nth)); From 9758af116a185fc9db94e8378e34c78466f185fe Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 04:53:30 -0700 Subject: [PATCH 017/120] minor fix --- .../src/externals/core_threading_win_dll.cpp | 143 +++++++++--------- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index fbf43433fb2..8070fb10f3a 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -77,7 +77,7 @@ static void load_daal_thr_dll(void) } } -FARPROC load_daal_thr_func(char * ordinal) +FARPROC load_daal_thr_func(const char * ordinal) { FARPROC FuncAddress; @@ -233,7 +233,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func("_threaded_scalable_malloc"); } return _threaded_malloc_ptr(size, alignment); } @@ -243,7 +243,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func("_threaded_scalable_free"); } _threaded_free_ptr(ptr); } @@ -253,7 +253,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for"); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -263,7 +263,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func("_daal_threader_for_simple"); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -273,7 +273,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func("_daal_threader_for_int32ptr"); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -283,7 +283,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func("_daal_threader_for_int64"); } _daal_threader_for_int64_ptr(n, a, func); } @@ -293,7 +293,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func("_daal_static_threader_for"); } _daal_static_threader_for_ptr(n, a, func); } @@ -303,7 +303,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func("_daal_parallel_sort_int32"); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -313,7 +313,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func("_daal_parallel_sort_uint64"); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -324,7 +324,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_int32_uint64"); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -334,7 +334,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); + _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp32_uint64"); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -344,7 +344,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); + _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp64_uint64"); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -354,7 +354,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func("_daal_threader_for_blocked"); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -364,7 +364,7 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); + _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func("_daal_threader_for_blocked_size"); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -374,7 +374,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for_optional"); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -385,7 +385,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); + _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func("_daal_parallel_reduce_int32_int64"); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -397,7 +397,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32_int64_simple"); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -410,7 +410,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32ptr_int64_simple"); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -420,7 +420,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func("_daal_threader_for_break"); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -430,7 +430,7 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); + _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func("_daal_threader_get_max_threads"); } return _daal_threader_get_max_threads_ptr(); } @@ -441,7 +441,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func("_daal_threader_get_current_thread_index"); } return _daal_threader_get_current_thread_index_ptr(); } @@ -451,7 +451,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func("_daal_get_tls_ptr"); } return _daal_get_tls_ptr_ptr(a, func); } @@ -461,7 +461,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func("_daal_del_tls_ptr"); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -471,7 +471,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func("_daal_get_tls_local"); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -481,7 +481,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func("_daal_reduce_tls"); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -491,7 +491,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func("_daal_parallel_reduce_tls"); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -501,7 +501,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func("_daal_get_ls_ptr"); } return _daal_get_ls_ptr_ptr(a, func); } @@ -511,7 +511,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func("_daal_del_ls_ptr"); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -521,7 +521,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func("_daal_get_ls_local"); } return _daal_get_ls_local_ptr(lsPtr); } @@ -531,7 +531,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func("_daal_release_ls_local"); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -541,7 +541,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func("_daal_reduce_ls"); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -551,7 +551,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func("_daal_new_mutex"); } return _daal_new_mutex_ptr(); } @@ -561,7 +561,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func("_daal_lock_mutex"); } _daal_lock_mutex_ptr(mutexPtr); } @@ -571,7 +571,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func("_daal_unlock_mutex"); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -581,7 +581,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func("_daal_del_mutex"); } _daal_del_mutex_ptr(mutexPtr); } @@ -591,7 +591,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func("_daal_new_task_group"); } return _daal_new_task_group_ptr(); } @@ -601,7 +601,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func("_daal_del_task_group"); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -611,7 +611,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func("_daal_run_task_group"); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -621,7 +621,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func("_daal_wait_task_group"); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -631,7 +631,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func("_daal_is_in_parallel"); } return _daal_is_in_parallel_ptr(); } @@ -652,7 +652,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func("_daal_tbb_task_scheduler_free"); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -662,7 +662,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func("_setNumberOfThreads"); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -672,7 +672,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func("_daal_threader_env"); } return _daal_threader_env_ptr(); } @@ -683,7 +683,7 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); + _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func("_thread_pinner_thread_pinner_init"); } _thread_pinner_thread_pinner_init_ptr(); } @@ -693,7 +693,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func("_thread_pinner_read_topology"); } _thread_pinner_read_topology_ptr(); } @@ -703,7 +703,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); + _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func("_thread_pinner_on_scheduler_entry"); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -713,7 +713,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); + _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func("_thread_pinner_on_scheduler_exit"); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -723,7 +723,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func("_thread_pinner_execute"); } _thread_pinner_execute_ptr(task); } @@ -733,7 +733,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func("_thread_pinner_get_status"); } return _thread_pinner_get_status_ptr(); } @@ -743,7 +743,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func("_thread_pinner_get_pinning"); } return _thread_pinner_get_pinning_ptr(); } @@ -753,7 +753,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func("_thread_pinner_set_pinning"); } return _thread_pinner_set_pinning_ptr(p); } @@ -763,14 +763,14 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func("_getThreadPinner"); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*fn_dpref##fn_name##_t)argdecl; \ + typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -781,11 +781,11 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ + if (##fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ - fn_dpref##fn_name##_ptr argcall; \ + ##fn_dpref##fn_name##_ptr##argcall; \ } #if defined(_WIN64) @@ -793,18 +793,18 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ + if (##fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ - fn_dpref##fn_name##_ptr argcall; \ + ##fn_dpref##fn_name##_ptr##argcall; \ } #else #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) #endif #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*fn_dpref##fn_name##_t)argdecl; \ + typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -815,11 +815,11 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ + if (##fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ - return fn_dpref##fn_name##_ptr argcall; \ + return fn_dpref##fn_name##_ptr##argcall; \ } #if defined(_WIN64) @@ -827,17 +827,16 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ + if (##fn_dpref##fn_name##_ptr == NULL) \ { \ - fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ } \ - return fn_dpref##fn_name##_ptr argcall; \ + return fn_dpref##fn_name##_ptr##argcall; \ } #else #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) #endif - /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ CALL_VOID_FUNC_FROM_DLL(fpk_blas_, dsyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const double * alpha, const double * a, @@ -1115,7 +1114,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_64f_I, (Ipp64f * CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * pSrcDst, Ipp32f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); #define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)argdecl; \ + typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT void fn_dpref##fn_name##argdecl \ { \ @@ -1124,11 +1123,11 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr argcall; \ + ##fn_dpref##fn_name##_ptr##argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)argdecl; \ + typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name##argdecl \ { \ @@ -1137,7 +1136,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - return fn_dpref##fn_name##_ptr argcall; \ + return fn_dpref##fn_name##_ptr##argcall; \ } CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_serv_, set_num_threads, (int nth), (nth)); From ac57a5110525a9eeaaac450fee336ebeec0f4001 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 05:12:27 -0700 Subject: [PATCH 018/120] minor fix --- cpp/daal/src/services/service_defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/services/service_defines.h b/cpp/daal/src/services/service_defines.h index c6e0f8f3424..667bd6913e5 100644 --- a/cpp/daal/src/services/service_defines.h +++ b/cpp/daal/src/services/service_defines.h @@ -71,7 +71,7 @@ DAAL_EXPORT bool daal_check_is_intel_cpu(); #define PRAGMA_ICC_TO_STR(ARGS) #define PRAGMA_ICC_OMP(ARGS) #define PRAGMA_ICC_NO16(ARGS) - #define DAAL_TYPENAME typename + #define DAAL_TYPENAME #else #define PRAGMA_IVDEP #define PRAGMA_NOVECTOR From 6cf23709becc144afc69373a4ed4fe285c4d41f0 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 06:01:51 -0700 Subject: [PATCH 019/120] minor fix --- .../src/externals/core_threading_win_dll.cpp | 154 +++++++----------- 1 file changed, 63 insertions(+), 91 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 8070fb10f3a..19971536b57 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -77,7 +77,7 @@ static void load_daal_thr_dll(void) } } -FARPROC load_daal_thr_func(const char * ordinal) +FARPROC load_daal_thr_func(char * ordinal) { FARPROC FuncAddress; @@ -233,7 +233,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func("_threaded_scalable_malloc"); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); } return _threaded_malloc_ptr(size, alignment); } @@ -243,7 +243,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func("_threaded_scalable_free"); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); } _threaded_free_ptr(ptr); } @@ -253,7 +253,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for"); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -263,7 +263,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func("_daal_threader_for_simple"); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -273,7 +273,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func("_daal_threader_for_int32ptr"); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -283,7 +283,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func("_daal_threader_for_int64"); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); } _daal_threader_for_int64_ptr(n, a, func); } @@ -293,7 +293,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func("_daal_static_threader_for"); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); } _daal_static_threader_for_ptr(n, a, func); } @@ -303,7 +303,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func("_daal_parallel_sort_int32"); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -313,7 +313,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func("_daal_parallel_sort_uint64"); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -324,7 +324,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_int32_uint64"); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -334,7 +334,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp32_uint64"); + _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -344,7 +344,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp64_uint64"); + _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -354,7 +354,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func("_daal_threader_for_blocked"); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -364,7 +364,7 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func("_daal_threader_for_blocked_size"); + _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -374,7 +374,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for_optional"); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -385,7 +385,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func("_daal_parallel_reduce_int32_int64"); + _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -397,7 +397,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32_int64_simple"); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -410,7 +410,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32ptr_int64_simple"); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -420,7 +420,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func("_daal_threader_for_break"); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -430,7 +430,7 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func("_daal_threader_get_max_threads"); + _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); } return _daal_threader_get_max_threads_ptr(); } @@ -441,7 +441,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func("_daal_threader_get_current_thread_index"); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); } return _daal_threader_get_current_thread_index_ptr(); } @@ -451,7 +451,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func("_daal_get_tls_ptr"); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); } return _daal_get_tls_ptr_ptr(a, func); } @@ -461,7 +461,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func("_daal_del_tls_ptr"); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -471,7 +471,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func("_daal_get_tls_local"); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -481,7 +481,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func("_daal_reduce_tls"); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -491,7 +491,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func("_daal_parallel_reduce_tls"); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -501,7 +501,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func("_daal_get_ls_ptr"); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); } return _daal_get_ls_ptr_ptr(a, func); } @@ -511,7 +511,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func("_daal_del_ls_ptr"); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -521,7 +521,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func("_daal_get_ls_local"); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); } return _daal_get_ls_local_ptr(lsPtr); } @@ -531,7 +531,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func("_daal_release_ls_local"); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -541,7 +541,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func("_daal_reduce_ls"); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -551,7 +551,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func("_daal_new_mutex"); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); } return _daal_new_mutex_ptr(); } @@ -561,7 +561,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func("_daal_lock_mutex"); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); } _daal_lock_mutex_ptr(mutexPtr); } @@ -571,7 +571,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func("_daal_unlock_mutex"); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -581,7 +581,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func("_daal_del_mutex"); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); } _daal_del_mutex_ptr(mutexPtr); } @@ -591,7 +591,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func("_daal_new_task_group"); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); } return _daal_new_task_group_ptr(); } @@ -601,7 +601,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func("_daal_del_task_group"); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -611,7 +611,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func("_daal_run_task_group"); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -621,7 +621,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func("_daal_wait_task_group"); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -631,7 +631,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func("_daal_is_in_parallel"); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); } return _daal_is_in_parallel_ptr(); } @@ -652,7 +652,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func("_daal_tbb_task_scheduler_free"); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -662,7 +662,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func("_setNumberOfThreads"); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -672,7 +672,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func("_daal_threader_env"); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); } return _daal_threader_env_ptr(); } @@ -683,7 +683,7 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func("_thread_pinner_thread_pinner_init"); + _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); } _thread_pinner_thread_pinner_init_ptr(); } @@ -693,7 +693,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func("_thread_pinner_read_topology"); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); } _thread_pinner_read_topology_ptr(); } @@ -703,7 +703,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func("_thread_pinner_on_scheduler_entry"); + _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -713,7 +713,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func("_thread_pinner_on_scheduler_exit"); + _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -723,7 +723,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func("_thread_pinner_execute"); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); } _thread_pinner_execute_ptr(task); } @@ -733,7 +733,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func("_thread_pinner_get_status"); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); } return _thread_pinner_get_status_ptr(); } @@ -743,7 +743,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func("_thread_pinner_get_pinning"); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); } return _thread_pinner_get_pinning_ptr(); } @@ -753,7 +753,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func("_thread_pinner_set_pinning"); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); } return _thread_pinner_set_pinning_ptr(p); } @@ -763,14 +763,14 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func("_getThreadPinner"); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -783,28 +783,15 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); \ if (##fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ } \ ##fn_dpref##fn_name##_ptr##argcall; \ } -#if defined(_WIN64) - #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ - } -#else - #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) -#endif + #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -817,26 +804,11 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); \ if (##fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ } \ return fn_dpref##fn_name##_ptr##argcall; \ } -#if defined(_WIN64) - #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ - } -#else - #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) -#endif - /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ CALL_VOID_FUNC_FROM_DLL(fpk_blas_, dsyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const double * alpha, const double * a, @@ -1114,7 +1086,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_64f_I, (Ipp64f * CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * pSrcDst, Ipp32f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); #define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*##fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT void fn_dpref##fn_name##argdecl \ { \ @@ -1123,11 +1095,11 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr##argcall; \ + ##fn_dpref##fn_name##_ptr argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*##fn_dpref##fn_name##_t)argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name##argdecl \ { \ @@ -1136,7 +1108,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - return fn_dpref##fn_name##_ptr##argcall; \ + return fn_dpref##fn_name##_ptr argcall; \ } CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_serv_, set_num_threads, (int nth), (nth)); @@ -1159,4 +1131,4 @@ CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_for_ordered, (DAAL_INT n, CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_sections, (DAAL_INT threads_request, void * a, func_type func), (threads_request, a, func)); CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_ordered, (DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func), (i, th_idx, th_num, a, func)); -CALL_RET_FUNC_FROM_DLL_ALONE(DAAL_INT, fpk_vsl_serv_, threader_get_num_threads_limit, (void), ()); +CALL_RET_FUNC_FROM_DLL_ALONE(DAAL_INT, fpk_vsl_serv_, threader_get_num_threads_limit, (void), ()); \ No newline at end of file From a5c57757fb14ee23c63afb4a0f75cde449f10787 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 06:06:20 -0700 Subject: [PATCH 020/120] minor fix --- cpp/daal/src/externals/core_threading_win_dll.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 19971536b57..7e8b910aa53 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -791,7 +791,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*fn_dpref##fn_name##_t)argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -1086,7 +1086,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_64f_I, (Ipp64f * CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * pSrcDst, Ipp32f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); #define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)argdecl; \ + typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT void fn_dpref##fn_name##argdecl \ { \ @@ -1095,11 +1095,11 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr argcall; \ + ##fn_dpref##fn_name##_pt##argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)argdecl; \ + typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name##argdecl \ { \ @@ -1131,4 +1131,4 @@ CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_for_ordered, (DAAL_INT n, CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_sections, (DAAL_INT threads_request, void * a, func_type func), (threads_request, a, func)); CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_ordered, (DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func), (i, th_idx, th_num, a, func)); -CALL_RET_FUNC_FROM_DLL_ALONE(DAAL_INT, fpk_vsl_serv_, threader_get_num_threads_limit, (void), ()); \ No newline at end of file +CALL_RET_FUNC_FROM_DLL_ALONE(DAAL_INT, fpk_vsl_serv_, threader_get_num_threads_limit, (void), ()); From d269d3e9d6adeaabb2f6f3b0969b0c02f0354434 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 11 Apr 2024 06:12:18 -0700 Subject: [PATCH 021/120] minor fix --- cpp/daal/src/externals/core_threading_win_dll.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 7e8b910aa53..dc5dc9bfe6b 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -770,7 +770,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -788,10 +788,8 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, ##fn_dpref##fn_name##_ptr##argcall; \ } - - #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ @@ -1108,7 +1106,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - return fn_dpref##fn_name##_ptr argcall; \ + return fn_dpref##fn_name##_ptr##argcall; \ } CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_serv_, set_num_threads, (int nth), (nth)); From bb6485979978023b074e329c77dcef6bdf52609c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 12 Apr 2024 00:11:19 -0700 Subject: [PATCH 022/120] fixes for icpx --- dev/make/compiler_definitions/dpcpp.mk | 5 +- dev/make/compiler_definitions/icc.mkl.32e.mk | 106 +++++++++---------- dev/make/deps.mk | 2 + dev/make/function_definitions/32e.mk | 4 +- makefile | 12 ++- 5 files changed, 67 insertions(+), 62 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index fc6f0f4c3af..c8f1affbe67 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -30,8 +30,9 @@ CORE.SERV.COMPILER.dpcpp = generic COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel -COMPILER.win.dpcpp = icpx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ - -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel +COMPILER.win.dpcpp = icpx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -WX \ + -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ + -Werror -Wreturn-type-Wno-deprecated-declarations -fsycl-device-code-split=per_kernel -E -dM link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel link.dynamic.win.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel diff --git a/dev/make/compiler_definitions/icc.mkl.32e.mk b/dev/make/compiler_definitions/icc.mkl.32e.mk index e4e500a334b..a6ff2410ecc 100644 --- a/dev/make/compiler_definitions/icc.mkl.32e.mk +++ b/dev/make/compiler_definitions/icc.mkl.32e.mk @@ -1,53 +1,53 @@ -# #=============================================================================== -# # Copyright 2012 Intel Corporation -# # -# # Licensed under the Apache License, Version 2.0 (the "License"); -# # you may not use this file except in compliance with the License. -# # You may obtain a copy of the License at -# # -# # http://www.apache.org/licenses/LICENSE-2.0 -# # -# # Unless required by applicable law or agreed to in writing, software -# # distributed under the License is distributed on an "AS IS" BASIS, -# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# # See the License for the specific language governing permissions and -# # limitations under the License. -# #=============================================================================== - -# #++ -# # Intel compiler definitions for makefile -# #-- - -# PLATs.icc = lnx32e win32e mac32e - -# CMPLRDIRSUFF.icc = - -# CORE.SERV.COMPILER.icc = generic -# -DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) - -# -Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE -# -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) - -# COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ -# -Werror -Wreturn-type -diag-disable=10441 -# COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) -# COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 -# COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ -# -Werror -Wreturn-type -diag-disable=10441 - -# link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 -# link.dynamic.mac.icc = icc -diag-disable=10441 - -# pedantic.opts.lnx.icc = -pedantic \ -# -Wall \ -# -Wextra \ -# -Wno-unused-parameter - -# daaldep.lnx32e.rt.icc = -static-intel -# daaldep.lnx32.rt.icc = -static-intel - -# p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) -# mc3_OPT.icc = $(-Q)xSSE4.2 -# avx2_OPT.icc = $(-Q)xCORE-AVX2 -# skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high -# #TODO add march opts in GCC style +#=============================================================================== +# Copyright 2012 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#=============================================================================== + +#++ +# Intel compiler definitions for makefile +#-- + +PLATs.icc = lnx32e win32e mac32e + +CMPLRDIRSUFF.icc = + +CORE.SERV.COMPILER.icc = generic +-DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) + +-Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE +-Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) + +COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ + -Werror -Wreturn-type -diag-disable=10441 +COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) +COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 +COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ + -Werror -Wreturn-type -diag-disable=10441 + +link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 +link.dynamic.mac.icc = icc -diag-disable=10441 + +pedantic.opts.lnx.icc = -pedantic \ + -Wall \ + -Wextra \ + -Wno-unused-parameter + +daaldep.lnx32e.rt.icc = -static-intel +daaldep.lnx32.rt.icc = -static-intel + +p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) +mc3_OPT.icc = $(-Q)xSSE4.2 +avx2_OPT.icc = $(-Q)xCORE-AVX2 +skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high +#TODO add march opts in GCC style diff --git a/dev/make/deps.mk b/dev/make/deps.mk index 6f95fba1370..07c5d37971c 100644 --- a/dev/make/deps.mk +++ b/dev/make/deps.mk @@ -77,6 +77,8 @@ $1 = $$(if $$(or $$(.sources-changed),$$(and $$(.mkfiles-changed),$$(call .trigg # Enhance build commands with support for dependency generation # (does not depend on macro from which particular command if called, only on command executable name) dep-gen-enhanced-common = $(call $(SELF),$1 $(.copt-gen-deps)) && $(.keep-raw-deps) sed -n $(sed.-i) $(sed.fix-deps) $(sed.rm-abs-paths) -e '/./{ p; $(sed.mk-phony-targets)}' $(.dep-file-tmp) +dep-gen-enhanced.icc = $(dep-gen-enhanced-common) +dep-gen-enhanced.icl = $(dep-gen-enhanced-common) dep-gen-enhanced.icx = $(dep-gen-enhanced-common) dep-gen-enhanced.g++ = $(dep-gen-enhanced-common) dep-gen-enhanced.dpcpp = $(if $(OS_is_win),,$(dep-gen-enhanced-common)) diff --git a/dev/make/function_definitions/32e.mk b/dev/make/function_definitions/32e.mk index 720e9711c6b..41dfbb96fe9 100644 --- a/dev/make/function_definitions/32e.mk +++ b/dev/make/function_definitions/32e.mk @@ -19,8 +19,8 @@ ifeq ($(filter mkl ref,$(BACKEND_CONFIG)),) Supported config for '$(PLAT)' are ['mkl', 'ref']) endif -COMPILERs = icx gnu clang vc -COMPILER ?= icx +COMPILERs = icc icx gnu clang vc +COMPILER ?= icc CPUs := sse2 sse42 avx2 avx512 CPUs.files := nrh neh hsw skx diff --git a/makefile b/makefile index f5d9eddc091..2c556f37318 100644 --- a/makefile +++ b/makefile @@ -116,13 +116,15 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) +-cxx11 := $(if $(COMPILER_is_vc),,$(-Q)std=c++11) +# Due to by default we plan to use icpx for oneapi part this flag has been changed +-cxx17 := $(if $(COMPILER_is_vc),/std:c++17,-std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) -DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE -DEBJ := $(if $(REQDBG),-g,-g:none) -DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) --EHsc := $(if $(OS_is_win),-EHsc,) +-EHsc := $(if $(COMPILER_is_vc),-EHsc,) -isystem := $(if $(OS_is_win),-I,-isystem) -sGRP = $(if $(OS_is_lnx),-Wl$(comma)--start-group,) -eGRP = $(if $(OS_is_lnx),-Wl$(comma)--end-group,) @@ -480,7 +482,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) $(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) @@ -490,7 +492,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -837,7 +839,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From 70949a4247d121bf5ea5321b18130d9d01dcd699 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 12 Apr 2024 00:36:57 -0700 Subject: [PATCH 023/120] minor fix --- .../src/externals/core_threading_win_dll.cpp | 150 +++++++++--------- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- makefile | 2 +- 3 files changed, 81 insertions(+), 73 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index dc5dc9bfe6b..806fd65510e 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -233,7 +233,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); } return _threaded_malloc_ptr(size, alignment); } @@ -243,7 +243,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); } _threaded_free_ptr(ptr); } @@ -253,7 +253,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -263,7 +263,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -273,7 +273,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -283,7 +283,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); } _daal_threader_for_int64_ptr(n, a, func); } @@ -293,7 +293,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); } _daal_static_threader_for_ptr(n, a, func); } @@ -303,7 +303,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -313,7 +313,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -324,7 +324,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -334,7 +334,8 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); + _daal_parallel_sort_pair_fp32_uint64_ptr = + (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -344,7 +345,8 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); + _daal_parallel_sort_pair_fp64_uint64_ptr = + (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -354,7 +356,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -364,7 +366,8 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); + _daal_threader_for_blocked_size_ptr = + (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -374,7 +377,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -385,7 +388,8 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); + _daal_parallel_reduce_int32_int64_ptr = + (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -397,7 +401,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -410,7 +414,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -420,7 +424,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -430,7 +434,8 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); + _daal_threader_get_max_threads_ptr = + (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); } return _daal_threader_get_max_threads_ptr(); } @@ -441,7 +446,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); } return _daal_threader_get_current_thread_index_ptr(); } @@ -451,7 +456,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); } return _daal_get_tls_ptr_ptr(a, func); } @@ -461,7 +466,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -471,7 +476,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -481,7 +486,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -491,7 +496,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -501,7 +506,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); } return _daal_get_ls_ptr_ptr(a, func); } @@ -511,7 +516,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -521,7 +526,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); } return _daal_get_ls_local_ptr(lsPtr); } @@ -531,7 +536,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -541,7 +546,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -551,7 +556,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); } return _daal_new_mutex_ptr(); } @@ -561,7 +566,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); } _daal_lock_mutex_ptr(mutexPtr); } @@ -571,7 +576,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -581,7 +586,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); } _daal_del_mutex_ptr(mutexPtr); } @@ -591,7 +596,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); } return _daal_new_task_group_ptr(); } @@ -601,7 +606,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -611,7 +616,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -621,7 +626,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -631,7 +636,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); } return _daal_is_in_parallel_ptr(); } @@ -652,7 +657,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -662,7 +667,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -672,7 +677,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); } return _daal_threader_env_ptr(); } @@ -683,7 +688,8 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); + _thread_pinner_thread_pinner_init_ptr = + (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); } _thread_pinner_thread_pinner_init_ptr(); } @@ -693,7 +699,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); } _thread_pinner_read_topology_ptr(); } @@ -703,7 +709,8 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); + _thread_pinner_on_scheduler_entry_ptr = + (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -713,7 +720,8 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); + _thread_pinner_on_scheduler_exit_ptr = + (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -723,7 +731,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); } _thread_pinner_execute_ptr(task); } @@ -733,7 +741,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); } return _thread_pinner_get_status_ptr(); } @@ -743,7 +751,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); } return _thread_pinner_get_pinning_ptr(); } @@ -753,7 +761,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); } return _thread_pinner_set_pinning_ptr(p); } @@ -763,7 +771,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } @@ -777,15 +785,15 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + } \ + ##fn_dpref##fn_name##_ptr##argcall; \ } #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ @@ -796,15 +804,15 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + } \ + return fn_dpref##fn_name##_ptr##argcall; \ } /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ @@ -1093,7 +1101,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_pt##argcall; \ + ##fn_dpref##fn_name##_pt##argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 25e4a60cbb6..2186dfea94e 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -27,7 +27,7 @@ CORE.SERV.COMPILER.icx = generic -Zl.icx = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib=libirc -DEBC.icx = -g --Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) +-Qopt = $(if $(OS_is_win),-qopt-,-qopt-) COMPILER.lnx.icx = icx -m64 \ -Werror -Wreturn-type diff --git a/makefile b/makefile index 2c556f37318..4857cae970e 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),,$(-Q)std=c++11) +-cxx11 := $(if $(COMPILER_is_vc),,-std=c++11) # Due to by default we plan to use icpx for oneapi part this flag has been changed -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,-std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) From ee49893409dccf26f02b81fbb954831bd9fecb62 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 12 Apr 2024 00:38:47 -0700 Subject: [PATCH 024/120] minor fix --- .../src/externals/core_threading_win_dll.cpp | 180 ++++++++++-------- 1 file changed, 101 insertions(+), 79 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 806fd65510e..bfd7ac01a32 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -233,7 +233,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func("_threaded_scalable_malloc"); } return _threaded_malloc_ptr(size, alignment); } @@ -243,7 +243,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func("_threaded_scalable_free"); } _threaded_free_ptr(ptr); } @@ -253,7 +253,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for"); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -263,7 +263,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func("_daal_threader_for_simple"); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -273,7 +273,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func("_daal_threader_for_int32ptr"); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -283,7 +283,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func("_daal_threader_for_int64"); } _daal_threader_for_int64_ptr(n, a, func); } @@ -293,7 +293,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func("_daal_static_threader_for"); } _daal_static_threader_for_ptr(n, a, func); } @@ -303,7 +303,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func("_daal_parallel_sort_int32"); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -313,7 +313,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func("_daal_parallel_sort_uint64"); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -324,7 +324,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_int32_uint64"); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -334,8 +334,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = - (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); + _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp32_uint64"); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -345,8 +344,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = - (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); + _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp64_uint64"); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -356,7 +354,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func("_daal_threader_for_blocked"); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -366,8 +364,7 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = - (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); + _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func("_daal_threader_for_blocked_size"); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -377,7 +374,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for_optional"); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -388,8 +385,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = - (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); + _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func("_daal_parallel_reduce_int32_int64"); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -401,7 +397,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32_int64_simple"); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -414,7 +410,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32ptr_int64_simple"); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -424,7 +420,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func("_daal_threader_for_break"); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -434,8 +430,7 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = - (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); + _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func("_daal_threader_get_max_threads"); } return _daal_threader_get_max_threads_ptr(); } @@ -446,7 +441,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func("_daal_threader_get_current_thread_index"); } return _daal_threader_get_current_thread_index_ptr(); } @@ -456,7 +451,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func("_daal_get_tls_ptr"); } return _daal_get_tls_ptr_ptr(a, func); } @@ -466,7 +461,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func("_daal_del_tls_ptr"); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -476,7 +471,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func("_daal_get_tls_local"); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -486,7 +481,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func("_daal_reduce_tls"); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -496,7 +491,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func("_daal_parallel_reduce_tls"); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -506,7 +501,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func("_daal_get_ls_ptr"); } return _daal_get_ls_ptr_ptr(a, func); } @@ -516,7 +511,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func("_daal_del_ls_ptr"); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -526,7 +521,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func("_daal_get_ls_local"); } return _daal_get_ls_local_ptr(lsPtr); } @@ -536,7 +531,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func("_daal_release_ls_local"); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -546,7 +541,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func("_daal_reduce_ls"); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -556,7 +551,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func("_daal_new_mutex"); } return _daal_new_mutex_ptr(); } @@ -566,7 +561,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func("_daal_lock_mutex"); } _daal_lock_mutex_ptr(mutexPtr); } @@ -576,7 +571,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func("_daal_unlock_mutex"); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -586,7 +581,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func("_daal_del_mutex"); } _daal_del_mutex_ptr(mutexPtr); } @@ -596,7 +591,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func("_daal_new_task_group"); } return _daal_new_task_group_ptr(); } @@ -606,7 +601,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func("_daal_del_task_group"); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -616,7 +611,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func("_daal_run_task_group"); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -626,7 +621,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func("_daal_wait_task_group"); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -636,7 +631,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func("_daal_is_in_parallel"); } return _daal_is_in_parallel_ptr(); } @@ -657,7 +652,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func("_daal_tbb_task_scheduler_free"); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -667,7 +662,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func("_setNumberOfThreads"); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -677,7 +672,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func("_daal_threader_env"); } return _daal_threader_env_ptr(); } @@ -688,8 +683,7 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = - (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); + _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func("_thread_pinner_thread_pinner_init"); } _thread_pinner_thread_pinner_init_ptr(); } @@ -699,7 +693,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func("_thread_pinner_read_topology"); } _thread_pinner_read_topology_ptr(); } @@ -709,8 +703,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = - (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); + _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func("_thread_pinner_on_scheduler_entry"); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -720,8 +713,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = - (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); + _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func("_thread_pinner_on_scheduler_exit"); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -731,7 +723,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func("_thread_pinner_execute"); } _thread_pinner_execute_ptr(task); } @@ -741,7 +733,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func("_thread_pinner_get_status"); } return _thread_pinner_get_status_ptr(); } @@ -751,7 +743,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func("_thread_pinner_get_pinning"); } return _thread_pinner_get_pinning_ptr(); } @@ -761,7 +753,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func("_thread_pinner_set_pinning"); } return _thread_pinner_set_pinning_ptr(p); } @@ -771,7 +763,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func("_getThreadPinner"); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } @@ -785,17 +777,32 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + ##fn_dpref##fn_name##_ptr##argcall; \ } +#if defined(_WIN64) + #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + ##fn_dpref##fn_name##_ptr##argcall; \ + } +#else + #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) +#endif + #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ @@ -804,17 +811,32 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + return fn_dpref##fn_name##_ptr##argcall; \ } +#if defined(_WIN64) + #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + return fn_dpref##fn_name##_ptr##argcall; \ + } +#else + #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) +#endif + /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ CALL_VOID_FUNC_FROM_DLL(fpk_blas_, dsyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const double * alpha, const double * a, @@ -1101,7 +1123,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_pt##argcall; \ + ##fn_dpref##fn_name##_ptr##argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ From 97dc1662e4483f0303859a1a1ad3d956c7355367 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 12 Apr 2024 00:57:11 -0700 Subject: [PATCH 025/120] minor fix --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 4857cae970e..2c556f37318 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),,-std=c++11) +-cxx11 := $(if $(COMPILER_is_vc),,$(-Q)std=c++11) # Due to by default we plan to use icpx for oneapi part this flag has been changed -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,-std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) From 532de88f43f95a9ee8c80c84ec5ac9ca34323c01 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 12 Apr 2024 01:19:40 -0700 Subject: [PATCH 026/120] minor --- .../src/externals/core_threading_win_dll.cpp | 189 ++++++++---------- dev/make/compiler_definitions/icc.mkl.32e.mk | 106 +++++----- dev/make/deps.mk | 2 - dev/make/function_definitions/32e.mk | 4 +- makefile | 8 +- 5 files changed, 142 insertions(+), 167 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index bfd7ac01a32..e97b94b832c 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -29,19 +29,20 @@ static HMODULE daal_thr_dll_handle = NULL; daal::services::Environment::LibraryThreadingType __daal_serv_get_thr_set(); -#define __GLUE__(a, b) a##b +#define CONCATENATE_IMPL(x, y) x##y +#define CONCATENATE(x, y) CONCATENATE_IMPL(x, y) #ifdef _DEBUG - #define _DLL_SUFFIX(name) __GLUE__(name, "d.2.dll") + #define _DLL_SUFFIX(name) CONCATENATE(name, "d.2.dll") #else - #define _DLL_SUFFIX(name) __GLUE__(name, ".2.dll") + #define _DLL_SUFFIX(name) CONCATENATE(name, ".2.dll") #endif #define DAAL_LOAD_DLL(name) _daal_load_win_dynamic_lib(name) DAAL_EXPORT HMODULE load_onedal_thread_dll() { - return DAAL_LOAD_DLL(_DLL_SUFFIX("onedal_thread")); + return DAAL_LOAD_DLL(_DLL_SUFFIX(onedal_thread)); } static void load_daal_thr_dll(void) @@ -233,7 +234,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func("_threaded_scalable_malloc"); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); } return _threaded_malloc_ptr(size, alignment); } @@ -243,7 +244,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func("_threaded_scalable_free"); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); } _threaded_free_ptr(ptr); } @@ -253,7 +254,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for"); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -263,7 +264,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func("_daal_threader_for_simple"); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -273,7 +274,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func("_daal_threader_for_int32ptr"); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -283,7 +284,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func("_daal_threader_for_int64"); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); } _daal_threader_for_int64_ptr(n, a, func); } @@ -293,7 +294,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func("_daal_static_threader_for"); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); } _daal_static_threader_for_ptr(n, a, func); } @@ -303,7 +304,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func("_daal_parallel_sort_int32"); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -313,7 +314,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func("_daal_parallel_sort_uint64"); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -324,7 +325,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_int32_uint64"); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -334,7 +335,8 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp32_uint64"); + _daal_parallel_sort_pair_fp32_uint64_ptr = + (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -344,7 +346,8 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp64_uint64"); + _daal_parallel_sort_pair_fp64_uint64_ptr = + (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -354,7 +357,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func("_daal_threader_for_blocked"); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -364,7 +367,8 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func("_daal_threader_for_blocked_size"); + _daal_threader_for_blocked_size_ptr = + (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -374,7 +378,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for_optional"); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -385,7 +389,8 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func("_daal_parallel_reduce_int32_int64"); + _daal_parallel_reduce_int32_int64_ptr = + (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -397,7 +402,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32_int64_simple"); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -410,7 +415,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32ptr_int64_simple"); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -420,7 +425,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func("_daal_threader_for_break"); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -430,7 +435,8 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func("_daal_threader_get_max_threads"); + _daal_threader_get_max_threads_ptr = + (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); } return _daal_threader_get_max_threads_ptr(); } @@ -441,7 +447,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func("_daal_threader_get_current_thread_index"); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); } return _daal_threader_get_current_thread_index_ptr(); } @@ -451,7 +457,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func("_daal_get_tls_ptr"); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); } return _daal_get_tls_ptr_ptr(a, func); } @@ -461,7 +467,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func("_daal_del_tls_ptr"); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -471,7 +477,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func("_daal_get_tls_local"); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -481,7 +487,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func("_daal_reduce_tls"); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -491,7 +497,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func("_daal_parallel_reduce_tls"); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -501,7 +507,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func("_daal_get_ls_ptr"); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); } return _daal_get_ls_ptr_ptr(a, func); } @@ -511,7 +517,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func("_daal_del_ls_ptr"); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -521,7 +527,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func("_daal_get_ls_local"); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); } return _daal_get_ls_local_ptr(lsPtr); } @@ -531,7 +537,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func("_daal_release_ls_local"); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -541,7 +547,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func("_daal_reduce_ls"); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -551,7 +557,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func("_daal_new_mutex"); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); } return _daal_new_mutex_ptr(); } @@ -561,7 +567,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func("_daal_lock_mutex"); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); } _daal_lock_mutex_ptr(mutexPtr); } @@ -571,7 +577,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func("_daal_unlock_mutex"); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -581,7 +587,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func("_daal_del_mutex"); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); } _daal_del_mutex_ptr(mutexPtr); } @@ -591,7 +597,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func("_daal_new_task_group"); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); } return _daal_new_task_group_ptr(); } @@ -601,7 +607,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func("_daal_del_task_group"); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -611,7 +617,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func("_daal_run_task_group"); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -621,7 +627,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func("_daal_wait_task_group"); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -631,7 +637,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func("_daal_is_in_parallel"); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); } return _daal_is_in_parallel_ptr(); } @@ -652,7 +658,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func("_daal_tbb_task_scheduler_free"); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -662,7 +668,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func("_setNumberOfThreads"); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -672,7 +678,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func("_daal_threader_env"); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); } return _daal_threader_env_ptr(); } @@ -683,7 +689,8 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func("_thread_pinner_thread_pinner_init"); + _thread_pinner_thread_pinner_init_ptr = + (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); } _thread_pinner_thread_pinner_init_ptr(); } @@ -693,7 +700,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func("_thread_pinner_read_topology"); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); } _thread_pinner_read_topology_ptr(); } @@ -703,7 +710,8 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func("_thread_pinner_on_scheduler_entry"); + _thread_pinner_on_scheduler_entry_ptr = + (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -713,7 +721,8 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func("_thread_pinner_on_scheduler_exit"); + _thread_pinner_on_scheduler_exit_ptr = + (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -723,7 +732,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func("_thread_pinner_execute"); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); } _thread_pinner_execute_ptr(task); } @@ -733,7 +742,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func("_thread_pinner_get_status"); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); } return _thread_pinner_get_status_ptr(); } @@ -743,7 +752,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func("_thread_pinner_get_pinning"); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); } return _thread_pinner_get_pinning_ptr(); } @@ -753,7 +762,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func("_thread_pinner_set_pinning"); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); } return _thread_pinner_set_pinning_ptr(p); } @@ -763,7 +772,7 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func("_getThreadPinner"); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } @@ -777,32 +786,17 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + } \ + ##fn_dpref##fn_name##_ptr##argcall; \ } -#if defined(_WIN64) - #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ - } -#else - #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) -#endif - #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ @@ -811,32 +805,17 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (##fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ + } \ + return fn_dpref##fn_name##_ptr##argcall; \ } -#if defined(_WIN64) - #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ - } -#else - #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) -#endif - /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ CALL_VOID_FUNC_FROM_DLL(fpk_blas_, dsyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const double * alpha, const double * a, @@ -1123,7 +1102,7 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * { \ ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_ptr##argcall; \ + ##fn_dpref##fn_name##_pt##argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ diff --git a/dev/make/compiler_definitions/icc.mkl.32e.mk b/dev/make/compiler_definitions/icc.mkl.32e.mk index a6ff2410ecc..e4e500a334b 100644 --- a/dev/make/compiler_definitions/icc.mkl.32e.mk +++ b/dev/make/compiler_definitions/icc.mkl.32e.mk @@ -1,53 +1,53 @@ -#=============================================================================== -# Copyright 2012 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#=============================================================================== - -#++ -# Intel compiler definitions for makefile -#-- - -PLATs.icc = lnx32e win32e mac32e - -CMPLRDIRSUFF.icc = - -CORE.SERV.COMPILER.icc = generic --DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) - --Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE --Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) - -COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ - -Werror -Wreturn-type -diag-disable=10441 -COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) -COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 -COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ - -Werror -Wreturn-type -diag-disable=10441 - -link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 -link.dynamic.mac.icc = icc -diag-disable=10441 - -pedantic.opts.lnx.icc = -pedantic \ - -Wall \ - -Wextra \ - -Wno-unused-parameter - -daaldep.lnx32e.rt.icc = -static-intel -daaldep.lnx32.rt.icc = -static-intel - -p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) -mc3_OPT.icc = $(-Q)xSSE4.2 -avx2_OPT.icc = $(-Q)xCORE-AVX2 -skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high -#TODO add march opts in GCC style +# #=============================================================================== +# # Copyright 2012 Intel Corporation +# # +# # Licensed under the Apache License, Version 2.0 (the "License"); +# # you may not use this file except in compliance with the License. +# # You may obtain a copy of the License at +# # +# # http://www.apache.org/licenses/LICENSE-2.0 +# # +# # Unless required by applicable law or agreed to in writing, software +# # distributed under the License is distributed on an "AS IS" BASIS, +# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# # See the License for the specific language governing permissions and +# # limitations under the License. +# #=============================================================================== + +# #++ +# # Intel compiler definitions for makefile +# #-- + +# PLATs.icc = lnx32e win32e mac32e + +# CMPLRDIRSUFF.icc = + +# CORE.SERV.COMPILER.icc = generic +# -DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) + +# -Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE +# -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) + +# COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ +# -Werror -Wreturn-type -diag-disable=10441 +# COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) +# COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 +# COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ +# -Werror -Wreturn-type -diag-disable=10441 + +# link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 +# link.dynamic.mac.icc = icc -diag-disable=10441 + +# pedantic.opts.lnx.icc = -pedantic \ +# -Wall \ +# -Wextra \ +# -Wno-unused-parameter + +# daaldep.lnx32e.rt.icc = -static-intel +# daaldep.lnx32.rt.icc = -static-intel + +# p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) +# mc3_OPT.icc = $(-Q)xSSE4.2 +# avx2_OPT.icc = $(-Q)xCORE-AVX2 +# skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high +# #TODO add march opts in GCC style diff --git a/dev/make/deps.mk b/dev/make/deps.mk index 07c5d37971c..6f95fba1370 100644 --- a/dev/make/deps.mk +++ b/dev/make/deps.mk @@ -77,8 +77,6 @@ $1 = $$(if $$(or $$(.sources-changed),$$(and $$(.mkfiles-changed),$$(call .trigg # Enhance build commands with support for dependency generation # (does not depend on macro from which particular command if called, only on command executable name) dep-gen-enhanced-common = $(call $(SELF),$1 $(.copt-gen-deps)) && $(.keep-raw-deps) sed -n $(sed.-i) $(sed.fix-deps) $(sed.rm-abs-paths) -e '/./{ p; $(sed.mk-phony-targets)}' $(.dep-file-tmp) -dep-gen-enhanced.icc = $(dep-gen-enhanced-common) -dep-gen-enhanced.icl = $(dep-gen-enhanced-common) dep-gen-enhanced.icx = $(dep-gen-enhanced-common) dep-gen-enhanced.g++ = $(dep-gen-enhanced-common) dep-gen-enhanced.dpcpp = $(if $(OS_is_win),,$(dep-gen-enhanced-common)) diff --git a/dev/make/function_definitions/32e.mk b/dev/make/function_definitions/32e.mk index 41dfbb96fe9..720e9711c6b 100644 --- a/dev/make/function_definitions/32e.mk +++ b/dev/make/function_definitions/32e.mk @@ -19,8 +19,8 @@ ifeq ($(filter mkl ref,$(BACKEND_CONFIG)),) Supported config for '$(PLAT)' are ['mkl', 'ref']) endif -COMPILERs = icc icx gnu clang vc -COMPILER ?= icc +COMPILERs = icx gnu clang vc +COMPILER ?= icx CPUs := sse2 sse42 avx2 avx512 CPUs.files := nrh neh hsw skx diff --git a/makefile b/makefile index 2c556f37318..f6d7c12153a 100644 --- a/makefile +++ b/makefile @@ -116,8 +116,6 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(COMPILER_is_vc),,$(-Q)std=c++11) -# Due to by default we plan to use icpx for oneapi part this flag has been changed -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,-std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) @@ -482,7 +480,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) @@ -492,7 +490,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -839,7 +837,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From 971d5ae9e4b7b5fd14acf2db5eab83ffc1e054a9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 06:57:32 -0700 Subject: [PATCH 027/120] minor fix --- .../src/data_management/data_collection.cpp | 4 +- .../src/externals/core_threading_win_dll.cpp | 209 ++++++++++-------- makefile | 2 +- 3 files changed, 119 insertions(+), 96 deletions(-) diff --git a/cpp/daal/src/data_management/data_collection.cpp b/cpp/daal/src/data_management/data_collection.cpp index d41e1eded54..46032725c94 100644 --- a/cpp/daal/src/data_management/data_collection.cpp +++ b/cpp/daal/src/data_management/data_collection.cpp @@ -25,7 +25,7 @@ namespace data_management namespace interface1 { template -DAAL_EXPORT services::SharedPtr & KeyValueCollection::operator[](size_t k) +services::SharedPtr & KeyValueCollection::operator[](size_t k) { size_t i; for (i = 0; i < _keys.size(); i++) @@ -40,7 +40,7 @@ DAAL_EXPORT services::SharedPtr & KeyValueCollection::operator[](size_t k) return _values[i]; } -#define DAAL_INSTANTIATE_KEYVALUECOLLECTION(T) template DAAL_EXPORT services::SharedPtr & KeyValueCollection::operator[](size_t k); +#define DAAL_INSTANTIATE_KEYVALUECOLLECTION(T) template services::SharedPtr & KeyValueCollection::operator[](size_t k); DAAL_INSTANTIATE_KEYVALUECOLLECTION(SerializationIface) DAAL_INSTANTIATE_KEYVALUECOLLECTION(algorithms::Input) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index e97b94b832c..801921c2df8 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -29,20 +29,19 @@ static HMODULE daal_thr_dll_handle = NULL; daal::services::Environment::LibraryThreadingType __daal_serv_get_thr_set(); -#define CONCATENATE_IMPL(x, y) x##y -#define CONCATENATE(x, y) CONCATENATE_IMPL(x, y) +#define __GLUE__(a, b) a##b #ifdef _DEBUG - #define _DLL_SUFFIX(name) CONCATENATE(name, "d.2.dll") + #define _DLL_SUFFIX(name) __GLUE__(name, "d.2.dll") #else - #define _DLL_SUFFIX(name) CONCATENATE(name, ".2.dll") + #define _DLL_SUFFIX(name) __GLUE__(name, ".2.dll") #endif #define DAAL_LOAD_DLL(name) _daal_load_win_dynamic_lib(name) DAAL_EXPORT HMODULE load_onedal_thread_dll() { - return DAAL_LOAD_DLL(_DLL_SUFFIX(onedal_thread)); + return DAAL_LOAD_DLL(_DLL_SUFFIX("onedal_thread")); } static void load_daal_thr_dll(void) @@ -78,7 +77,7 @@ static void load_daal_thr_dll(void) } } -FARPROC load_daal_thr_func(char * ordinal) +FARPROC load_daal_thr_func(const char * ordinal) { FARPROC FuncAddress; @@ -234,7 +233,7 @@ DAAL_EXPORT void * _threaded_scalable_malloc(const size_t size, const size_t ali load_daal_thr_dll(); if (_threaded_malloc_ptr == NULL) { - _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func(const_cast("_threaded_scalable_malloc")); + _threaded_malloc_ptr = (_threaded_malloc_t)load_daal_thr_func("_threaded_scalable_malloc"); } return _threaded_malloc_ptr(size, alignment); } @@ -244,7 +243,7 @@ DAAL_EXPORT void _threaded_scalable_free(void * ptr) load_daal_thr_dll(); if (_threaded_free_ptr == NULL) { - _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func(const_cast("_threaded_scalable_free")); + _threaded_free_ptr = (_threaded_free_t)load_daal_thr_func("_threaded_scalable_free"); } _threaded_free_ptr(ptr); } @@ -254,7 +253,7 @@ DAAL_EXPORT void _daal_threader_for(int n, int threads_request, const void * a, load_daal_thr_dll(); if (_daal_threader_for_ptr == NULL) { - _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for")); + _daal_threader_for_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for"); } _daal_threader_for_ptr(n, threads_request, a, func); } @@ -264,7 +263,7 @@ DAAL_EXPORT void _daal_threader_for_simple(int n, int threads_request, const voi load_daal_thr_dll(); if (_daal_threader_for_simple_ptr == NULL) { - _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func(const_cast("_daal_threader_for_simple")); + _daal_threader_for_simple_ptr = (_daal_threader_for_simple_t)load_daal_thr_func("_daal_threader_for_simple"); } _daal_threader_for_simple_ptr(n, threads_request, a, func); } @@ -274,7 +273,7 @@ DAAL_EXPORT void _daal_threader_for_int32ptr(const int * begin, const int * end, load_daal_thr_dll(); if (_daal_threader_for_int32ptr_ptr == NULL) { - _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func(const_cast("_daal_threader_for_int32ptr")); + _daal_threader_for_int32ptr_ptr = (_daal_threader_for_int32ptr_t)load_daal_thr_func("_daal_threader_for_int32ptr"); } _daal_threader_for_int32ptr_ptr(begin, end, a, func); } @@ -284,7 +283,7 @@ DAAL_EXPORT void _daal_threader_for_int64(int64_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_threader_for_int64_ptr == NULL) { - _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func(const_cast("_daal_threader_for_int64")); + _daal_threader_for_int64_ptr = (_daal_threader_for_int64_t)load_daal_thr_func("_daal_threader_for_int64"); } _daal_threader_for_int64_ptr(n, a, func); } @@ -294,7 +293,7 @@ DAAL_EXPORT void _daal_static_threader_for(size_t n, const void * a, daal::funct load_daal_thr_dll(); if (_daal_static_threader_for_ptr == NULL) { - _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func(const_cast("_daal_static_threader_for")); + _daal_static_threader_for_ptr = (_daal_static_threader_for_t)load_daal_thr_func("_daal_static_threader_for"); } _daal_static_threader_for_ptr(n, a, func); } @@ -304,7 +303,7 @@ DAAL_EXPORT void _daal_parallel_sort_int32(int * begin_ptr, int * end_ptr) load_daal_thr_dll(); if (_daal_parallel_sort_int32_ptr == NULL) { - _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func(const_cast("_daal_parallel_sort_int32")); + _daal_parallel_sort_int32_ptr = (_daal_parallel_sort_int32_t)load_daal_thr_func("_daal_parallel_sort_int32"); } _daal_parallel_sort_int32_ptr(begin_ptr, end_ptr); } @@ -314,7 +313,7 @@ DAAL_EXPORT void _daal_parallel_sort_uint64(size_t * begin_ptr, size_t * end_ptr load_daal_thr_dll(); if (_daal_parallel_sort_uint64_ptr == NULL) { - _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_uint64")); + _daal_parallel_sort_uint64_ptr = (_daal_parallel_sort_uint64_t)load_daal_thr_func("_daal_parallel_sort_uint64"); } _daal_parallel_sort_uint64_ptr(begin_ptr, end_ptr); } @@ -325,7 +324,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_int32_uint64(daal::IdxValType * b if (_daal_parallel_sort_pair_int32_uint64_ptr == NULL) { _daal_parallel_sort_pair_int32_uint64_ptr = - (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_int32_uint64")); + (_daal_parallel_sort_pair_int32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_int32_uint64"); } _daal_parallel_sort_pair_int32_uint64_ptr(begin_ptr, end_ptr); } @@ -335,8 +334,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp32_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp32_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp32_uint64_ptr = - (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp32_uint64")); + _daal_parallel_sort_pair_fp32_uint64_ptr = (_daal_parallel_sort_pair_fp32_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp32_uint64"); } _daal_parallel_sort_pair_fp32_uint64_ptr(begin_ptr, end_ptr); } @@ -346,8 +344,7 @@ DAAL_EXPORT void _daal_parallel_sort_pair_fp64_uint64(daal::IdxValType * load_daal_thr_dll(); if (_daal_parallel_sort_pair_fp64_uint64_ptr == NULL) { - _daal_parallel_sort_pair_fp64_uint64_ptr = - (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func(const_cast("_daal_parallel_sort_pair_fp64_uint64")); + _daal_parallel_sort_pair_fp64_uint64_ptr = (_daal_parallel_sort_pair_fp64_uint64_t)load_daal_thr_func("_daal_parallel_sort_pair_fp64_uint64"); } _daal_parallel_sort_pair_fp64_uint64_ptr(begin_ptr, end_ptr); } @@ -357,7 +354,7 @@ DAAL_EXPORT void _daal_threader_for_blocked(int n, int threads_request, const vo load_daal_thr_dll(); if (_daal_threader_for_blocked_ptr == NULL) { - _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked")); + _daal_threader_for_blocked_ptr = (_daal_threader_for_blocked_t)load_daal_thr_func("_daal_threader_for_blocked"); } _daal_threader_for_blocked_ptr(n, threads_request, a, func); } @@ -367,8 +364,7 @@ DAAL_EXPORT void _daal_threader_for_blocked_size(size_t n, size_t block, const v load_daal_thr_dll(); if (_daal_threader_for_blocked_size_ptr == NULL) { - _daal_threader_for_blocked_size_ptr = - (_daal_threader_for_blocked_size_t)load_daal_thr_func(const_cast("_daal_threader_for_blocked_size")); + _daal_threader_for_blocked_size_ptr = (_daal_threader_for_blocked_size_t)load_daal_thr_func("_daal_threader_for_blocked_size"); } _daal_threader_for_blocked_size_ptr(n, block, a, func); } @@ -378,7 +374,7 @@ DAAL_EXPORT void _daal_threader_for_optional(int n, int threads_request, const v load_daal_thr_dll(); if (_daal_threader_for_optional_ptr == NULL) { - _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func(const_cast("_daal_threader_for_optional")); + _daal_threader_for_optional_ptr = (_daal_threader_for_t)load_daal_thr_func("_daal_threader_for_optional"); } _daal_threader_for_optional_ptr(n, threads_request, a, func); } @@ -389,8 +385,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64(int32_t n, int64_t init, c load_daal_thr_dll(); if (_daal_parallel_reduce_int32_int64_ptr == NULL) { - _daal_parallel_reduce_int32_int64_ptr = - (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64")); + _daal_parallel_reduce_int32_int64_ptr = (_daal_parallel_reduce_int32_int64_t)load_daal_thr_func("_daal_parallel_reduce_int32_int64"); } return _daal_parallel_reduce_int32_int64_ptr(n, init, a, loop_func, b, reduction_func); } @@ -402,7 +397,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32_int64_simple(int32_t n, int64_t if (_daal_parallel_reduce_int32_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32_int64_simple_ptr = - (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32_int64_simple")); + (_daal_parallel_reduce_int32_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32_int64_simple"); } return _daal_parallel_reduce_int32_int64_simple_ptr(n, init, a, loop_func, b, reduction_func); } @@ -415,7 +410,7 @@ DAAL_EXPORT int64_t _daal_parallel_reduce_int32ptr_int64_simple(const int32_t * if (_daal_parallel_reduce_int32ptr_int64_simple_ptr == NULL) { _daal_parallel_reduce_int32ptr_int64_simple_ptr = - (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func(const_cast("_daal_parallel_reduce_int32ptr_int64_simple")); + (_daal_parallel_reduce_int32ptr_int64_t_simple)load_daal_thr_func("_daal_parallel_reduce_int32ptr_int64_simple"); } return _daal_parallel_reduce_int32ptr_int64_simple_ptr(begin, end, init, a, loop_func, b, reduction_func); } @@ -425,7 +420,7 @@ DAAL_EXPORT void _daal_threader_for_break(int n, int threads_request, const void load_daal_thr_dll(); if (_daal_threader_for_break_ptr == NULL) { - _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func(const_cast("_daal_threader_for_break")); + _daal_threader_for_break_ptr = (_daal_threader_for_break_t)load_daal_thr_func("_daal_threader_for_break"); } _daal_threader_for_break_ptr(n, threads_request, a, func); } @@ -435,8 +430,7 @@ DAAL_EXPORT int _daal_threader_get_max_threads() load_daal_thr_dll(); if (_daal_threader_get_max_threads_ptr == NULL) { - _daal_threader_get_max_threads_ptr = - (_daal_threader_get_max_threads_t)load_daal_thr_func(const_cast("_daal_threader_get_max_threads")); + _daal_threader_get_max_threads_ptr = (_daal_threader_get_max_threads_t)load_daal_thr_func("_daal_threader_get_max_threads"); } return _daal_threader_get_max_threads_ptr(); } @@ -447,7 +441,7 @@ DAAL_EXPORT int _daal_threader_get_current_thread_index() if (_daal_threader_get_current_thread_index_ptr == NULL) { _daal_threader_get_current_thread_index_ptr = - (_daal_threader_get_current_thread_index_t)load_daal_thr_func(const_cast("_daal_threader_get_current_thread_index")); + (_daal_threader_get_current_thread_index_t)load_daal_thr_func("_daal_threader_get_current_thread_index"); } return _daal_threader_get_current_thread_index_ptr(); } @@ -457,7 +451,7 @@ DAAL_EXPORT void * _daal_get_tls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_tls_ptr_ptr == NULL) { - _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func(const_cast("_daal_get_tls_ptr")); + _daal_get_tls_ptr_ptr = (_daal_get_tls_ptr_t)load_daal_thr_func("_daal_get_tls_ptr"); } return _daal_get_tls_ptr_ptr(a, func); } @@ -467,7 +461,7 @@ DAAL_EXPORT void _daal_del_tls_ptr(void * tlsPtr) load_daal_thr_dll(); if (_daal_del_tls_ptr_ptr == NULL) { - _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func(const_cast("_daal_del_tls_ptr")); + _daal_del_tls_ptr_ptr = (_daal_del_tls_ptr_t)load_daal_thr_func("_daal_del_tls_ptr"); } _daal_del_tls_ptr_ptr(tlsPtr); } @@ -477,7 +471,7 @@ DAAL_EXPORT void * _daal_get_tls_local(void * tlsPtr) load_daal_thr_dll(); if (_daal_get_tls_local_ptr == NULL) { - _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func(const_cast("_daal_get_tls_local")); + _daal_get_tls_local_ptr = (_daal_get_tls_local_t)load_daal_thr_func("_daal_get_tls_local"); } return _daal_get_tls_local_ptr(tlsPtr); } @@ -487,7 +481,7 @@ DAAL_EXPORT void _daal_reduce_tls(void * tlsPtr, void * a, daal::tls_reduce_func load_daal_thr_dll(); if (_daal_reduce_tls_ptr == NULL) { - _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func(const_cast("_daal_reduce_tls")); + _daal_reduce_tls_ptr = (_daal_reduce_tls_t)load_daal_thr_func("_daal_reduce_tls"); } _daal_reduce_tls_ptr(tlsPtr, a, func); } @@ -497,7 +491,7 @@ DAAL_EXPORT void _daal_parallel_reduce_tls(void * tlsPtr, void * a, daal::tls_re load_daal_thr_dll(); if (_daal_parallel_reduce_tls_ptr == NULL) { - _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func(const_cast("_daal_parallel_reduce_tls")); + _daal_parallel_reduce_tls_ptr = (_daal_parallel_reduce_tls_t)load_daal_thr_func("_daal_parallel_reduce_tls"); } _daal_parallel_reduce_tls_ptr(tlsPtr, a, func); } @@ -507,7 +501,7 @@ DAAL_EXPORT void * _daal_get_ls_ptr(void * a, daal::tls_functype func) load_daal_thr_dll(); if (_daal_get_ls_ptr_ptr == NULL) { - _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func(const_cast("_daal_get_ls_ptr")); + _daal_get_ls_ptr_ptr = (_daal_get_ls_ptr_t)load_daal_thr_func("_daal_get_ls_ptr"); } return _daal_get_ls_ptr_ptr(a, func); } @@ -517,7 +511,7 @@ DAAL_EXPORT void _daal_del_ls_ptr(void * lsPtr) load_daal_thr_dll(); if (_daal_del_ls_ptr_ptr == NULL) { - _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func(const_cast("_daal_del_ls_ptr")); + _daal_del_ls_ptr_ptr = (_daal_del_ls_ptr_t)load_daal_thr_func("_daal_del_ls_ptr"); } _daal_del_ls_ptr_ptr(lsPtr); } @@ -527,7 +521,7 @@ DAAL_EXPORT void * _daal_get_ls_local(void * lsPtr) load_daal_thr_dll(); if (_daal_get_ls_local_ptr == NULL) { - _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func(const_cast("_daal_get_ls_local")); + _daal_get_ls_local_ptr = (_daal_get_ls_local_t)load_daal_thr_func("_daal_get_ls_local"); } return _daal_get_ls_local_ptr(lsPtr); } @@ -537,7 +531,7 @@ DAAL_EXPORT void _daal_release_ls_local(void * lsPtr, void * a) load_daal_thr_dll(); if (_daal_release_ls_local_ptr == NULL) { - _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func(const_cast("_daal_release_ls_local")); + _daal_release_ls_local_ptr = (_daal_release_ls_local_t)load_daal_thr_func("_daal_release_ls_local"); } _daal_release_ls_local_ptr(lsPtr, a); } @@ -547,7 +541,7 @@ DAAL_EXPORT void _daal_reduce_ls(void * lsPtr, void * a, daal::tls_reduce_functy load_daal_thr_dll(); if (_daal_reduce_ls_ptr == NULL) { - _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func(const_cast("_daal_reduce_ls")); + _daal_reduce_ls_ptr = (_daal_reduce_ls_t)load_daal_thr_func("_daal_reduce_ls"); } _daal_reduce_ls_ptr(lsPtr, a, func); } @@ -557,7 +551,7 @@ DAAL_EXPORT void * _daal_new_mutex() load_daal_thr_dll(); if (_daal_new_mutex_ptr == NULL) { - _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func(const_cast("_daal_new_mutex")); + _daal_new_mutex_ptr = (_daal_new_mutex_t)load_daal_thr_func("_daal_new_mutex"); } return _daal_new_mutex_ptr(); } @@ -567,7 +561,7 @@ DAAL_EXPORT void _daal_lock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_lock_mutex_ptr == NULL) { - _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func(const_cast("_daal_lock_mutex")); + _daal_lock_mutex_ptr = (_daal_lock_mutex_t)load_daal_thr_func("_daal_lock_mutex"); } _daal_lock_mutex_ptr(mutexPtr); } @@ -577,7 +571,7 @@ DAAL_EXPORT void _daal_unlock_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_unlock_mutex_ptr == NULL) { - _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func(const_cast("_daal_unlock_mutex")); + _daal_unlock_mutex_ptr = (_daal_unlock_mutex_t)load_daal_thr_func("_daal_unlock_mutex"); } _daal_unlock_mutex_ptr(mutexPtr); } @@ -587,7 +581,7 @@ DAAL_EXPORT void _daal_del_mutex(void * mutexPtr) load_daal_thr_dll(); if (_daal_del_mutex_ptr == NULL) { - _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func(const_cast("_daal_del_mutex")); + _daal_del_mutex_ptr = (_daal_del_mutex_t)load_daal_thr_func("_daal_del_mutex"); } _daal_del_mutex_ptr(mutexPtr); } @@ -597,7 +591,7 @@ DAAL_EXPORT void * _daal_new_task_group() load_daal_thr_dll(); if (_daal_new_task_group_ptr == NULL) { - _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func(const_cast("_daal_new_task_group")); + _daal_new_task_group_ptr = (_daal_new_task_group_t)load_daal_thr_func("_daal_new_task_group"); } return _daal_new_task_group_ptr(); } @@ -607,7 +601,7 @@ DAAL_EXPORT void _daal_del_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_del_task_group_ptr == NULL) { - _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func(const_cast("_daal_del_task_group")); + _daal_del_task_group_ptr = (_daal_del_task_group_t)load_daal_thr_func("_daal_del_task_group"); } _daal_del_task_group_ptr(taskGroupPtr); } @@ -617,7 +611,7 @@ DAAL_EXPORT void _daal_run_task_group(void * taskGroupPtr, daal::task * t) load_daal_thr_dll(); if (_daal_run_task_group_ptr == NULL) { - _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func(const_cast("_daal_run_task_group")); + _daal_run_task_group_ptr = (_daal_run_task_group_t)load_daal_thr_func("_daal_run_task_group"); } _daal_run_task_group_ptr(taskGroupPtr, t); } @@ -627,7 +621,7 @@ DAAL_EXPORT void _daal_wait_task_group(void * taskGroupPtr) load_daal_thr_dll(); if (_daal_wait_task_group_ptr == NULL) { - _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func(const_cast("_daal_wait_task_group")); + _daal_wait_task_group_ptr = (_daal_wait_task_group_t)load_daal_thr_func("_daal_wait_task_group"); } _daal_wait_task_group_ptr(taskGroupPtr); } @@ -637,7 +631,7 @@ DAAL_EXPORT bool _daal_is_in_parallel() load_daal_thr_dll(); if (_daal_is_in_parallel_ptr == NULL) { - _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func(const_cast("_daal_is_in_parallel")); + _daal_is_in_parallel_ptr = (_daal_is_in_parallel_t)load_daal_thr_func("_daal_is_in_parallel"); } return _daal_is_in_parallel_ptr(); } @@ -658,7 +652,7 @@ DAAL_EXPORT void _daal_tbb_task_scheduler_free(void *& init) load_daal_thr_dll(); if (_daal_tbb_task_scheduler_free_ptr == NULL) { - _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func(const_cast("_daal_tbb_task_scheduler_free")); + _daal_tbb_task_scheduler_free_ptr = (_daal_tbb_task_scheduler_free_t)load_daal_thr_func("_daal_tbb_task_scheduler_free"); } return _daal_tbb_task_scheduler_free_ptr(init); } @@ -668,7 +662,7 @@ DAAL_EXPORT size_t _setNumberOfThreads(const size_t numThreads, void ** init) load_daal_thr_dll(); if (_setNumberOfThreads_ptr == NULL) { - _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func(const_cast("_setNumberOfThreads")); + _setNumberOfThreads_ptr = (_setNumberOfThreads_t)load_daal_thr_func("_setNumberOfThreads"); } return _setNumberOfThreads_ptr(numThreads, init); } @@ -678,7 +672,7 @@ DAAL_EXPORT void * _daal_threader_env() load_daal_thr_dll(); if (_daal_threader_env_ptr == NULL) { - _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func(const_cast("_daal_threader_env")); + _daal_threader_env_ptr = (_daal_threader_env_t)load_daal_thr_func("_daal_threader_env"); } return _daal_threader_env_ptr(); } @@ -689,8 +683,7 @@ DAAL_EXPORT void _thread_pinner_thread_pinner_init() load_daal_thr_dll(); if (_thread_pinner_thread_pinner_init_ptr == NULL) { - _thread_pinner_thread_pinner_init_ptr = - (_thread_pinner_thread_pinner_init_t)load_daal_thr_func(const_cast("_thread_pinner_thread_pinner_init")); + _thread_pinner_thread_pinner_init_ptr = (_thread_pinner_thread_pinner_init_t)load_daal_thr_func("_thread_pinner_thread_pinner_init"); } _thread_pinner_thread_pinner_init_ptr(); } @@ -700,7 +693,7 @@ DAAL_EXPORT void _thread_pinner_read_topology() load_daal_thr_dll(); if (_thread_pinner_read_topology_ptr == NULL) { - _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func(const_cast("_thread_pinner_read_topology")); + _thread_pinner_read_topology_ptr = (_thread_pinner_read_topology_t)load_daal_thr_func("_thread_pinner_read_topology"); } _thread_pinner_read_topology_ptr(); } @@ -710,8 +703,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_entry(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_entry_ptr == NULL) { - _thread_pinner_on_scheduler_entry_ptr = - (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_entry")); + _thread_pinner_on_scheduler_entry_ptr = (_thread_pinner_on_scheduler_entry_t)load_daal_thr_func("_thread_pinner_on_scheduler_entry"); } _thread_pinner_on_scheduler_entry_ptr(p); } @@ -721,8 +713,7 @@ DAAL_EXPORT void _thread_pinner_on_scheduler_exit(bool p) load_daal_thr_dll(); if (_thread_pinner_on_scheduler_exit_ptr == NULL) { - _thread_pinner_on_scheduler_exit_ptr = - (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func(const_cast("_thread_pinner_on_scheduler_exit")); + _thread_pinner_on_scheduler_exit_ptr = (_thread_pinner_on_scheduler_exit_t)load_daal_thr_func("_thread_pinner_on_scheduler_exit"); } _thread_pinner_on_scheduler_exit_ptr(p); } @@ -732,7 +723,7 @@ DAAL_EXPORT void _thread_pinner_execute(daal::services::internal::thread_pinner_ load_daal_thr_dll(); if (_thread_pinner_execute_ptr == NULL) { - _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func(const_cast("_thread_pinner_execute")); + _thread_pinner_execute_ptr = (_thread_pinner_execute_t)load_daal_thr_func("_thread_pinner_execute"); } _thread_pinner_execute_ptr(task); } @@ -742,7 +733,7 @@ DAAL_EXPORT int _thread_pinner_get_status() load_daal_thr_dll(); if (_thread_pinner_get_status_ptr == NULL) { - _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func(const_cast("_thread_pinner_get_status")); + _thread_pinner_get_status_ptr = (_thread_pinner_get_status_t)load_daal_thr_func("_thread_pinner_get_status"); } return _thread_pinner_get_status_ptr(); } @@ -752,7 +743,7 @@ DAAL_EXPORT bool _thread_pinner_get_pinning() load_daal_thr_dll(); if (_thread_pinner_get_pinning_ptr == NULL) { - _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_get_pinning")); + _thread_pinner_get_pinning_ptr = (_thread_pinner_get_pinning_t)load_daal_thr_func("_thread_pinner_get_pinning"); } return _thread_pinner_get_pinning_ptr(); } @@ -762,7 +753,7 @@ DAAL_EXPORT bool _thread_pinner_set_pinning(bool p) load_daal_thr_dll(); if (_thread_pinner_set_pinning_ptr == NULL) { - _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func(const_cast("_thread_pinner_set_pinning")); + _thread_pinner_set_pinning_ptr = (_thread_pinner_set_pinning_t)load_daal_thr_func("_thread_pinner_set_pinning"); } return _thread_pinner_set_pinning_ptr(p); } @@ -772,55 +763,86 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, load_daal_thr_dll(); if (_getThreadPinner_ptr == NULL) { - _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func(const_cast("_getThreadPinner")); + _getThreadPinner_ptr = (_getThreadPinner_t)load_daal_thr_func("_getThreadPinner"); } return _getThreadPinner_ptr(create_pinner, read_topo, deleter); } #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + ##fn_dpref##fn_name##_ptr##argcall; \ } +#if defined(_WIN64) + #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + ##fn_dpref##fn_name##_ptr##argcall; \ + } +#else + #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) +#endif + #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(const_cast(#fn_dpref #fn_cpu #fn_name)); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + return fn_dpref##fn_name##_ptr##argcall; \ } +#if defined(_WIN64) + #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + return fn_dpref##fn_name##_ptr##argcall; \ + } +#else + #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) +#endif + /* Used directly in Intel(R) oneAPI Data Analytics Library (oneDAL) */ CALL_VOID_FUNC_FROM_DLL(fpk_blas_, dsyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const double * alpha, const double * a, const DAAL_INT * lda, const double * beta, double * c, const DAAL_INT * ldc), (uplo, trans, n, k, alpha, a, lda, beta, c, ldc)); + CALL_VOID_FUNC_FROM_DLL(fpk_blas_, ssyrk, (const char * uplo, const char * trans, const DAAL_INT * n, const DAAL_INT * k, const float * alpha, const float * a, const DAAL_INT * lda, const float * beta, float * c, const DAAL_INT * ldc), @@ -1093,27 +1115,27 @@ CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_64f_I, (Ipp64f * CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * pSrcDst, Ipp32f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); #define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT void fn_dpref##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ + if (fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ + ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ - ##fn_dpref##fn_name##_pt##argcall; \ + ##fn_dpref##fn_name##_ptr##argcall; \ } #define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*##fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name##argdecl \ { \ load_daal_thr_dll(); \ - if (##fn_dpref##fn_name##_ptr == NULL) \ + if (fn_dpref##fn_name##_ptr == NULL) \ { \ - ##fn_dpref##fn_name##_ptr = (##fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ + ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ } \ return fn_dpref##fn_name##_ptr##argcall; \ } @@ -1139,3 +1161,4 @@ CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_sections, (DAAL_INT thread CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_ordered, (DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func), (i, th_idx, th_num, a, func)); CALL_RET_FUNC_FROM_DLL_ALONE(DAAL_INT, fpk_vsl_serv_, threader_get_num_threads_limit, (void), ()); + diff --git a/makefile b/makefile index f6d7c12153a..47b3d44f325 100644 --- a/makefile +++ b/makefile @@ -116,7 +116,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx17 := $(if $(COMPILER_is_vc),/std:c++17,-std=c++17) +-cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) -DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE From a9282b8c8db2800bbbb4c22704dacd0f1f56a1f8 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 07:51:23 -0700 Subject: [PATCH 028/120] minor fixes --- .../algorithm_container_base_batch.h | 6 +- .../linear_regression_training_distributed.h | 6 +- .../src/externals/core_threading_win_dll.cpp | 119 +++++++++--------- 3 files changed, 65 insertions(+), 66 deletions(-) diff --git a/cpp/daal/include/algorithms/algorithm_container_base_batch.h b/cpp/daal/include/algorithms/algorithm_container_base_batch.h index 03b3d48b16e..49f2a0bef5e 100644 --- a/cpp/daal/include/algorithms/algorithm_container_base_batch.h +++ b/cpp/daal/include/algorithms/algorithm_container_base_batch.h @@ -149,11 +149,11 @@ class AlgorithmContainerImpl : public AlgorithmContainer #if defined(TARGET_X86_64) template -class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl +class AlgorithmDispatchContainer : public AlgorithmContainerImpl #elif defined(TARGET_ARM) template -class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl +class AlgorithmDispatchContainer : public AlgorithmContainerImpl #endif { public: diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_training_distributed.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_training_distributed.h index 25909e86ba8..3f613bfacd8 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_training_distributed.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_training_distributed.h @@ -111,7 +111,7 @@ class DistributedContainer : public T * - \ref prediction::interface1::Batch "prediction::Batch" class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training {}; /** @@ -134,7 +134,7 @@ class DAAL_EXPORT Distributed : public Training * - \ref prediction::interface1::Batch class */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -194,7 +194,7 @@ class DAAL_EXPORT Distributed : public Onli * - \ref prediction::interface1::Batch class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::linear_regression::training::DistributedInput InputType; diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 801921c2df8..2176fe1b1ed 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -41,7 +41,7 @@ daal::services::Environment::LibraryThreadingType __daal_serv_get_thr_set(); DAAL_EXPORT HMODULE load_onedal_thread_dll() { - return DAAL_LOAD_DLL(_DLL_SUFFIX("onedal_thread")); + return DAAL_LOAD_DLL("onedal_thread.2.dll"); } static void load_daal_thr_dll(void) @@ -770,68 +770,68 @@ DAAL_EXPORT void * _getThreadPinner(bool create_pinner, void (*read_topo)(int &, #endif #define CALL_VOID_FUNC_FROM_DLL(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*fn_dpref##fn_name##_t)##argdecl; \ + typedef void(*fn_dpref##fn_name##_t) argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, avx2_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_VOID_FUNC_FROM_DLL_CPU(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + fn_dpref##fn_name##_ptr argcall; \ } #if defined(_WIN64) - #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ + #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT void fn_dpref##fn_cpu##fn_name argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ + } \ + fn_dpref##fn_name##_ptr argcall; \ } #else #define CALL_VOID_FUNC_FROM_DLL_CPU_MIC(fn_dpref, fn_cpu, fn_name, argdecl, argcall) #endif #define CALL_RET_FUNC_FROM_DLL(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ + typedef ret_type(*fn_dpref##fn_name##_t) argdecl; \ static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx512_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, avx2_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse42_, fn_name, argdecl, argcall) \ CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, sse2_, fn_name, argdecl, argcall) -#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ - { \ +#define CALL_RET_FUNC_FROM_DLL_CPU(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ + } \ + return fn_dpref##fn_name##_ptr argcall; \ } #if defined(_WIN64) - #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ - { \ + #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_cpu##fn_name argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_cpu #fn_name); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ + } \ + return fn_dpref##fn_name##_ptr argcall; \ } #else #define CALL_RET_FUNC_FROM_DLL_CPU_MIC(ret_type, fn_dpref, fn_cpu, fn_name, argdecl, argcall) @@ -1114,30 +1114,30 @@ typedef double Ipp64f; CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_64f_I, (Ipp64f * pSrcDst, Ipp64f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); CALL_RET_FUNC_FROM_DLL(IppStatus, fpk_dft_, ippsSortRadixAscend_32f_I, (Ipp32f * pSrcDst, Ipp32f * pTmp, Ipp32s len), (pSrcDst, pTmp, len)); -#define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ - typedef void(*fn_dpref##fn_name##_t)##argdecl; \ - static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ - extern "C" DAAL_EXPORT void fn_dpref##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ - } \ - ##fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_VOID_FUNC_FROM_DLL_ALONE(fn_dpref, fn_name, argdecl, argcall) \ + typedef void(*fn_dpref##fn_name##_t) argdecl; \ + static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ + extern "C" DAAL_EXPORT void fn_dpref##fn_name argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ + } \ + fn_dpref##fn_name##_ptr argcall; \ } -#define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ - typedef ret_type(*fn_dpref##fn_name##_t)##argdecl; \ - static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ - extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name##argdecl \ - { \ - load_daal_thr_dll(); \ - if (fn_dpref##fn_name##_ptr == NULL) \ - { \ - ##fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ - } \ - return fn_dpref##fn_name##_ptr##argcall; \ +#define CALL_RET_FUNC_FROM_DLL_ALONE(ret_type, fn_dpref, fn_name, argdecl, argcall) \ + typedef ret_type(*fn_dpref##fn_name##_t) argdecl; \ + static fn_dpref##fn_name##_t fn_dpref##fn_name##_ptr = NULL; \ + extern "C" DAAL_EXPORT ret_type fn_dpref##fn_name argdecl \ + { \ + load_daal_thr_dll(); \ + if (fn_dpref##fn_name##_ptr == NULL) \ + { \ + fn_dpref##fn_name##_ptr = (fn_dpref##fn_name##_t)load_daal_thr_func(#fn_dpref #fn_name); \ + } \ + return fn_dpref##fn_name##_ptr argcall; \ } CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_serv_, set_num_threads, (int nth), (nth)); @@ -1161,4 +1161,3 @@ CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_sections, (DAAL_INT thread CALL_VOID_FUNC_FROM_DLL_ALONE(fpk_vsl_serv_, threader_ordered, (DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func), (i, th_idx, th_num, a, func)); CALL_RET_FUNC_FROM_DLL_ALONE(DAAL_INT, fpk_vsl_serv_, threader_get_num_threads_limit, (void), ()); - From 99be97c62d80440df174034e6dc2c5678f1644b4 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 08:19:46 -0700 Subject: [PATCH 029/120] fixes for DAAL building --- cpp/daal/include/algorithms/engines/engine.h | 2 +- cpp/daal/include/algorithms/engines/engine_types.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/engines/engine.h b/cpp/daal/include/algorithms/engines/engine.h index e96bd18be62..25d0fb02790 100644 --- a/cpp/daal/include/algorithms/engines/engine.h +++ b/cpp/daal/include/algorithms/engines/engine.h @@ -42,7 +42,7 @@ namespace interface1 * * \brief Class representing an engine */ -class DAAL_EXPORT BatchBase : public daal::algorithms::Analysis +class BatchBase : public daal::algorithms::Analysis { public: typedef algorithms::engines::Input InputType; diff --git a/cpp/daal/include/algorithms/engines/engine_types.h b/cpp/daal/include/algorithms/engines/engine_types.h index 2cbd67b45be..1baecb34d54 100644 --- a/cpp/daal/include/algorithms/engines/engine_types.h +++ b/cpp/daal/include/algorithms/engines/engine_types.h @@ -71,7 +71,7 @@ namespace interface1 * * \brief %Input objects for engines */ -class DAAL_EXPORT Input : public daal::algorithms::Input +class Input : public daal::algorithms::Input { public: /** @@ -111,7 +111,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * * \brief Provides methods to access the result obtained with the compute() method of the engine */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: /** \brief Constructor */ From 41686e295da1c6dd3b6a4c14f13754001c28ee73 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 08:22:30 -0700 Subject: [PATCH 030/120] fixes for DAAL building cov --- .../algorithms/covariance/covariance_distributed.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/daal/include/algorithms/covariance/covariance_distributed.h b/cpp/daal/include/algorithms/covariance/covariance_distributed.h index 3e0e8f5628a..f3cfad98338 100644 --- a/cpp/daal/include/algorithms/covariance/covariance_distributed.h +++ b/cpp/daal/include/algorithms/covariance/covariance_distributed.h @@ -302,7 +302,7 @@ class DistributedContainer : public D * - Result class */ template -class DAAL_EXPORT DistributedIface : public daal::algorithms::Analysis +class DistributedIface : public daal::algorithms::Analysis {}; /** @@ -383,7 +383,7 @@ class DistributedIface : public OnlineImpl * - Result class */ template <> -class DAAL_EXPORT DistributedIface : public daal::algorithms::Analysis +class DistributedIface : public daal::algorithms::Analysis { public: typedef algorithms::covariance::DistributedInput InputType; @@ -529,7 +529,7 @@ class DAAL_EXPORT DistributedIface : public daal::algorithms::Analy * - Result class */ template -class DAAL_EXPORT Distributed : public DistributedIface +class Distributed : public DistributedIface {}; /** @@ -554,7 +554,7 @@ class DAAL_EXPORT Distributed : public DistributedIface * - Result class */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -615,7 +615,7 @@ class DAAL_EXPORT Distributed : public Onli * - Result class */ template -class DAAL_EXPORT Distributed : public DistributedIface +class Distributed : public DistributedIface { public: typedef DistributedIface super; From 87926023846fdd9c67d350c6588bac13d02b39b9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 08:40:27 -0700 Subject: [PATCH 031/120] minor fixes --- .../implicit_als_training_distributed.h | 10 +++++----- .../algorithms/kmeans/kmeans_distributed.h | 6 +++--- .../kmeans/kmeans_init_distributed.h | 18 +++++++++--------- .../moments/low_order_moments_distributed.h | 6 +++--- ...tinomial_naive_bayes_training_distributed.h | 6 +++--- .../include/algorithms/qr/qr_distributed.h | 8 ++++---- .../ridge_regression_training_distributed.h | 6 +++--- .../include/algorithms/svd/svd_distributed.h | 8 ++++---- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_distributed.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_distributed.h index 5b6f9c7234c..582929de2db 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_distributed.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_distributed.h @@ -181,7 +181,7 @@ class DistributedContainer : public Tr * - \ref Method %Training methods of the implicit ALS algorithm in the first step of the distributed processing mode */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training {}; /** @@ -200,7 +200,7 @@ class DAAL_EXPORT Distributed : public Training * - \ref DistributedInput class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::implicit_als::training::DistributedInput InputType; @@ -307,7 +307,7 @@ class DAAL_EXPORT Distributed : public Trai * - \ref DistributedInput class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::implicit_als::training::DistributedInput InputType; @@ -414,7 +414,7 @@ class DAAL_EXPORT Distributed : public Tra * - \ref DistributedInput class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::implicit_als::training::DistributedInput InputType; @@ -521,7 +521,7 @@ class DAAL_EXPORT Distributed : public Trai * - \ref DistributedInput class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::implicit_als::training::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h index a3fb7e8cd2f..ae670106a5d 100644 --- a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h +++ b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h @@ -129,7 +129,7 @@ class DistributedContainer : public d * - Result class */ template -class DAAL_EXPORT Distributed +class Distributed {}; /** @@ -146,7 +146,7 @@ class DAAL_EXPORT Distributed * - \ref ResultId Identifiers of results of K-Means algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::kmeans::Input InputType; @@ -294,7 +294,7 @@ class DAAL_EXPORT Distributed : public daal * - Input class */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::kmeans::DistributedStep2MasterInput InputType; diff --git a/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h b/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h index 5beeaf3a67e..2f8b09ea9b0 100644 --- a/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h +++ b/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h @@ -233,7 +233,7 @@ class DistributedContainer : public d * * \brief Base class representing K-Means algorithm initialization in the distributed processing mode */ -class DAAL_EXPORT DistributedBase : public daal::algorithms::Analysis +class DistributedBase : public daal::algorithms::Analysis { public: typedef algorithms::kmeans::init::Parameter ParameterType; @@ -270,7 +270,7 @@ class DAAL_EXPORT DistributedBase : public daal::algorithms::Analysis -class DAAL_EXPORT Distributed; +class Distributed; /** * @@ -290,7 +290,7 @@ class DAAL_EXPORT Distributed; * - Result class */ template -class DAAL_EXPORT Distributed : public DistributedBase +class Distributed : public DistributedBase { public: typedef algorithms::kmeans::init::Input InputType; @@ -427,7 +427,7 @@ class DAAL_EXPORT Distributed : public Dist * - Result class */ template -class DAAL_EXPORT Distributed : public DistributedBase +class Distributed : public DistributedBase { public: typedef algorithms::kmeans::init::DistributedStep2MasterInput InputType; @@ -572,7 +572,7 @@ class DAAL_EXPORT Distributed : public Dis * * \brief Base class representing K-Means algorithm initialization in the distributed processing mode */ -class DAAL_EXPORT DistributedStep2LocalPlusPlusBase : public daal::algorithms::Analysis +class DistributedStep2LocalPlusPlusBase : public daal::algorithms::Analysis { public: typedef algorithms::kmeans::init::DistributedStep2LocalPlusPlusParameter ParameterType; @@ -607,7 +607,7 @@ class DAAL_EXPORT DistributedStep2LocalPlusPlusBase : public daal::algorithms::A * - DistributedStep2LocalPlusPlusPartialResult class */ template -class DAAL_EXPORT Distributed : public DistributedStep2LocalPlusPlusBase +class Distributed : public DistributedStep2LocalPlusPlusBase { public: typedef algorithms::kmeans::init::DistributedStep2LocalPlusPlusInput InputType; @@ -725,7 +725,7 @@ class DAAL_EXPORT Distributed : public Dist * - DistributedStep3MasterPlusPlusPartialResult class */ template -class DAAL_EXPORT Distributed : public DistributedBase +class Distributed : public DistributedBase { public: typedef algorithms::kmeans::init::DistributedStep3MasterPlusPlusInput InputType; @@ -841,7 +841,7 @@ class DAAL_EXPORT Distributed : public Dis * - DistributedStep4LocalPlusPlusPartialResult class */ template -class DAAL_EXPORT Distributed : public DistributedBase +class Distributed : public DistributedBase { public: typedef algorithms::kmeans::init::DistributedStep4LocalPlusPlusInput InputType; @@ -953,7 +953,7 @@ class DAAL_EXPORT Distributed : public Dist * - DistributedStep5MasterPlusPlusPartialResult class */ template -class DAAL_EXPORT Distributed : public DistributedBase +class Distributed : public DistributedBase { public: typedef algorithms::kmeans::init::DistributedStep5MasterPlusPlusInput InputType; diff --git a/cpp/daal/include/algorithms/moments/low_order_moments_distributed.h b/cpp/daal/include/algorithms/moments/low_order_moments_distributed.h index 048c11bea60..156d45e3197 100644 --- a/cpp/daal/include/algorithms/moments/low_order_moments_distributed.h +++ b/cpp/daal/include/algorithms/moments/low_order_moments_distributed.h @@ -109,7 +109,7 @@ class DistributedContainer : public d * - Result class */ template -class DAAL_EXPORT Distributed +class Distributed {}; /** @@ -128,7 +128,7 @@ class DAAL_EXPORT Distributed * - \ref ResultId Identifiers of the results of the low order moments algorithm */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -185,7 +185,7 @@ class DAAL_EXPORT Distributed : public Onli * - \ref ResultId Identifiers of the results of the low order moments algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::low_order_moments::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_distributed.h b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_distributed.h index 34836f48895..3e2f106b388 100644 --- a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_distributed.h +++ b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_distributed.h @@ -100,7 +100,7 @@ class DistributedContainer : public T * */ template -class DAAL_EXPORT Distributed +class Distributed {}; /** @@ -117,7 +117,7 @@ class DAAL_EXPORT Distributed * */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -175,7 +175,7 @@ class DAAL_EXPORT Distributed : public Onli * */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::multinomial_naive_bayes::training::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/qr/qr_distributed.h b/cpp/daal/include/algorithms/qr/qr_distributed.h index 34310311933..f20020079d8 100644 --- a/cpp/daal/include/algorithms/qr/qr_distributed.h +++ b/cpp/daal/include/algorithms/qr/qr_distributed.h @@ -134,7 +134,7 @@ class DistributedContainer : public da * - \ref Method Computation methods for the QR decomposition algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis {}; /** @@ -149,7 +149,7 @@ class DAAL_EXPORT Distributed : public daal::algorithms::Analysis * - \ref Method Computation methods */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -201,7 +201,7 @@ class DAAL_EXPORT Distributed : public Onli * - \ref Method Computation methods */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef DistributedStep2Input Input; @@ -328,7 +328,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref Method Computation methods */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef DistributedStep3Input Input; diff --git a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_distributed.h b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_distributed.h index 80a6b7d8f88..cb6eabcbe37 100644 --- a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_distributed.h +++ b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_distributed.h @@ -106,7 +106,7 @@ class DistributedContainer : public T * - \ref prediction::interface1::Batch "prediction::Batch" class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training {}; /** @@ -127,7 +127,7 @@ class DAAL_EXPORT Distributed : public Training * - \ref prediction::interface1::Batch "prediction::Batch" class */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -186,7 +186,7 @@ class DAAL_EXPORT Distributed : public Onli * - \ref prediction::interface1::Batch "prediction::Batch" class */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::ridge_regression::training::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/svd/svd_distributed.h b/cpp/daal/include/algorithms/svd/svd_distributed.h index f4d07bb16b6..0d33eee118a 100644 --- a/cpp/daal/include/algorithms/svd/svd_distributed.h +++ b/cpp/daal/include/algorithms/svd/svd_distributed.h @@ -151,7 +151,7 @@ class DistributedContainer : public da * - \ref Method SVD computation methods */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis {}; /** @@ -166,7 +166,7 @@ class DAAL_EXPORT Distributed : public daal::algorithms::Analysis * - \ref Method Computation methods */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -218,7 +218,7 @@ class DAAL_EXPORT Distributed : public Onli * - \ref Method SVD computation methods */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::svd::DistributedStep2Input InputType; @@ -335,7 +335,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref Method SVD computation methods */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::svd::DistributedStep3Input InputType; From b8ecd8d421c2ccf3b4fc17174b646ab2d49460f9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 08:42:19 -0700 Subject: [PATCH 032/120] minor fixes --- .../distributions/bernoulli/bernoulli_types_fpt.cpp | 4 ++-- .../src/algorithms/distributions/normal/normal_types_fpt.cpp | 4 ++-- .../algorithms/distributions/uniform/uniform_types_fpt.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_types_fpt.cpp b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_types_fpt.cpp index b52c0d62039..4d7c95a3b07 100644 --- a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_types_fpt.cpp +++ b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_types_fpt.cpp @@ -36,13 +36,13 @@ namespace interface1 * Check the correctness of the %Parameter object */ template -DAAL_EXPORT services::Status Parameter::check() const +services::Status Parameter::check() const { DAAL_CHECK_EX((algorithmFPType)0.0 <= p && p <= (algorithmFPType)1.0, services::ErrorIncorrectParameter, services::ParameterName, pStr()); return services::Status(); } -template DAAL_EXPORT services::Status Parameter::check() const; +template services::Status Parameter::check() const; } // namespace interface1 } // namespace bernoulli diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp index 3b079ab700d..0a7cf383ce3 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp @@ -36,13 +36,13 @@ namespace interface1 * Check the correctness of the %Parameter object */ template -DAAL_EXPORT services::Status Parameter::check() const +services::Status Parameter::check() const { DAAL_CHECK_EX(sigma > 0, services::ErrorIncorrectParameter, services::ParameterName, sigmaStr()); return services::Status(); } -template DAAL_EXPORT services::Status Parameter::check() const; +template services::Status Parameter::check() const; } // namespace interface1 } // namespace normal diff --git a/cpp/daal/src/algorithms/distributions/uniform/uniform_types_fpt.cpp b/cpp/daal/src/algorithms/distributions/uniform/uniform_types_fpt.cpp index f9f21bbe7d0..3918b088169 100644 --- a/cpp/daal/src/algorithms/distributions/uniform/uniform_types_fpt.cpp +++ b/cpp/daal/src/algorithms/distributions/uniform/uniform_types_fpt.cpp @@ -36,13 +36,13 @@ namespace interface1 * Check the correctness of the %Parameter object */ template -DAAL_EXPORT services::Status Parameter::check() const +services::Status Parameter::check() const { DAAL_CHECK_EX(a < b, services::ErrorIncorrectParameter, services::ParameterName, aStr()); return services::Status(); } -template DAAL_EXPORT services::Status Parameter::check() const; +template services::Status Parameter::check() const; } // namespace interface1 } // namespace uniform From 409776bb8ae5b77ca84ffe3df9383e292975cd5f Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 08:53:48 -0700 Subject: [PATCH 033/120] minor fixes for LOM --- .../normalization/minmax/minmax_parameter_fpt.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter_fpt.cpp b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter_fpt.cpp index 8878d055f4c..7c057c228e1 100644 --- a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter_fpt.cpp +++ b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter_fpt.cpp @@ -40,19 +40,19 @@ typedef SharedPtr LowOrderMomentsPtr; /** Constructs min-max normalization parameters with default low order algorithm */ template -DAAL_EXPORT Parameter::Parameter(double lowerBound, double upperBound) +Parameter::Parameter(double lowerBound, double upperBound) : ParameterBase(lowerBound, upperBound, LowOrderMomentsPtr(new low_order_moments::Batch())) {} /** Constructs min-max normalization parameters */ template -DAAL_EXPORT Parameter::Parameter(double lowerBound, double upperBound, const LowOrderMomentsPtr & moments) +Parameter::Parameter(double lowerBound, double upperBound, const LowOrderMomentsPtr & moments) : ParameterBase(lowerBound, upperBound, moments) {} -template DAAL_EXPORT Parameter::Parameter(double lowerBound, double upperBound); +template Parameter::Parameter(double lowerBound, double upperBound); -template DAAL_EXPORT Parameter::Parameter(double lowerBound, double upperBound, const LowOrderMomentsPtr & moments); +template Parameter::Parameter(double lowerBound, double upperBound, const LowOrderMomentsPtr & moments); } // namespace interface1 } // namespace minmax From 7c4d9a00d57fdb13c5fe0b89dfb3fd8c2fc979ab Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 09:32:11 -0700 Subject: [PATCH 034/120] minor fixes for PCA --- .../algorithms/distributions/normal/normal_types_fpt.cpp | 2 +- cpp/daal/src/algorithms/pca/pca_baseparameter_fpt.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp index 0a7cf383ce3..b79b9c5ccc6 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp @@ -36,7 +36,7 @@ namespace interface1 * Check the correctness of the %Parameter object */ template -services::Status Parameter::check() const + services::Status Parameter::check() const { DAAL_CHECK_EX(sigma > 0, services::ErrorIncorrectParameter, services::ParameterName, sigmaStr()); return services::Status(); diff --git a/cpp/daal/src/algorithms/pca/pca_baseparameter_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_baseparameter_fpt.cpp index e23643e3a44..e338d70236a 100644 --- a/cpp/daal/src/algorithms/pca/pca_baseparameter_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_baseparameter_fpt.cpp @@ -32,10 +32,10 @@ namespace interface1 { /** Constructs PCA parameters */ template -DAAL_EXPORT BaseParameter::BaseParameter() {}; +BaseParameter::BaseParameter() {}; -template DAAL_EXPORT BaseParameter::BaseParameter(); -template DAAL_EXPORT BaseParameter::BaseParameter(); +template BaseParameter::BaseParameter(); +template BaseParameter::BaseParameter(); } // namespace interface1 } // namespace pca From 05d5dac455ac957c567b69f3524177d4d560c560 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 09:40:47 -0700 Subject: [PATCH 035/120] minor fixes for typename --- .../algorithms/dbscan/dbscan_distributed.h | 28 +++++++++---------- .../implicit_als_training_init_distributed.h | 6 ++-- .../algorithms/normalization/zscore_types.h | 16 +++++------ .../distributions/normal/normal_types_fpt.cpp | 2 +- cpp/daal/src/services/service_defines.h | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h b/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h index 4badaf2f495..18d3768c52d 100644 --- a/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h +++ b/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h @@ -448,7 +448,7 @@ class DistributedContainer : public T * - Result class */ template -class DAAL_EXPORT Distributed +class Distributed {}; /** @@ -465,7 +465,7 @@ class DAAL_EXPORT Distributed * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -585,7 +585,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -705,7 +705,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -827,7 +827,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -949,7 +949,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1070,7 +1070,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1192,7 +1192,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1298,7 +1298,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1418,7 +1418,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1544,7 +1544,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1664,7 +1664,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1784,7 +1784,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1904,7 +1904,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_distributed.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_distributed.h index 20a1a5966aa..ee8c15f5bf3 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_distributed.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_distributed.h @@ -123,7 +123,7 @@ class DistributedContainer : public Tr * - \ref Method Initialization methods of the implicit ALS algorithm in the distributed processing mode */ template -class DAAL_EXPORT Distributed +class Distributed {}; /** @@ -138,7 +138,7 @@ class DAAL_EXPORT Distributed * - \ref Method Initialization methods of the implicit ALS algorithm in the first step of the distributed processing mode */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::implicit_als::training::init::DistributedInput InputType; @@ -237,7 +237,7 @@ class DAAL_EXPORT Distributed : public Trai * - \ref Method Initialization methods of the implicit ALS algorithm in the second step of the distributed processing mode */ template -class DAAL_EXPORT Distributed : public Training +class Distributed : public Training { public: typedef algorithms::implicit_als::training::init::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/normalization/zscore_types.h b/cpp/daal/include/algorithms/normalization/zscore_types.h index c806f30a728..4cdbb0907d5 100644 --- a/cpp/daal/include/algorithms/normalization/zscore_types.h +++ b/cpp/daal/include/algorithms/normalization/zscore_types.h @@ -113,7 +113,7 @@ namespace interface1 * * \brief %Input objects for the z-score normalization algorithm */ -class DAAL_EXPORT Input : public daal::algorithms::Input +class Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -162,7 +162,7 @@ namespace interface2 * \brief Provides methods to access final results obtained with the compute() method of the * z-score normalization algorithm in the batch processing mode */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -180,7 +180,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of computations */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store final results of the z-score normalization algorithms @@ -190,7 +190,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of computations */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const int method); + services::Status allocate(const daal::algorithms::Input * input, const int method); /** * Returns the final result of the z-score normalization algorithm @@ -245,14 +245,14 @@ namespace interface3 * \brief Class that specifies the parameters of the algorithm in the batch computing mode */ template -class DAAL_EXPORT Parameter +class Parameter {}; /** * * \brief Class that specifies the base parameters of the algorithm in the batch computing mode */ -class DAAL_EXPORT BaseParameter : public daal::algorithms::Parameter +class BaseParameter : public daal::algorithms::Parameter { public: BaseParameter(const bool doScale = true); @@ -265,7 +265,7 @@ class DAAL_EXPORT BaseParameter : public daal::algorithms::Parameter // * \brief Class that specifies the parameters of the default algorithm in the batch computing mode // */ template -class DAAL_EXPORT Parameter : public BaseParameter +class Parameter : public BaseParameter { public: Parameter(const bool doScale = true); @@ -276,7 +276,7 @@ class DAAL_EXPORT Parameter : public BaseParameter // * \brief Class that specifies the parameters of the default algorithm in the batch computing mode // */ template -class DAAL_EXPORT Parameter : public BaseParameter +class Parameter : public BaseParameter { public: /** Constructs z-score normalization parameters */ diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp index b79b9c5ccc6..0a7cf383ce3 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_types_fpt.cpp @@ -36,7 +36,7 @@ namespace interface1 * Check the correctness of the %Parameter object */ template - services::Status Parameter::check() const +services::Status Parameter::check() const { DAAL_CHECK_EX(sigma > 0, services::ErrorIncorrectParameter, services::ParameterName, sigmaStr()); return services::Status(); diff --git a/cpp/daal/src/services/service_defines.h b/cpp/daal/src/services/service_defines.h index 667bd6913e5..c6e0f8f3424 100644 --- a/cpp/daal/src/services/service_defines.h +++ b/cpp/daal/src/services/service_defines.h @@ -71,7 +71,7 @@ DAAL_EXPORT bool daal_check_is_intel_cpu(); #define PRAGMA_ICC_TO_STR(ARGS) #define PRAGMA_ICC_OMP(ARGS) #define PRAGMA_ICC_NO16(ARGS) - #define DAAL_TYPENAME + #define DAAL_TYPENAME typename #else #define PRAGMA_IVDEP #define PRAGMA_NOVECTOR From 1be177bc85a9c97f0ecf9707a60411c27e3c8670 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 09:42:06 -0700 Subject: [PATCH 036/120] minor fixes for typename --- .../algorithms/pca/pca_batchparameter_correlation_fpt.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/pca/pca_batchparameter_correlation_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_batchparameter_correlation_fpt.cpp index e69cd5ac970..32d2bd3fccf 100644 --- a/cpp/daal/src/algorithms/pca/pca_batchparameter_correlation_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_batchparameter_correlation_fpt.cpp @@ -33,18 +33,18 @@ namespace interface3 { /** Constructs PCA parameters */ template -DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & covariance) +BatchParameter::BatchParameter(const services::SharedPtr & covariance) : covariance(covariance) {}; template -DAAL_EXPORT services::Status BatchParameter::check() const +services::Status BatchParameter::check() const { DAAL_CHECK(covariance, services::ErrorNullAuxiliaryAlgorithm); return services::Status(); } -template DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & covariance); -template DAAL_EXPORT services::Status BatchParameter::check() const; +template BatchParameter::BatchParameter(const services::SharedPtr & covariance); +template services::Status BatchParameter::check() const; } // namespace interface3 } // namespace pca } // namespace algorithms From 9c931f4c262c438ca7a3c933f1858b636cbca9ee Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 09:52:07 -0700 Subject: [PATCH 037/120] minor fixes for typename --- .../normalization/zscore/zscore_parameter_fpt.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/daal/src/algorithms/normalization/zscore/zscore_parameter_fpt.cpp b/cpp/daal/src/algorithms/normalization/zscore/zscore_parameter_fpt.cpp index 26637f75c7c..619c132be7b 100644 --- a/cpp/daal/src/algorithms/normalization/zscore/zscore_parameter_fpt.cpp +++ b/cpp/daal/src/algorithms/normalization/zscore/zscore_parameter_fpt.cpp @@ -38,26 +38,26 @@ namespace interface3 { /** Constructs z-score normalization parameters */ template -DAAL_EXPORT Parameter::Parameter(const SharedPtr & moments, const bool doScale) +Parameter::Parameter(const SharedPtr & moments, const bool doScale) : BaseParameter(doScale), moments(moments) {}; /** Constructs z-score normalization parameters */ template -DAAL_EXPORT Parameter::Parameter(const bool doScale) : BaseParameter(doScale) {}; +Parameter::Parameter(const bool doScale) : BaseParameter(doScale) {}; /** * Check the correctness of the %Parameter object */ template -DAAL_EXPORT Status Parameter::check() const +Status Parameter::check() const { DAAL_CHECK(moments.get() != 0, ErrorNullParameterNotSupported); return Status(); } -template DAAL_EXPORT Parameter::Parameter(const SharedPtr & moments, const bool doScale); -template DAAL_EXPORT Parameter::Parameter(const bool doScale); -template DAAL_EXPORT Status Parameter::check() const; +template Parameter::Parameter(const SharedPtr & moments, const bool doScale); +template Parameter::Parameter(const bool doScale); +template Status Parameter::check() const; } // namespace interface3 From 295f29b0a6734ac09d5d4a3db02b4db12213cbb9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 09:55:53 -0700 Subject: [PATCH 038/120] more fixes --- cpp/daal/include/algorithms/pca/pca_types.h | 40 +++++++++---------- .../elastic_net_training_result_fpt.cpp | 4 +- ...mplicit_als_predict_ratings_result_fpt.cpp | 4 +- .../lasso_regression_training_result_fpt.cpp | 4 +- .../linear_model_predict_batch_fpt.cpp | 4 +- .../linear_regression_training_result.h | 4 +- .../normalization/minmax/minmax_fpt.cpp | 4 +- .../normalization/zscore/zscore_fpt.cpp | 8 ++-- .../pca/transform/pca_transform_batch_fpt.cpp | 4 +- .../algorithms/qr/qr_dense_default_batch.h | 6 +-- .../ridge_regression_training_result.h | 4 +- .../algorithms/svd/svd_dense_default_batch.h | 6 +-- 12 files changed, 46 insertions(+), 46 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 8c8472b140b..710db562b9a 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -167,7 +167,7 @@ namespace interface1 /** * * \brief Abstract class that specifies interface for classes that declare input of the PCA algorithm */ -class DAAL_EXPORT InputIface : public daal::algorithms::Input +class InputIface : public daal::algorithms::Input { public: InputIface(size_t nElements); @@ -195,7 +195,7 @@ class DAAL_EXPORT InputIface : public daal::algorithms::Input * * \brief Input objects for the PCA algorithm */ -class DAAL_EXPORT Input : public InputIface +class Input : public InputIface { public: Input(); @@ -269,7 +269,7 @@ class PartialResult : public PartialResultBase * in the online or distributed processing mode */ template <> -class DAAL_EXPORT PartialResult : public PartialResultBase +class PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) @@ -318,7 +318,7 @@ class DAAL_EXPORT PartialResult : publi * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Initializes memory to store partial results of the PCA SVD algorithm @@ -328,7 +328,7 @@ class DAAL_EXPORT PartialResult : publi * \return Status of initialization */ template - DAAL_EXPORT services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); protected: services::Status checkImpl(size_t nFeatures) const; @@ -347,7 +347,7 @@ class DAAL_EXPORT PartialResult : publi * in the online or distributed processing mode */ template <> -class DAAL_EXPORT PartialResult : public PartialResultBase +class PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) @@ -425,7 +425,7 @@ class DAAL_EXPORT PartialResult : public Partia * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Initializes memory to store partial results of the PCA SVD algorithm @@ -435,7 +435,7 @@ class DAAL_EXPORT PartialResult : public Partia * \return Status of initialization */ template - DAAL_EXPORT services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); protected: services::Status checkImpl(size_t nFeatures) const; @@ -453,7 +453,7 @@ class DAAL_EXPORT PartialResult : public Partia * \brief Class that specifies the common parameters of the PCA algorithm */ template -class DAAL_EXPORT BaseParameter : public daal::algorithms::Parameter +class BaseParameter : public daal::algorithms::Parameter { public: /** Constructs PCA parameters */ @@ -473,7 +473,7 @@ class OnlineParameter : public BaseParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the online computing mode */ template -class DAAL_EXPORT OnlineParameter : public BaseParameter +class OnlineParameter : public BaseParameter { public: /** Constructs PCA parameters */ @@ -495,7 +495,7 @@ class DAAL_EXPORT OnlineParameter : public Ba * \brief Class that specifies the parameters of the PCA SVD algorithm in the online computing mode */ template -class DAAL_EXPORT OnlineParameter : public BaseParameter +class OnlineParameter : public BaseParameter { public: /** Constructs PCA parameters */ @@ -521,7 +521,7 @@ class DistributedParameter : public BaseParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the distributed computing mode */ template -class DAAL_EXPORT DistributedParameter : public BaseParameter +class DistributedParameter : public BaseParameter { public: /** Constructs PCA parameters */ @@ -551,7 +551,7 @@ class DistributedInput * \brief Input objects for the PCA Correlation algorithm in the distributed processing mode */ template <> -class DAAL_EXPORT DistributedInput : public InputIface +class DistributedInput : public InputIface { public: DistributedInput(); @@ -604,7 +604,7 @@ class DAAL_EXPORT DistributedInput : public InputIface * \brief Input objects of the PCA SVD algorithm in the distributed processing mode */ template <> -class DAAL_EXPORT DistributedInput : public InputIface +class DistributedInput : public InputIface { public: DistributedInput(); @@ -663,7 +663,7 @@ namespace interface3 * * \brief Class that specifies the common parameters of the PCA Batch algorithms */ -class DAAL_EXPORT BaseBatchParameter : public daal::algorithms::Parameter +class BaseBatchParameter : public daal::algorithms::Parameter { public: /** Constructs PCA parameters */ @@ -689,7 +689,7 @@ class BatchParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the batch computing mode */ template -class DAAL_EXPORT BatchParameter : public BaseBatchParameter +class BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ @@ -711,7 +711,7 @@ class DAAL_EXPORT BatchParameter : public Bas * \brief Class that specifies the parameters of the PCA SVD algorithm in the batch computing mode */ template -class DAAL_EXPORT BatchParameter : public BaseBatchParameter +class BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ @@ -732,7 +732,7 @@ class DAAL_EXPORT BatchParameter : public BaseBatchPa * * \brief Provides methods to access results obtained with the PCA algorithm */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -777,7 +777,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \param[in] method Computation method */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method); + services::Status allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method); /** * Allocates memory for storing partial results of the PCA algorithm * \param[in] partialResult Pointer to an object containing input data @@ -785,7 +785,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \param[in] method Computation method */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, + services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method); /** diff --git a/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp b/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp index 250f8fbec2d..90411bdb860 100755 --- a/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp +++ b/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp @@ -40,7 +40,7 @@ using namespace daal::services; * \param[in] method Computation method for the algorithm */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) { const Input * const in = static_cast(input); @@ -57,7 +57,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const return s; } -template DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, +template services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method); } // namespace training diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp index bae1971fc69..cf65a1240fb 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp @@ -45,7 +45,7 @@ namespace interface1 * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { const InputIface * algInput = static_cast(input); @@ -56,7 +56,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const return st; } -template DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); } // namespace interface1 diff --git a/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp b/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp index 80516608f63..a87693e2b7f 100755 --- a/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp +++ b/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp @@ -40,7 +40,7 @@ using namespace daal::services; * \param[in] method Computation method for the algorithm */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) { const Input * const in = static_cast(input); @@ -57,7 +57,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const return s; } -template DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, +template services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method); } // namespace training diff --git a/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp b/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp index 46103fb4735..71fa3169856 100644 --- a/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp +++ b/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp @@ -38,7 +38,7 @@ using namespace daal::data_management; using daal::data_management::internal::SyclHomogenNumericTable; template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method) { const Input * in = static_cast(input); size_t nVectors = in->get(data)->getNumberOfRows(); @@ -59,7 +59,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const return st; } -template DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); } // namespace prediction diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_training_result.h b/cpp/daal/src/algorithms/linear_regression/linear_regression_training_result.h index 8d625911fba..b5eb2423529 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_training_result.h +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_training_result.h @@ -45,7 +45,7 @@ using namespace daal::services; * \param[in] parameter %Parameter of linear regression model-based training */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) { const Input * in = static_cast(input); @@ -72,7 +72,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const * \param[in] parameter %Parameter of linear regression model-based training */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * partialResult, const Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::PartialResult * partialResult, const Parameter * parameter, const int method) { const PartialResult * partialRes = static_cast(partialResult); diff --git a/cpp/daal/src/algorithms/normalization/minmax/minmax_fpt.cpp b/cpp/daal/src/algorithms/normalization/minmax/minmax_fpt.cpp index 1ce1270c8e8..2b5e3496277 100644 --- a/cpp/daal/src/algorithms/normalization/minmax/minmax_fpt.cpp +++ b/cpp/daal/src/algorithms/normalization/minmax/minmax_fpt.cpp @@ -44,7 +44,7 @@ namespace interface1 * \param[in] method Computation method of the minmax normalization algorithm */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, int method) +Status Result::allocate(const daal::algorithms::Input * input, int method) { DAAL_CHECK(input, ErrorNullInput); @@ -62,7 +62,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, int m return s; } -template DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, int method); +template Status Result::allocate(const daal::algorithms::Input * input, int method); } // namespace interface1 } // namespace minmax diff --git a/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp b/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp index ecddc7b100e..387b7cf97da 100644 --- a/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp +++ b/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp @@ -43,7 +43,7 @@ namespace interface2 * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { auto impl = ResultImpl::cast(getStorage(*this)); DAAL_CHECK(impl, ErrorNullPtr); @@ -56,13 +56,13 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const int method) { return allocate(input, NULL, method); } -template DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const int method); -template DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, +template Status Result::allocate(const daal::algorithms::Input * input, const int method); +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); } // namespace interface2 diff --git a/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp b/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp index 5e336fd0b1c..8c3b7656468 100644 --- a/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp @@ -41,7 +41,7 @@ using namespace daal::data_management; using daal::data_management::internal::SyclHomogenNumericTable; template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method) { const Input * in = static_cast(input); const Parameter * parameter = static_cast(par); @@ -76,7 +76,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const return status; } -template DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); } // namespace transform diff --git a/cpp/daal/src/algorithms/qr/qr_dense_default_batch.h b/cpp/daal/src/algorithms/qr/qr_dense_default_batch.h index 9f994f03dc6..5bb57c09ccc 100644 --- a/cpp/daal/src/algorithms/qr/qr_dense_default_batch.h +++ b/cpp/daal/src/algorithms/qr/qr_dense_default_batch.h @@ -42,7 +42,7 @@ namespace interface1 * \param[in] method Algorithm method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { const Input * in = static_cast(input); return allocateImpl(in->get(data)->getNumberOfColumns(), in->get(data)->getNumberOfRows()); @@ -55,7 +55,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const * \param[in] method Algorithm method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) { const OnlinePartialResult * in = static_cast(partialResult); return allocateImpl(in->getNumberOfColumns(), in->getNumberOfRows()); @@ -68,7 +68,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * part * \param[in] n Number of rows in the input data set */ template -DAAL_EXPORT Status Result::allocateImpl(size_t m, size_t n) +Status Result::allocateImpl(size_t m, size_t n) { Status s; if (n == 0) diff --git a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_training_result.h b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_training_result.h index d03ed2933f1..873ccc46a72 100644 --- a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_training_result.h +++ b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_training_result.h @@ -44,7 +44,7 @@ using namespace daal::services; * \param[in] method Computation method for the algorithm */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method) { const Input * const in = static_cast(input); @@ -66,7 +66,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const // * \param[in] parameter %Parameter of ridge regression model-based training template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * partialResult, const Parameter * parameter, int method) +Status Result::allocate(const daal::algorithms::PartialResult * partialResult, const Parameter * parameter, int method) { const PartialResult * const partialRes = static_cast(partialResult); diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h b/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h index fb008e0956b..14e3e396003 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h @@ -43,7 +43,7 @@ namespace interface1 * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { const Input * in = static_cast(input); return allocateImpl(in->get(data)->getNumberOfColumns(), in->get(data)->getNumberOfRows()); @@ -56,7 +56,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) { const OnlinePartialResult * in = static_cast(partialResult); return allocateImpl(in->getNumberOfColumns(), in->getNumberOfRows()); @@ -69,7 +69,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * part * \param[in] n Number of rows in the input data set */ template -DAAL_EXPORT Status Result::allocateImpl(size_t m, size_t n) +Status Result::allocateImpl(size_t m, size_t n) { Status st; set(singularValues, HomogenNumericTable::create(m, 1, NumericTable::doAllocate, &st)); From 1672a4da0e6c0a9f8b7061245aff2f48468e68a3 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 10:10:52 -0700 Subject: [PATCH 039/120] more fixes --- .../src/algorithms/pca/pca_batchparameter_svd_fpt.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp index 831f8fe56b0..0c8e4e26e10 100644 --- a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp @@ -33,20 +33,20 @@ namespace interface3 { /** Constructs PCA parameters */ template -DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & normalization) +BatchParameter::BatchParameter(const services::SharedPtr & normalization) : normalization(normalization) {}; template -DAAL_EXPORT services::Status BatchParameter::check() const +services::Status BatchParameter::check() const { DAAL_CHECK(normalization, services::ErrorNullAuxiliaryAlgorithm); return services::Status(); } -template DAAL_EXPORT BatchParameter::BatchParameter( +template BatchParameter::BatchParameter( const services::SharedPtr & normalization); -template DAAL_EXPORT services::Status BatchParameter::check() const; +template services::Status BatchParameter::check() const; } // namespace interface3 } // namespace pca From db46db7129a4f3653f5420adda2540a04bc76618 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 10:18:41 -0700 Subject: [PATCH 040/120] rm error flag --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 2186dfea94e..68af5648576 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -33,7 +33,7 @@ COMPILER.lnx.icx = icx -m64 \ -Werror -Wreturn-type -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Wno-error -Qopenmp-simd -Wno-deprecated-declarations -Wno-error=unused-command-line-argument +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 From c1c72e20d6afcfc5580c430661360a17747063e8 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 10:27:52 -0700 Subject: [PATCH 041/120] rm error flag --- cpp/daal/src/algorithms/low_order_moments/moments_batch.h | 4 ++-- cpp/daal/src/algorithms/pca/pca_result_fpt.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/daal/src/algorithms/low_order_moments/moments_batch.h b/cpp/daal/src/algorithms/low_order_moments/moments_batch.h index 62b2e52a9c4..0c96c62d6ac 100644 --- a/cpp/daal/src/algorithms/low_order_moments/moments_batch.h +++ b/cpp/daal/src/algorithms/low_order_moments/moments_batch.h @@ -42,7 +42,7 @@ namespace low_order_moments * \param[in] method Computation method */ template -DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { services::Status s; size_t nFeatures = 0; @@ -78,7 +78,7 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * in * \param[in] method Computation method */ template -DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, +services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) { size_t nFeatures; diff --git a/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp index 23586838dcc..5336d9bbea9 100644 --- a/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp @@ -38,7 +38,7 @@ namespace interface3 * \param[in] method Computation method */ template -DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method) +services::Status Result::allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method) { size_t nComponents = 0; DAAL_UINT64 resultsToCompute = eigenvalue; @@ -63,7 +63,7 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * in * \param[in] method Computation method */ template -DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, +services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method) { size_t nComponents = 0; @@ -75,9 +75,9 @@ DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialRes return impl->allocate(partialResult, nComponents, resultsToCompute); } -template DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, +template services::Status Result::allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method); -template DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, +template services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method); } // namespace interface3 From 8ec1601734c6680f38102665e9989a786474a258 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 10:35:03 -0700 Subject: [PATCH 042/120] minor fixes --- cpp/daal/include/algorithms/pca/pca_distributed.h | 8 ++++---- cpp/daal/include/algorithms/pca/pca_online.h | 6 +++--- .../algorithms/pca/pca_distributedparameter_correlation.h | 4 ++-- .../src/algorithms/pca/pca_onlineparameter_correlation.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_distributed.h b/cpp/daal/include/algorithms/pca/pca_distributed.h index d573e3458f9..3a80ed2a40a 100644 --- a/cpp/daal/include/algorithms/pca/pca_distributed.h +++ b/cpp/daal/include/algorithms/pca/pca_distributed.h @@ -152,7 +152,7 @@ class DistributedContainer : public * - \ref interface1::DistributedParameter class */ template -class DAAL_EXPORT Distributed : public Analysis +class Distributed : public Analysis {}; /** @@ -170,7 +170,7 @@ class DAAL_EXPORT Distributed : public Analysis * - \ref interface1::DistributedParameter class */ template -class DAAL_EXPORT Distributed : public Online +class Distributed : public Online { public: typedef Online super; @@ -218,7 +218,7 @@ class DAAL_EXPORT Distributed : public Onli * \tparam algorithmFPType Data type to use in intermediate computations of the PCA algorithm, double or float */ template -class DAAL_EXPORT Distributed : public Analysis +class Distributed : public Analysis { public: typedef algorithms::pca::DistributedInput InputType; @@ -348,7 +348,7 @@ class DAAL_EXPORT Distributed : * \tparam algorithmFPType Data type to use in intermediate computations of the PCA algorithm, double or float */ template -class DAAL_EXPORT Distributed : public Analysis +class Distributed : public Analysis { public: typedef algorithms::pca::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/pca/pca_online.h b/cpp/daal/include/algorithms/pca/pca_online.h index 61c544bba7e..7ad7bf9e06a 100644 --- a/cpp/daal/include/algorithms/pca/pca_online.h +++ b/cpp/daal/include/algorithms/pca/pca_online.h @@ -113,7 +113,7 @@ class OnlineContainer : public AnalysisContainer * \tparam algorithmFPType Data type to use in intermediate computations of the PCA algorithm, double or float */ template -class DAAL_EXPORT Online : public Analysis +class Online : public Analysis {}; /** @@ -124,7 +124,7 @@ class DAAL_EXPORT Online : public Analysis * \tparam algorithmFPType Data type to use in intermediate computations of the PCA algorithm, double or float */ template -class DAAL_EXPORT Online : public Analysis +class Online : public Analysis { public: typedef algorithms::pca::Input InputType; @@ -250,7 +250,7 @@ class DAAL_EXPORT Online : public Analysis -class DAAL_EXPORT Online : public Analysis +class Online : public Analysis { public: typedef algorithms::pca::Input InputType; diff --git a/cpp/daal/src/algorithms/pca/pca_distributedparameter_correlation.h b/cpp/daal/src/algorithms/pca/pca_distributedparameter_correlation.h index 1a27e0bc182..8bd4b9800b7 100644 --- a/cpp/daal/src/algorithms/pca/pca_distributedparameter_correlation.h +++ b/cpp/daal/src/algorithms/pca/pca_distributedparameter_correlation.h @@ -34,12 +34,12 @@ namespace pca { /** Constructs PCA parameters */ template -DAAL_EXPORT DistributedParameter::DistributedParameter( +DistributedParameter::DistributedParameter( const services::SharedPtr > & covariance) : covariance(covariance) {}; template -DAAL_EXPORT services::Status DistributedParameter::check() const +services::Status DistributedParameter::check() const { DAAL_CHECK(covariance, services::ErrorNullAuxiliaryAlgorithm); return services::Status(); diff --git a/cpp/daal/src/algorithms/pca/pca_onlineparameter_correlation.h b/cpp/daal/src/algorithms/pca/pca_onlineparameter_correlation.h index 5e4dfd21010..4b3191f4d0c 100644 --- a/cpp/daal/src/algorithms/pca/pca_onlineparameter_correlation.h +++ b/cpp/daal/src/algorithms/pca/pca_onlineparameter_correlation.h @@ -34,11 +34,11 @@ namespace pca { /** Constructs PCA parameters */ template -DAAL_EXPORT OnlineParameter::OnlineParameter(const services::SharedPtr & covariance) +OnlineParameter::OnlineParameter(const services::SharedPtr & covariance) : covariance(covariance) {}; template -DAAL_EXPORT services::Status OnlineParameter::check() const +services::Status OnlineParameter::check() const { DAAL_CHECK(covariance, services::ErrorNullAuxiliaryAlgorithm); return services::Status(); From 59672a72db13e3cbced3db4b74b46eb30de0f68d Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 10:36:41 -0700 Subject: [PATCH 043/120] minor fixes --- cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp index 25456e4dbb5..cd4a2ff2b12 100644 --- a/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp @@ -29,9 +29,9 @@ namespace algorithms { namespace pca { -template DAAL_EXPORT services::Status PartialResult::allocate(const daal::algorithms::Input * input, +template services::Status PartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); -template DAAL_EXPORT services::Status PartialResult::initialize(const daal::algorithms::Input * input, +template services::Status PartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); From dfaea38fa0996713b9684f2e89238a43b9af4486 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 11:40:25 -0700 Subject: [PATCH 044/120] fix for pca --- cpp/daal/include/algorithms/pca/pca_types.h | 3 +-- .../elastic_net/elastic_net_training_result_fpt.cpp | 3 +-- .../implicit_als_predict_ratings_result_fpt.cpp | 3 +-- .../lasso_regression_training_result_fpt.cpp | 3 +-- .../linear_model/linear_model_predict_batch_fpt.cpp | 3 +-- .../src/algorithms/low_order_moments/moments_batch.h | 3 +-- .../src/algorithms/normalization/zscore/zscore_fpt.cpp | 3 +-- .../src/algorithms/pca/pca_batchparameter_svd_fpt.cpp | 3 +-- cpp/daal/src/algorithms/pca/pca_onlineparameter_svd.h | 4 ++-- .../src/algorithms/pca/pca_onlineparameter_svd_fpt.cpp | 4 ++-- .../src/algorithms/pca/pca_partialresult_correlation.h | 8 ++++---- .../pca/pca_partialresult_correlation_fpt.cpp | 10 ++++------ cpp/daal/src/algorithms/pca/pca_partialresult_svd.h | 8 ++++---- .../src/algorithms/pca/pca_partialresult_svd_fpt.cpp | 5 ++--- cpp/daal/src/algorithms/pca/pca_result_fpt.cpp | 7 +++---- .../pca/transform/pca_transform_batch_fpt.cpp | 3 +-- 16 files changed, 30 insertions(+), 43 deletions(-) mode change 100755 => 100644 cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp mode change 100755 => 100644 cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 710db562b9a..b2b46d7a2e6 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -785,8 +785,7 @@ class Result : public daal::algorithms::Result * \param[in] method Computation method */ template - services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, - const Method method); + services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method); /** * Checks the results of the PCA algorithm diff --git a/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp b/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp old mode 100755 new mode 100644 index 90411bdb860..fabfcca4732 --- a/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp +++ b/cpp/daal/src/algorithms/elastic_net/elastic_net_training_result_fpt.cpp @@ -57,8 +57,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const Parameter * return s; } -template services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, - const int method); +template services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method); } // namespace training } // namespace elastic_net diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp index cf65a1240fb..69f446d9a95 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_result_fpt.cpp @@ -56,8 +56,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const daal::algor return st; } -template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method); +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); } // namespace interface1 } // namespace ratings diff --git a/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp b/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp old mode 100755 new mode 100644 index a87693e2b7f..e4a30bc18f2 --- a/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp +++ b/cpp/daal/src/algorithms/lasso_regression/lasso_regression_training_result_fpt.cpp @@ -57,8 +57,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const Parameter * return s; } -template services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, - const int method); +template services::Status Result::allocate(const daal::algorithms::Input * input, const Parameter * parameter, const int method); } // namespace training } // namespace lasso_regression diff --git a/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp b/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp index 71fa3169856..1af54e3c23a 100644 --- a/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp +++ b/cpp/daal/src/algorithms/linear_model/linear_model_predict_batch_fpt.cpp @@ -59,8 +59,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const daal::algor return st; } -template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, - const int method); +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); } // namespace prediction } // namespace linear_model diff --git a/cpp/daal/src/algorithms/low_order_moments/moments_batch.h b/cpp/daal/src/algorithms/low_order_moments/moments_batch.h index 0c96c62d6ac..c1b83a47a84 100644 --- a/cpp/daal/src/algorithms/low_order_moments/moments_batch.h +++ b/cpp/daal/src/algorithms/low_order_moments/moments_batch.h @@ -78,8 +78,7 @@ services::Status Result::allocate(const daal::algorithms::Input * input, const d * \param[in] method Computation method */ template -services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, - const int method) +services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) { size_t nFeatures; services::Status s; diff --git a/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp b/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp index 387b7cf97da..243a0ca679a 100644 --- a/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp +++ b/cpp/daal/src/algorithms/normalization/zscore/zscore_fpt.cpp @@ -62,8 +62,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const int method) } template Status Result::allocate(const daal::algorithms::Input * input, const int method); -template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method); +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); } // namespace interface2 } // namespace zscore diff --git a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp index 0c8e4e26e10..2a09f1b771e 100644 --- a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp @@ -43,8 +43,7 @@ services::Status BatchParameter::check() const return services::Status(); } -template BatchParameter::BatchParameter( - const services::SharedPtr & normalization); +template BatchParameter::BatchParameter(const services::SharedPtr & normalization); template services::Status BatchParameter::check() const; diff --git a/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd.h b/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd.h index 721828b1efd..87cffd2abb4 100644 --- a/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd.h +++ b/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd.h @@ -34,10 +34,10 @@ namespace pca { /** Constructs PCA parameters */ template -DAAL_EXPORT OnlineParameter::OnlineParameter() {}; +OnlineParameter::OnlineParameter() {}; template -DAAL_EXPORT services::Status OnlineParameter::check() const +services::Status OnlineParameter::check() const { return services::Status(); } diff --git a/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd_fpt.cpp index 7fe5953d3b5..264f2902201 100644 --- a/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_onlineparameter_svd_fpt.cpp @@ -29,8 +29,8 @@ namespace algorithms { namespace pca { -template DAAL_EXPORT OnlineParameter::OnlineParameter(); -template DAAL_EXPORT services::Status OnlineParameter::check() const; +template OnlineParameter::OnlineParameter(); +template services::Status OnlineParameter::check() const; } // namespace pca } // namespace algorithms diff --git a/cpp/daal/src/algorithms/pca/pca_partialresult_correlation.h b/cpp/daal/src/algorithms/pca/pca_partialresult_correlation.h index 9d3052175de..462bd3743dc 100644 --- a/cpp/daal/src/algorithms/pca/pca_partialresult_correlation.h +++ b/cpp/daal/src/algorithms/pca/pca_partialresult_correlation.h @@ -42,8 +42,8 @@ using daal::data_management::internal::SyclHomogenNumericTable; * \param[in] method Computation method */ template -DAAL_EXPORT services::Status PartialResult::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, const int method) +services::Status PartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method) { services::Status s; @@ -75,8 +75,8 @@ DAAL_EXPORT services::Status PartialResult::allocate(const daa }; template -DAAL_EXPORT services::Status PartialResult::initialize(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, const int method) +services::Status PartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method) { services::Status s; DAAL_CHECK_STATUS(s, get(nObservationsCorrelation)->assign((algorithmFPType)0.0)) diff --git a/cpp/daal/src/algorithms/pca/pca_partialresult_correlation_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_partialresult_correlation_fpt.cpp index ba577dedc2b..cc403b6ca3b 100644 --- a/cpp/daal/src/algorithms/pca/pca_partialresult_correlation_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_partialresult_correlation_fpt.cpp @@ -29,12 +29,10 @@ namespace algorithms { namespace pca { -template DAAL_EXPORT services::Status PartialResult::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, - const int method); -template DAAL_EXPORT services::Status PartialResult::initialize(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, - const int method); +template services::Status PartialResult::allocate(const daal::algorithms::Input * input, + const daal::algorithms::Parameter * parameter, const int method); +template services::Status PartialResult::initialize(const daal::algorithms::Input * input, + const daal::algorithms::Parameter * parameter, const int method); } // namespace pca } // namespace algorithms diff --git a/cpp/daal/src/algorithms/pca/pca_partialresult_svd.h b/cpp/daal/src/algorithms/pca/pca_partialresult_svd.h index a4ffc43435a..4d45de1a8f8 100644 --- a/cpp/daal/src/algorithms/pca/pca_partialresult_svd.h +++ b/cpp/daal/src/algorithms/pca/pca_partialresult_svd.h @@ -41,8 +41,8 @@ namespace pca * \param[in] method Computation method */ template -DAAL_EXPORT services::Status PartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method) +services::Status PartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method) { services::Status s; set(nObservationsSVD, HomogenNumericTable::create(1, 1, NumericTableIface::doAllocate, 0, &s)); @@ -55,8 +55,8 @@ DAAL_EXPORT services::Status PartialResult::allocate(const daal::algor }; template -DAAL_EXPORT services::Status PartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method) +services::Status PartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method) { services::Status s; DAAL_CHECK_STATUS(s, get(nObservationsSVD)->assign((algorithmFPType)0.0)) diff --git a/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp index cd4a2ff2b12..f0697662c99 100644 --- a/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_partialresult_svd_fpt.cpp @@ -30,10 +30,9 @@ namespace algorithms namespace pca { template services::Status PartialResult::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, const int method); + const daal::algorithms::Parameter * parameter, const int method); template services::Status PartialResult::initialize(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, - const int method); + const daal::algorithms::Parameter * parameter, const int method); } // namespace pca } // namespace algorithms diff --git a/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp index 5336d9bbea9..58ecaeb939c 100644 --- a/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_result_fpt.cpp @@ -63,8 +63,7 @@ services::Status Result::allocate(const daal::algorithms::Input * input, daal::a * \param[in] method Computation method */ template -services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, - const Method method) +services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method) { size_t nComponents = 0; DAAL_UINT64 resultsToCompute = eigenvalue; @@ -76,9 +75,9 @@ services::Status Result::allocate(const daal::algorithms::PartialResult * partia } template services::Status Result::allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, - const Method method); + const Method method); template services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, - daal::algorithms::Parameter * parameter, const Method method); + daal::algorithms::Parameter * parameter, const Method method); } // namespace interface3 } // namespace pca diff --git a/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp b/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp index 8c3b7656468..973f5e84832 100644 --- a/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/transform/pca_transform_batch_fpt.cpp @@ -76,8 +76,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const daal::algor return status; } -template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, - const int method); +template Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); } // namespace transform } // namespace pca From da74329e90deb22b2b205b0d1a74ca060eebf5e8 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 12:09:41 -0700 Subject: [PATCH 045/120] fix flags --- dev/make/compiler_definitions/icx.mkl.32e.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 68af5648576..0b139177d1c 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -43,8 +43,13 @@ pedantic.opts.icx = -pedantic \ -Wwritable-strings \ -Wno-unused-parameter +pedantic.opts.icx_win = -Wall \ + -Wextra \ + -Wwritable-strings \ + -Wno-unused-parameter + pedantic.opts.lnx.icx = $(pedantic.opts.icx) -pedantic.opts.win.icx = $(pedantic.opts.icx) +pedantic.opts.win.icx = $(pedantic.opts.icx_win) p4_OPT.icx = -march=nocona mc3_OPT.icx = -march=nehalem From 44227fe800368ca6fde075164954e06ce5d27ba9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 12:19:46 -0700 Subject: [PATCH 046/120] restoring icc --- .ci/scripts/describe_system.sh | 4 + .../src/externals/core_threading_win_dll.cpp | 4 + dev/bazel/flags.bzl | 11 ++ dev/bazel/toolchains/cc_toolchain_lnx.bzl | 3 + dev/bazel/toolchains/common.bzl | 2 + dev/make/compiler_definitions/icc.mkl.32e.mk | 106 +++++++++--------- dev/make/deps.mk | 2 + dev/make/function_definitions/32e.mk | 2 +- 8 files changed, 80 insertions(+), 54 deletions(-) diff --git a/.ci/scripts/describe_system.sh b/.ci/scripts/describe_system.sh index e31e884b5c8..bca87e85263 100755 --- a/.ci/scripts/describe_system.sh +++ b/.ci/scripts/describe_system.sh @@ -50,6 +50,10 @@ if [ -x "$(command -v clang)" ]; then echo "Clang:" clang --version fi +if [ -x "$(command -v icc)" ]; then + echo "ICC:" + icc --version +fi if [ -x "$(command -v icx)" ]; then echo "ICX:" icx --version diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 2176fe1b1ed..617016a0e2e 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -41,7 +41,11 @@ daal::services::Environment::LibraryThreadingType __daal_serv_get_thr_set(); DAAL_EXPORT HMODULE load_onedal_thread_dll() { +#ifdef _DEBUG + return DAAL_LOAD_DLL("onedal_threadd.2.dll"); +#else return DAAL_LOAD_DLL("onedal_thread.2.dll"); +#endif } static void load_daal_thr_dll(void) diff --git a/dev/bazel/flags.bzl b/dev/bazel/flags.bzl index 69ce4c6f8d1..71d5f3b867f 100644 --- a/dev/bazel/flags.bzl +++ b/dev/bazel/flags.bzl @@ -41,6 +41,12 @@ def get_default_flags(arch_id, os_id, compiler_id, category = "common"): _check_flag_category(category) if os_id == "lnx": flags = lnx_cc_flags[category] + if compiler_id == "icc" and category == "common": + flags = flags + [ + "-qopenmp-simd", + "-mGLOB_freestanding=TRUE", + "-mCG_no_libirc=TRUE", + ] if compiler_id == "icx" and category == "common": flags = flags + [ "-qopenmp-simd", @@ -69,6 +75,11 @@ def get_cpu_flags(arch_id, os_id, compiler_id): sse42 = ["-march=corei7"] avx2 = ["-march=haswell"] avx512 = ["-march=haswell"] + elif compiler_id == "icc": + sse2 = ["-xSSE2"] + sse42 = ["-xSSE4.2"] + avx2 = ["-xCORE-AVX2"] + avx512 = ["-xCORE-AVX512", "-qopt-zmm-usage=high"] elif compiler_id in ["icx", "icpx"]: sse2 = ["-march=nocona"] sse42 = ["-march=nehalem"] diff --git a/dev/bazel/toolchains/cc_toolchain_lnx.bzl b/dev/bazel/toolchains/cc_toolchain_lnx.bzl index e1cf9e06e3a..4dd36108503 100644 --- a/dev/bazel/toolchains/cc_toolchain_lnx.bzl +++ b/dev/bazel/toolchains/cc_toolchain_lnx.bzl @@ -292,6 +292,9 @@ def configure_cc_toolchain_lnx(repo_ctx, reqs): tools.cc, "-pass-exit-codes", ) + + ( + ["-no-cilk", "-static-intel"] if reqs.compiler_id == "icc" else [] + ) + ( ["-static-intel"] if reqs.compiler_id in ["icx", "icpx"] else [] ) + diff --git a/dev/bazel/toolchains/common.bzl b/dev/bazel/toolchains/common.bzl index 23d83742880..73b846d1f46 100644 --- a/dev/bazel/toolchains/common.bzl +++ b/dev/bazel/toolchains/common.bzl @@ -66,6 +66,8 @@ def detect_compiler(repo_ctx, os_id): return "icx" elif "icpx" in compiler_path: return "icpx" + elif "icc" in compiler_path: + return "icc" def get_starlark_dict(dictionary): entries = [ "\"{}\":\"{}\"".format(k, v) for k, v in dictionary.items() ] diff --git a/dev/make/compiler_definitions/icc.mkl.32e.mk b/dev/make/compiler_definitions/icc.mkl.32e.mk index e4e500a334b..a6ff2410ecc 100644 --- a/dev/make/compiler_definitions/icc.mkl.32e.mk +++ b/dev/make/compiler_definitions/icc.mkl.32e.mk @@ -1,53 +1,53 @@ -# #=============================================================================== -# # Copyright 2012 Intel Corporation -# # -# # Licensed under the Apache License, Version 2.0 (the "License"); -# # you may not use this file except in compliance with the License. -# # You may obtain a copy of the License at -# # -# # http://www.apache.org/licenses/LICENSE-2.0 -# # -# # Unless required by applicable law or agreed to in writing, software -# # distributed under the License is distributed on an "AS IS" BASIS, -# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# # See the License for the specific language governing permissions and -# # limitations under the License. -# #=============================================================================== - -# #++ -# # Intel compiler definitions for makefile -# #-- - -# PLATs.icc = lnx32e win32e mac32e - -# CMPLRDIRSUFF.icc = - -# CORE.SERV.COMPILER.icc = generic -# -DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) - -# -Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE -# -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) - -# COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ -# -Werror -Wreturn-type -diag-disable=10441 -# COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) -# COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 -# COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ -# -Werror -Wreturn-type -diag-disable=10441 - -# link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 -# link.dynamic.mac.icc = icc -diag-disable=10441 - -# pedantic.opts.lnx.icc = -pedantic \ -# -Wall \ -# -Wextra \ -# -Wno-unused-parameter - -# daaldep.lnx32e.rt.icc = -static-intel -# daaldep.lnx32.rt.icc = -static-intel - -# p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) -# mc3_OPT.icc = $(-Q)xSSE4.2 -# avx2_OPT.icc = $(-Q)xCORE-AVX2 -# skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high -# #TODO add march opts in GCC style +#=============================================================================== +# Copyright 2012 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#=============================================================================== + +#++ +# Intel compiler definitions for makefile +#-- + +PLATs.icc = lnx32e win32e mac32e + +CMPLRDIRSUFF.icc = + +CORE.SERV.COMPILER.icc = generic +-DEBC.icc = $(if $(OS_is_win),-debug:all -Z7,-g) + +-Zl.icc = $(if $(OS_is_win),-Zl,) -mGLOB_freestanding=TRUE -mCG_no_libirc=TRUE +-Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) + +COMPILER.lnx.icc = $(if $(COVFILE),cov01 -1; covc --no-banner -i )icc -qopenmp-simd \ + -Werror -Wreturn-type -diag-disable=10441 +COMPILER.lnx.icc += $(if $(COVFILE), $(-Q)m64) +COMPILER.win.icc = icl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX -Qopenmp-simd -Qdiag-disable:10441 +COMPILER.mac.icc = icc -stdlib=libc++ -mmacosx-version-min=10.15 \ + -Werror -Wreturn-type -diag-disable=10441 + +link.dynamic.lnx.icc = icc -no-cilk -diag-disable=10441 +link.dynamic.mac.icc = icc -diag-disable=10441 + +pedantic.opts.lnx.icc = -pedantic \ + -Wall \ + -Wextra \ + -Wno-unused-parameter + +daaldep.lnx32e.rt.icc = -static-intel +daaldep.lnx32.rt.icc = -static-intel + +p4_OPT.icc = $(-Q)$(if $(OS_is_mac),march=pentium4,xSSE2) +mc3_OPT.icc = $(-Q)xSSE4.2 +avx2_OPT.icc = $(-Q)xCORE-AVX2 +skx_OPT.icc = $(-Q)xCORE-AVX512 $(-Qopt)zmm-usage=high +#TODO add march opts in GCC style diff --git a/dev/make/deps.mk b/dev/make/deps.mk index 6f95fba1370..07c5d37971c 100644 --- a/dev/make/deps.mk +++ b/dev/make/deps.mk @@ -77,6 +77,8 @@ $1 = $$(if $$(or $$(.sources-changed),$$(and $$(.mkfiles-changed),$$(call .trigg # Enhance build commands with support for dependency generation # (does not depend on macro from which particular command if called, only on command executable name) dep-gen-enhanced-common = $(call $(SELF),$1 $(.copt-gen-deps)) && $(.keep-raw-deps) sed -n $(sed.-i) $(sed.fix-deps) $(sed.rm-abs-paths) -e '/./{ p; $(sed.mk-phony-targets)}' $(.dep-file-tmp) +dep-gen-enhanced.icc = $(dep-gen-enhanced-common) +dep-gen-enhanced.icl = $(dep-gen-enhanced-common) dep-gen-enhanced.icx = $(dep-gen-enhanced-common) dep-gen-enhanced.g++ = $(dep-gen-enhanced-common) dep-gen-enhanced.dpcpp = $(if $(OS_is_win),,$(dep-gen-enhanced-common)) diff --git a/dev/make/function_definitions/32e.mk b/dev/make/function_definitions/32e.mk index 720e9711c6b..cfee5fc4a11 100644 --- a/dev/make/function_definitions/32e.mk +++ b/dev/make/function_definitions/32e.mk @@ -19,7 +19,7 @@ ifeq ($(filter mkl ref,$(BACKEND_CONFIG)),) Supported config for '$(PLAT)' are ['mkl', 'ref']) endif -COMPILERs = icx gnu clang vc +COMPILERs = icc icx gnu clang vc COMPILER ?= icx CPUs := sse2 sse42 avx2 avx512 CPUs.files := nrh neh hsw skx From 11ca8a5d9468e61634d823f6b273957023dc49c6 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 12:46:42 -0700 Subject: [PATCH 047/120] fix for eternals --- cpp/daal/src/externals/service_stat_mkl.h | 118 +++++++++++----------- cpp/daal/src/externals/service_stat_ref.h | 118 +++++++++++----------- 2 files changed, 118 insertions(+), 118 deletions(-) diff --git a/cpp/daal/src/externals/service_stat_mkl.h b/cpp/daal/src/externals/service_stat_mkl.h index 8d184cba43e..92c081c0167 100644 --- a/cpp/daal/src/externals/service_stat_mkl.h +++ b/cpp/daal/src/externals/service_stat_mkl.h @@ -93,65 +93,65 @@ extern "C" threadgetlimit getlimit; }; - static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - DAAL_INT i; - - for (i = 0; i < n; i++) - { - func(i, 0, 1, a); - } - } - - static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - DAAL_INT i; - - for (i = 0; i < n; i++) - { - func(i, 0, 1, a); - } - } - - static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) - { - func(0, 0, 1, a); - } - - static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - { - func(i, th_idx, th_num, a); - } - - static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() - { - return 1; - } - - static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - fpk_vsl_serv_threader_for(n, threads_request, a, func); - } - - static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); - } - - static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) - { - fpk_vsl_serv_threader_sections(threads_request, a, func); - } - - static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - { - //not used. To be implemented if needed. - } - - static DAAL_INT _daal_mkl_threader_get_max_threads() - { - return fpk_vsl_serv_threader_get_num_threads_limit(); - } + // static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // DAAL_INT i; + + // for (i = 0; i < n; i++) + // { + // func(i, 0, 1, a); + // } + // } + + // static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // DAAL_INT i; + + // for (i = 0; i < n; i++) + // { + // func(i, 0, 1, a); + // } + // } + + // static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) + // { + // func(0, 0, 1, a); + // } + + // static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + // { + // func(i, th_idx, th_num, a); + // } + + // static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() + // { + // return 1; + // } + + // static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // fpk_vsl_serv_threader_for(n, threads_request, a, func); + // } + + // static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); + // } + + // static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) + // { + // fpk_vsl_serv_threader_sections(threads_request, a, func); + // } + + // static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + // { + // //not used. To be implemented if needed. + // } + + // static DAAL_INT _daal_mkl_threader_get_max_threads() + // { + // return fpk_vsl_serv_threader_get_num_threads_limit(); + // } } namespace daal diff --git a/cpp/daal/src/externals/service_stat_ref.h b/cpp/daal/src/externals/service_stat_ref.h index 81a44ce1434..9d819b0c319 100644 --- a/cpp/daal/src/externals/service_stat_ref.h +++ b/cpp/daal/src/externals/service_stat_ref.h @@ -86,65 +86,65 @@ extern "C" threadgetlimit getlimit; }; - static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - DAAL_INT i; - - for (i = 0; i < n; i++) - { - func(i, 0, 1, a); - } - } - - static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - DAAL_INT i; - - for (i = 0; i < n; i++) - { - func(i, 0, 1, a); - } - } - - static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) - { - func(0, 0, 1, a); - } - - static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - { - func(i, th_idx, th_num, a); - } - - static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() - { - return 1; - } - - static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - //fpk_vsl_serv_threader_for(n, threads_request, a, func); - } - - static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - { - //fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); - } - - static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) - { - //fpk_vsl_serv_threader_sections(threads_request, a, func); - } - - static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - { - //not used. To be implemented if needed. - } - - static DAAL_INT _daal_mkl_threader_get_max_threads() - { - return 1; - } + // static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // DAAL_INT i; + + // for (i = 0; i < n; i++) + // { + // func(i, 0, 1, a); + // } + // } + + // static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // DAAL_INT i; + + // for (i = 0; i < n; i++) + // { + // func(i, 0, 1, a); + // } + // } + + // static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) + // { + // func(0, 0, 1, a); + // } + + // static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + // { + // func(i, th_idx, th_num, a); + // } + + // static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() + // { + // return 1; + // } + + // static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // //fpk_vsl_serv_threader_for(n, threads_request, a, func); + // } + + // static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + // { + // //fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); + // } + + // static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) + // { + // //fpk_vsl_serv_threader_sections(threads_request, a, func); + // } + + // static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + // { + // //not used. To be implemented if needed. + // } + + // static DAAL_INT _daal_mkl_threader_get_max_threads() + // { + // return 1; + // } } namespace daal From f5fd80ec4c6d33c736e5482648d6c7a53eda3891 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 13:45:53 -0700 Subject: [PATCH 048/120] maybe unused adding --- cpp/daal/src/externals/service_stat_mkl.h | 118 +++++++++++----------- cpp/daal/src/externals/service_stat_ref.h | 118 +++++++++++----------- 2 files changed, 118 insertions(+), 118 deletions(-) diff --git a/cpp/daal/src/externals/service_stat_mkl.h b/cpp/daal/src/externals/service_stat_mkl.h index 92c081c0167..05ab508589a 100644 --- a/cpp/daal/src/externals/service_stat_mkl.h +++ b/cpp/daal/src/externals/service_stat_mkl.h @@ -93,65 +93,65 @@ extern "C" threadgetlimit getlimit; }; - // static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // DAAL_INT i; - - // for (i = 0; i < n; i++) - // { - // func(i, 0, 1, a); - // } - // } - - // static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // DAAL_INT i; - - // for (i = 0; i < n; i++) - // { - // func(i, 0, 1, a); - // } - // } - - // static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) - // { - // func(0, 0, 1, a); - // } - - // static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - // { - // func(i, th_idx, th_num, a); - // } - - // static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() - // { - // return 1; - // } - - // static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // fpk_vsl_serv_threader_for(n, threads_request, a, func); - // } - - // static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); - // } - - // static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) - // { - // fpk_vsl_serv_threader_sections(threads_request, a, func); - // } - - // static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - // { - // //not used. To be implemented if needed. - // } - - // static DAAL_INT _daal_mkl_threader_get_max_threads() - // { - // return fpk_vsl_serv_threader_get_num_threads_limit(); - // } + [[maybe_unused]] static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + DAAL_INT i; + + for (i = 0; i < n; i++) + { + func(i, 0, 1, a); + } + } + + [[maybe_unused]] static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + DAAL_INT i; + + for (i = 0; i < n; i++) + { + func(i, 0, 1, a); + } + } + + [[maybe_unused]] static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) + { + func(0, 0, 1, a); + } + + [[maybe_unused]] static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + { + func(i, th_idx, th_num, a); + } + + [[maybe_unused]] static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() + { + return 1; + } + + [[maybe_unused]] static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + fpk_vsl_serv_threader_for(n, threads_request, a, func); + } + + [[maybe_unused]] static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); + } + + [[maybe_unused]] static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) + { + fpk_vsl_serv_threader_sections(threads_request, a, func); + } + + [[maybe_unused]] static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + { + //not used. To be implemented if needed. + } + + [[maybe_unused]] static DAAL_INT _daal_mkl_threader_get_max_threads() + { + return fpk_vsl_serv_threader_get_num_threads_limit(); + } } namespace daal diff --git a/cpp/daal/src/externals/service_stat_ref.h b/cpp/daal/src/externals/service_stat_ref.h index 9d819b0c319..acd77e1bf10 100644 --- a/cpp/daal/src/externals/service_stat_ref.h +++ b/cpp/daal/src/externals/service_stat_ref.h @@ -86,65 +86,65 @@ extern "C" threadgetlimit getlimit; }; - // static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // DAAL_INT i; - - // for (i = 0; i < n; i++) - // { - // func(i, 0, 1, a); - // } - // } - - // static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // DAAL_INT i; - - // for (i = 0; i < n; i++) - // { - // func(i, 0, 1, a); - // } - // } - - // static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) - // { - // func(0, 0, 1, a); - // } - - // static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - // { - // func(i, th_idx, th_num, a); - // } - - // static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() - // { - // return 1; - // } - - // static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // //fpk_vsl_serv_threader_for(n, threads_request, a, func); - // } - - // static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) - // { - // //fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); - // } - - // static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) - // { - // //fpk_vsl_serv_threader_sections(threads_request, a, func); - // } - - // static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) - // { - // //not used. To be implemented if needed. - // } - - // static DAAL_INT _daal_mkl_threader_get_max_threads() - // { - // return 1; - // } + [[maybe_unused]] static void _daal_mkl_threader_for_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + DAAL_INT i; + + for (i = 0; i < n; i++) + { + func(i, 0, 1, a); + } + } + + [[maybe_unused]] static void _daal_mkl_threader_for_ordered_sequential(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + DAAL_INT i; + + for (i = 0; i < n; i++) + { + func(i, 0, 1, a); + } + } + + [[maybe_unused]] static void _daal_mkl_threader_sections_sequential(DAAL_INT threads_request, void * a, func_type func) + { + func(0, 0, 1, a); + } + + [[maybe_unused]] static void _daal_mkl_threader_ordered_sequential(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + { + func(i, th_idx, th_num, a); + } + + [[maybe_unused]] static DAAL_INT _daal_mkl_threader_get_max_threads_sequential() + { + return 1; + } + + [[maybe_unused]] static void _daal_mkl_threader_for(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + //fpk_vsl_serv_threader_for(n, threads_request, a, func); + } + + [[maybe_unused]] static void _daal_mkl_threader_for_ordered(DAAL_INT n, DAAL_INT threads_request, void * a, func_type func) + { + //fpk_vsl_serv_threader_for_ordered(n, threads_request, a, func); + } + + [[maybe_unused]] static void _daal_mkl_threader_sections(DAAL_INT threads_request, void * a, func_type func) + { + //fpk_vsl_serv_threader_sections(threads_request, a, func); + } + + [[maybe_unused]] static void _daal_mkl_threader_ordered(DAAL_INT i, DAAL_INT th_idx, DAAL_INT th_num, void * a, func_type func) + { + //not used. To be implemented if needed. + } + + [[maybe_unused]] static DAAL_INT _daal_mkl_threader_get_max_threads() + { + return 1; + } } namespace daal From b9b3e7b870a0f99e1ecb1d61bd441d992fb4c639 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 14:06:30 -0700 Subject: [PATCH 049/120] fix unused variable --- .../oneapi/bf_knn_classification_model_ucapi_impl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h b/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h index 810824f762c..84a66aaf94b 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h @@ -91,8 +91,6 @@ class Model::ModelImpl data_management::BlockDescriptor destBD, srcBD; DAAL_CHECK_STATUS_VAR(dest->getBlockOfRows(0, dest->getNumberOfRows(), data_management::writeOnly, destBD)); DAAL_CHECK_STATUS_VAR(value->getBlockOfRows(0, value->getNumberOfRows(), data_management::readOnly, srcBD)); - auto source = srcBD.getBlockPtr(); - auto destination = destBD.getBlockPtr(); services::internal::daal_memcpy_s( destBD.getBlockPtr(), destBD.getNumberOfColumns() * destBD.getNumberOfRows() * sizeof(algorithmFPType), srcBD.getBlockPtr(), srcBD.getNumberOfColumns() * srcBD.getNumberOfRows() * sizeof(algorithmFPType)); From a6905a1e3abca3e4510fd3355ab2e3568a812cf3 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 14:25:18 -0700 Subject: [PATCH 050/120] back to icx in dpcpp --- dev/make/compiler_definitions/dpcpp.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index c8f1affbe67..848f36c2db1 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -30,12 +30,11 @@ CORE.SERV.COMPILER.dpcpp = generic COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel -COMPILER.win.dpcpp = icpx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -WX \ - -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ - -Werror -Wreturn-type-Wno-deprecated-declarations -fsycl-device-code-split=per_kernel -E -dM +COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ + -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel link.dynamic.lnx.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel -link.dynamic.win.dpcpp = icpx -fsycl -m64 -fsycl-device-code-split=per_kernel +link.dynamic.win.dpcpp = icx -fsycl -m64 -fsycl-device-code-split=per_kernel pedantic.opts.lnx.dpcpp = -pedantic \ -Wall \ From 85b1f23d5c4a159a4831baba1b1bfd251160f614 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 14:53:10 -0700 Subject: [PATCH 051/120] minor fixes --- dev/make/common.mk | 10 +++++----- dev/make/function_definitions/32e.mk | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/make/common.mk b/dev/make/common.mk index fe54740f66c..291ca7e406b 100644 --- a/dev/make/common.mk +++ b/dev/make/common.mk @@ -67,10 +67,10 @@ md5sum.cmd.win = md5sum md5sum.cmd.mac = md5 -q # Enable compiler-provided defences as recommended by Intel Security Development Lifecycle document (SW.01) -secure.opts.icx.win = -GS -secure.opts.icx.lnx = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong +secure.opts.icc.win = -GS +secure.opts.icc.lnx = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -secure.opts.icx.mac = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector +secure.opts.icc.mac = -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector secure.opts.link.win = -DYNAMICBASE -NXCOMPAT secure.opts.link.lnx = -z relro -z now -z noexecstack @@ -81,11 +81,11 @@ RC.COMPILE = rc.exe $(RCOPT) -fo$@ $< # Used as $(eval $(call set_c_compile,$(COMPILER),$(_OS),$(gcc_toolchain)) C.COMPILE = $(if $(COMPILER.$(_OS).$(COMPILER)),$(COMPILER.$(_OS).$(COMPILER)),$(error COMPILER.$(_OS).$(COMPILER) must be defined)) \ $(if $(C.COMPILE.gcc_toolchain),--gcc-toolchain=$(C.COMPILE.gcc_toolchain)) \ - -c $(secure.opts.icx.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< + -c $(secure.opts.icc.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< DPC.COMPILE = $(if $(COMPILER.$(_OS).dpcpp),$(COMPILER.$(_OS).dpcpp),$(error COMPILER.$(_OS).dpcpp must be defined)) \ $(if $(DPC.COMPILE.gcc_toolchain),--gcc-toolchain=$(DPC.COMPILE.gcc_toolchain)) \ - -c $(secure.opts.icx.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< + -c $(secure.opts.icc.$(_OS)) $(COPT) $(INCLUDES) $1 $(-Fo)$@ $< # Enable additional options to follow ISO C++ standards pedantic.opts = $(pedantic.opts.$(_OS).$(COMPILER)) diff --git a/dev/make/function_definitions/32e.mk b/dev/make/function_definitions/32e.mk index cfee5fc4a11..41dfbb96fe9 100644 --- a/dev/make/function_definitions/32e.mk +++ b/dev/make/function_definitions/32e.mk @@ -20,7 +20,7 @@ ifeq ($(filter mkl ref,$(BACKEND_CONFIG)),) endif COMPILERs = icc icx gnu clang vc -COMPILER ?= icx +COMPILER ?= icc CPUs := sse2 sse42 avx2 avx512 CPUs.files := nrh neh hsw skx From 17e4f17dccf98c8328cb30ea7df7aaf68ef56d35 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 14:55:48 -0700 Subject: [PATCH 052/120] add ehsc flag --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 47b3d44f325..f5d9eddc091 100644 --- a/makefile +++ b/makefile @@ -122,7 +122,7 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE -DEBJ := $(if $(REQDBG),-g,-g:none) -DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) --EHsc := $(if $(COMPILER_is_vc),-EHsc,) +-EHsc := $(if $(OS_is_win),-EHsc,) -isystem := $(if $(OS_is_win),-I,-isystem) -sGRP = $(if $(OS_is_lnx),-Wl$(comma)--start-group,) -eGRP = $(if $(OS_is_lnx),-Wl$(comma)--end-group,) From 5905f5f780c56e456fbda552979915cf418912c6 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 15:41:06 -0700 Subject: [PATCH 053/120] minor fix for pca --- cpp/daal/include/algorithms/pca/pca_batch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/pca/pca_batch.h b/cpp/daal/include/algorithms/pca/pca_batch.h index bb3c73d0b3b..63e80ca6dea 100644 --- a/cpp/daal/include/algorithms/pca/pca_batch.h +++ b/cpp/daal/include/algorithms/pca/pca_batch.h @@ -105,7 +105,7 @@ class BatchContainer : public AnalysisContainerI * - \ref Method Computation methods for the algorithm */ template -class DAAL_EXPORT Batch : public Analysis +class Batch : public Analysis { public: typedef algorithms::pca::Input InputType; From afbaf124d8423a0ac70ea2e753514a15733f66a3 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 16:29:28 -0700 Subject: [PATCH 054/120] zscore fix --- cpp/daal/include/algorithms/normalization/zscore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore.h b/cpp/daal/include/algorithms/normalization/zscore.h index 1347e814f31..7fd8acf1995 100644 --- a/cpp/daal/include/algorithms/normalization/zscore.h +++ b/cpp/daal/include/algorithms/normalization/zscore.h @@ -78,7 +78,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * \brief Abstract class that specifies interface of the algorithms * for computing correlation or variance-covariance matrix in the batch processing mode */ -class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis +class PORT BatchImpl : public daal::algorithms::Analysis { public: typedef algorithms::normalization::zscore::Input InputType; @@ -174,7 +174,7 @@ class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis * - daal::algorithms::normalization::zscore::ResulToComputetId Identifiers of z-score normalization optional result to compute */ template -class DAAL_EXPORT Batch : public BatchImpl +class PORT Batch : public BatchImpl { public: typedef BatchImpl super; From 13eebe4923245ec1d0a8c9b8967ef8edd959c8af Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 22:21:49 -0700 Subject: [PATCH 055/120] minor fix --- cpp/daal/include/algorithms/normalization/zscore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore.h b/cpp/daal/include/algorithms/normalization/zscore.h index 7fd8acf1995..53f36728b28 100644 --- a/cpp/daal/include/algorithms/normalization/zscore.h +++ b/cpp/daal/include/algorithms/normalization/zscore.h @@ -78,7 +78,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * \brief Abstract class that specifies interface of the algorithms * for computing correlation or variance-covariance matrix in the batch processing mode */ -class PORT BatchImpl : public daal::algorithms::Analysis +class BatchImpl : public daal::algorithms::Analysis { public: typedef algorithms::normalization::zscore::Input InputType; @@ -174,7 +174,7 @@ class PORT BatchImpl : public daal::algorithms::Analysis * - daal::algorithms::normalization::zscore::ResulToComputetId Identifiers of z-score normalization optional result to compute */ template -class PORT Batch : public BatchImpl +class Batch : public BatchImpl { public: typedef BatchImpl super; From f3403d6e122ded60a8f34bf0994f4ae39774c104 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 15 Apr 2024 23:36:34 -0700 Subject: [PATCH 056/120] fix for pca normalization --- .../src/algorithms/normalization/minmax/minmax_parameter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp index 4753dbd98e7..bc98bac50db 100644 --- a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp +++ b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp @@ -37,14 +37,14 @@ namespace minmax namespace interface1 { /** Constructs min-max normalization parameters */ -DAAL_EXPORT ParameterBase::ParameterBase(double lowerBound, double upperBound, const SharedPtr & moments) +ParameterBase::ParameterBase(double lowerBound, double upperBound, const SharedPtr & moments) : lowerBound(lowerBound), upperBound(upperBound), moments(moments) {} /** * Check the correctness of the %ParameterBase object */ -DAAL_EXPORT Status ParameterBase::check() const +Status ParameterBase::check() const { DAAL_CHECK(moments, ErrorNullParameterNotSupported); DAAL_CHECK(lowerBound < upperBound, ErrorLowerBoundGreaterThanOrEqualToUpperBound); From 6b4b04635bd02fc058ef2eb3f417937ed1142e52 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 00:22:12 -0700 Subject: [PATCH 057/120] add daal_exports --- cpp/daal/include/algorithms/normalization/zscore.h | 4 ++-- cpp/daal/include/algorithms/pca/pca_types.h | 6 +++--- .../algorithms/normalization/minmax/minmax_parameter.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore.h b/cpp/daal/include/algorithms/normalization/zscore.h index 53f36728b28..1347e814f31 100644 --- a/cpp/daal/include/algorithms/normalization/zscore.h +++ b/cpp/daal/include/algorithms/normalization/zscore.h @@ -78,7 +78,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * \brief Abstract class that specifies interface of the algorithms * for computing correlation or variance-covariance matrix in the batch processing mode */ -class BatchImpl : public daal::algorithms::Analysis +class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis { public: typedef algorithms::normalization::zscore::Input InputType; @@ -174,7 +174,7 @@ class BatchImpl : public daal::algorithms::Analysis * - daal::algorithms::normalization::zscore::ResulToComputetId Identifiers of z-score normalization optional result to compute */ template -class Batch : public BatchImpl +class DAAL_EXPORT Batch : public BatchImpl { public: typedef BatchImpl super; diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index b2b46d7a2e6..77b69723a7e 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -663,7 +663,7 @@ namespace interface3 * * \brief Class that specifies the common parameters of the PCA Batch algorithms */ -class BaseBatchParameter : public daal::algorithms::Parameter +class DAAL_EXPORT BaseBatchParameter : public daal::algorithms::Parameter { public: /** Constructs PCA parameters */ @@ -689,7 +689,7 @@ class BatchParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the batch computing mode */ template -class BatchParameter : public BaseBatchParameter +class DAAL_EXPORT BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ @@ -711,7 +711,7 @@ class BatchParameter : public BaseBatchParame * \brief Class that specifies the parameters of the PCA SVD algorithm in the batch computing mode */ template -class BatchParameter : public BaseBatchParameter +class DAAL_EXPORT BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ diff --git a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp index bc98bac50db..4753dbd98e7 100644 --- a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp +++ b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp @@ -37,14 +37,14 @@ namespace minmax namespace interface1 { /** Constructs min-max normalization parameters */ -ParameterBase::ParameterBase(double lowerBound, double upperBound, const SharedPtr & moments) +DAAL_EXPORT ParameterBase::ParameterBase(double lowerBound, double upperBound, const SharedPtr & moments) : lowerBound(lowerBound), upperBound(upperBound), moments(moments) {} /** * Check the correctness of the %ParameterBase object */ -Status ParameterBase::check() const +DAAL_EXPORT Status ParameterBase::check() const { DAAL_CHECK(moments, ErrorNullParameterNotSupported); DAAL_CHECK(lowerBound < upperBound, ErrorLowerBoundGreaterThanOrEqualToUpperBound); From 263ad17e1034d4c71c9e69bacbace12a54d7e0cd Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 00:48:04 -0700 Subject: [PATCH 058/120] minor fix --- cpp/daal/include/algorithms/pca/pca_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 77b69723a7e..f874c8319cd 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -689,7 +689,7 @@ class BatchParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the batch computing mode */ template -class DAAL_EXPORT BatchParameter : public BaseBatchParameter +class BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ @@ -711,7 +711,7 @@ class DAAL_EXPORT BatchParameter : public Bas * \brief Class that specifies the parameters of the PCA SVD algorithm in the batch computing mode */ template -class DAAL_EXPORT BatchParameter : public BaseBatchParameter +class BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ From 6c71642534dfbf6eaeddb5ec1c67e3d6a88f4a24 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 01:29:26 -0700 Subject: [PATCH 059/120] fix daal export --- cpp/daal/include/algorithms/pca/pca_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index f874c8319cd..01e0dcc3256 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -663,7 +663,7 @@ namespace interface3 * * \brief Class that specifies the common parameters of the PCA Batch algorithms */ -class DAAL_EXPORT BaseBatchParameter : public daal::algorithms::Parameter +class BaseBatchParameter : public daal::algorithms::Parameter { public: /** Constructs PCA parameters */ @@ -689,7 +689,7 @@ class BatchParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the batch computing mode */ template -class BatchParameter : public BaseBatchParameter +class DAAL_EXPORT BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ @@ -711,7 +711,7 @@ class BatchParameter : public BaseBatchParame * \brief Class that specifies the parameters of the PCA SVD algorithm in the batch computing mode */ template -class BatchParameter : public BaseBatchParameter +class DAAL_EXPORT BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ From 6481b35575aa8b8cc889bc7ed1140f4b0c6b3bf0 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 02:11:54 -0700 Subject: [PATCH 060/120] minor fix --- .../pca/pca_explained_variance_types.h | 8 ++--- .../pca/pca_quality_metric_set_types.h | 6 ++-- cpp/daal/include/algorithms/pca/pca_types.h | 4 +-- .../pca/transform/pca_transform_types.h | 8 ++--- cpp/daal/include/algorithms/svd/svd_types.h | 36 +++++++++---------- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h index 5660458865f..3f9b37065c7 100644 --- a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h +++ b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h @@ -87,7 +87,7 @@ namespace interface1 * \snippet pca/pca_explained_variance_types.h Parameter source code */ /* [Parameter source code] */ -struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter +struct Parameter : public daal::algorithms::Parameter { Parameter(size_t nFeatures, size_t nComponents); virtual ~Parameter() {} @@ -108,7 +108,7 @@ struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter * * \brief %Input objects for explained variance quality metrics */ -class DAAL_EXPORT Input : public daal::algorithms::Input +class Input : public daal::algorithms::Input { public: DAAL_CAST_OPERATOR(Input) @@ -148,7 +148,7 @@ typedef services::SharedPtr InputPtr; * * \brief Provides interface for the result of linear regression quality metrics */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -179,7 +179,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of computations */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); /** * Checks the result of linear regression quality metrics diff --git a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h index 06badd7b60a..09614cbaed5 100644 --- a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h +++ b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h @@ -64,7 +64,7 @@ namespace interface1 * \snippet pca/pca_quality_metric_set_types.h Parameter source code */ /* [Parameter source code] */ -struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter +struct Parameter : public daal::algorithms::Parameter { Parameter(size_t nComponents = 0, size_t nFeatures = 0); @@ -87,7 +87,7 @@ struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter * \brief Class that implements functionality of the collection of result objects of the quality metrics algorithm * specialized for using with the pca algorithm */ -class DAAL_EXPORT ResultCollection : public algorithms::quality_metric_set::ResultCollection +class ResultCollection : public algorithms::quality_metric_set::ResultCollection { public: ResultCollection() {} @@ -107,7 +107,7 @@ typedef services::SharedPtr ResultCollectionPtr; * \brief Class that implements functionality of the collection of input objects of the quality metrics algorithm * specialized for using with the pca algorithm */ -class DAAL_EXPORT InputDataCollection : public algorithms::quality_metric_set::InputDataCollection +class InputDataCollection : public algorithms::quality_metric_set::InputDataCollection { public: InputDataCollection() {} diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 01e0dcc3256..b2b46d7a2e6 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -689,7 +689,7 @@ class BatchParameter * \brief Class that specifies the parameters of the PCA Correlation algorithm in the batch computing mode */ template -class DAAL_EXPORT BatchParameter : public BaseBatchParameter +class BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ @@ -711,7 +711,7 @@ class DAAL_EXPORT BatchParameter : public Bas * \brief Class that specifies the parameters of the PCA SVD algorithm in the batch computing mode */ template -class DAAL_EXPORT BatchParameter : public BaseBatchParameter +class BatchParameter : public BaseBatchParameter { public: /** Constructs PCA parameters */ diff --git a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h index 480fc109ab8..c97bbc2eff4 100644 --- a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h +++ b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h @@ -106,7 +106,7 @@ namespace interface1 * \brief Input objects for the PCA transformation algorithm in the batch and online processing modes and for the first distributed step of the * algorithm. */ -class DAAL_EXPORT Input : public daal::algorithms::Input +class Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -176,7 +176,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * in the batch processing mode or finalizeCompute() method of algorithm in the online processing mode * or on the second and third steps of the algorithm in the distributed processing mode */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -199,7 +199,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \param[in] method Algorithm method */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Sets an input object for the PCA transformation algorithm @@ -226,7 +226,7 @@ typedef services::SharedPtr * \brief Parameters for the PCA transformation compute method */ -struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter +struct Parameter : public daal::algorithms::Parameter { /** * Parameter constructor diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index 2273a43dab1..6fb41fb4481 100755 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -161,7 +161,7 @@ namespace interface1 * * \brief Parameters for the computation method of the SVD algorithm */ -struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter +struct Parameter : public daal::algorithms::Parameter { /** * Default constructor @@ -181,7 +181,7 @@ struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter * \brief Input objects for the SVD algorithm in the batch processing and online processing modes, and the first step in the distributed * processing mode */ -class DAAL_EXPORT Input : public daal::algorithms::Input +class Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -222,7 +222,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * * \brief %Input objects for the second step of the SVD algorithm in the distributed processing mode */ -class DAAL_EXPORT DistributedStep2Input : public daal::algorithms::Input +class DistributedStep2Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -279,7 +279,7 @@ class DAAL_EXPORT DistributedStep2Input : public daal::algorithms::Input * * \brief %Input objects for the third step of the SVD algorithm in the distributed processing mode */ -class DAAL_EXPORT DistributedStep3Input : public daal::algorithms::Input +class DistributedStep3Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -318,7 +318,7 @@ class DAAL_EXPORT DistributedStep3Input : public daal::algorithms::Input * \brief Provides methods to access partial results obtained with the compute() method of the SVD algorithm in the online processing mode or * the first step in the distributed processing mode */ -class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult +class OnlinePartialResult : public daal::algorithms::PartialResult { public: DECLARE_SERIALIZABLE_CAST(OnlinePartialResult) @@ -335,7 +335,7 @@ class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Initializes additional memory to store partial results of the SVD algorithm for each subsequent compute() method @@ -345,7 +345,7 @@ class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult * \return Status of initialization */ template - DAAL_EXPORT services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates additional memory to store partial results of the SVD algorithm for each subsequent compute() method @@ -355,7 +355,7 @@ class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult * \param[in] par Reference to the object with the algorithm parameters */ template - DAAL_EXPORT services::Status addPartialResultStorage(size_t m, size_t n, Parameter & par); + services::Status addPartialResultStorage(size_t m, size_t n, Parameter & par); /** * Returns partial results of the SVD algorithm @@ -401,7 +401,7 @@ typedef services::SharedPtr OnlinePartialResultPtr; * \brief Provides methods to access final results obtained with the compute() method of the SVD algorithm in the batch processing mode * or with the finalizeCompute() method in the online processing mode or steps 2 and 3 in the distributed processing mode */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -425,7 +425,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store final results of the SVD algorithm @@ -435,7 +435,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, + services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method); /** @@ -470,7 +470,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of allocation */ template - DAAL_EXPORT services::Status allocateImpl(size_t m, size_t n); + services::Status allocateImpl(size_t m, size_t n); protected: /** \private */ @@ -487,7 +487,7 @@ typedef services::SharedPtr ResultPtr; * \brief Provides methods to access partial results obtained with the compute() method of the SVD algorithm in the second step in the * distributed processing mode */ -class DAAL_EXPORT DistributedPartialResult : public daal::algorithms::PartialResult +class DistributedPartialResult : public daal::algorithms::PartialResult { public: DECLARE_SERIALIZABLE_CAST(DistributedPartialResult) @@ -501,7 +501,7 @@ class DAAL_EXPORT DistributedPartialResult : public daal::algorithms::PartialRes * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store partial results of the SVD algorithm based on the known structure of partial results from step 1 in the @@ -514,7 +514,7 @@ class DAAL_EXPORT DistributedPartialResult : public daal::algorithms::PartialRes * \param[out] nBlocks Number of rows in the input data set */ template - DAAL_EXPORT services::Status setPartialResultStorage(data_management::KeyValueDataCollection * inCollection, size_t & nBlocks); + services::Status setPartialResultStorage(data_management::KeyValueDataCollection * inCollection, size_t & nBlocks); /** * Returns partial results of the SVD algorithm. @@ -586,7 +586,7 @@ typedef services::SharedPtr DistributedPartialResultPt * \brief Provides methods to access partial results obtained with the compute() method of the SVD algorithm * in the third step in the distributed processing mode */ -class DAAL_EXPORT DistributedPartialResultStep3 : public daal::algorithms::PartialResult +class DistributedPartialResultStep3 : public daal::algorithms::PartialResult { public: DECLARE_SERIALIZABLE_CAST(DistributedPartialResultStep3) @@ -603,7 +603,7 @@ class DAAL_EXPORT DistributedPartialResultStep3 : public daal::algorithms::Parti * \return Status of allocation */ template - DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store partial results of the SVD algorithm obtained in the third step in the distributed processing mode @@ -611,7 +611,7 @@ class DAAL_EXPORT DistributedPartialResultStep3 : public daal::algorithms::Parti * \param[in] qCollection DataCollection of all partial results from step 1 of the SVD algorithm in the distributed processing mode */ template - DAAL_EXPORT services::Status setPartialResultStorage(data_management::DataCollection * qCollection); + services::Status setPartialResultStorage(data_management::DataCollection * qCollection); /** * Returns results of the SVD algorithm with singular values and the left orthogonal matrix calculated From 71ae548d0fe8727a2f0d72d8b6d8fa5a750b7f31 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 02:42:12 -0700 Subject: [PATCH 061/120] minor fixes --- .../include/algorithms/pca/pca_explained_variance_batch.h | 2 +- .../include/algorithms/pca/pca_quality_metric_set_batch.h | 2 +- .../include/algorithms/pca/transform/pca_transform_batch.h | 2 +- cpp/daal/include/algorithms/svd/svd_types.h | 3 +-- cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.h | 2 +- .../src/algorithms/pca/metrics/pca_quality_metric_fpt.cpp | 4 ++-- 6 files changed, 7 insertions(+), 8 deletions(-) mode change 100755 => 100644 cpp/daal/include/algorithms/svd/svd_types.h diff --git a/cpp/daal/include/algorithms/pca/pca_explained_variance_batch.h b/cpp/daal/include/algorithms/pca/pca_explained_variance_batch.h index cd3737c60a8..827002ca1c1 100644 --- a/cpp/daal/include/algorithms/pca/pca_explained_variance_batch.h +++ b/cpp/daal/include/algorithms/pca/pca_explained_variance_batch.h @@ -84,7 +84,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * - \ref ResultId %Result identifiers for the metric algorithm */ template -class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch +class Batch : public daal::algorithms::quality_metric::Batch { public: typedef algorithms::pca::quality_metric::explained_variance::Input InputType; diff --git a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h index 8ad0f651cd3..dbc9d979fb4 100644 --- a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h +++ b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h @@ -56,7 +56,7 @@ namespace interface1 * \par References * - \ref algorithms::quality_metric_set::interface1::InputAlgorithmsCollection "algorithms::quality_metric_set::InputAlgorithmsCollection" class */ -class DAAL_EXPORT Batch : public algorithms::quality_metric_set::Batch +class Batch : public algorithms::quality_metric_set::Batch { public: Parameter parameter; /*!< Parameters of the algorithm */ diff --git a/cpp/daal/include/algorithms/pca/transform/pca_transform_batch.h b/cpp/daal/include/algorithms/pca/transform/pca_transform_batch.h index 34c5a7e4ec3..6bc71acd04d 100644 --- a/cpp/daal/include/algorithms/pca/transform/pca_transform_batch.h +++ b/cpp/daal/include/algorithms/pca/transform/pca_transform_batch.h @@ -82,7 +82,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * - \ref Method Computation methods for the PCA transformation algorithm */ template -class DAAL_EXPORT Batch : public daal::algorithms::Analysis +class Batch : public daal::algorithms::Analysis { public: typedef algorithms::pca::transform::Input InputType; diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h old mode 100755 new mode 100644 index 6fb41fb4481..2da9b0efaf5 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -435,8 +435,7 @@ class Result : public daal::algorithms::Result * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, - const int method); + services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method); /** * Sets the final result of the SVD algorithm diff --git a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.h b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.h index 93641a386d4..d73561767ad 100644 --- a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.h +++ b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.h @@ -43,7 +43,7 @@ namespace explained_variance * \param[in] method Algorithm method */ template -DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method) +services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method) { size_t nComponents = (static_cast(par))->nComponents; if (nComponents == 0) diff --git a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric_fpt.cpp b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric_fpt.cpp index 8869651343d..01cbfab9b82 100644 --- a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric_fpt.cpp @@ -33,8 +33,8 @@ namespace quality_metric { namespace explained_variance { -template services::Status DAAL_EXPORT Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, - const int method); +template services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, + const int method); } // namespace explained_variance } // namespace quality_metric From ee06bd578a6e6cebeadcc8c586089d03bd8ee477 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 03:36:02 -0700 Subject: [PATCH 062/120] fix for SVD --- .../src/algorithms/svd/svd_dense_default_batch_fpt.cpp | 10 +++++----- .../src/algorithms/svd/svd_dense_default_distr_step2.h | 5 ++--- .../svd/svd_dense_default_distr_step2_fpt.cpp | 9 ++++----- .../src/algorithms/svd/svd_dense_default_distr_step3.h | 5 ++--- .../svd/svd_dense_default_distr_step3_fpt.cpp | 8 +++----- cpp/daal/src/algorithms/svd/svd_dense_default_online.h | 8 +++----- .../algorithms/svd/svd_dense_default_online_fpt.cpp | 10 +++++----- 7 files changed, 24 insertions(+), 31 deletions(-) mode change 100755 => 100644 cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2.h mode change 100755 => 100644 cpp/daal/src/algorithms/svd/svd_dense_default_online.h diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt.cpp index bfd9e8dafa2..865eb20d6f1 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt.cpp @@ -30,11 +30,11 @@ namespace svd { namespace interface1 { -template DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, const int method); -template DAAL_EXPORT services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, - daal::algorithms::Parameter * parameter, const int method); -template DAAL_EXPORT services::Status Result::allocateImpl(size_t m, size_t n); +template services::Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method); +template services::Status Result::allocate(const daal::algorithms::PartialResult * partialResult, + daal::algorithms::Parameter * parameter, const int method); +template services::Status Result::allocateImpl(size_t m, size_t n); } // namespace interface1 } // namespace svd diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2.h b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2.h old mode 100755 new mode 100644 index 4ed9839beb1..4d44d952bcf --- a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2.h +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2.h @@ -41,8 +41,7 @@ namespace interface1 * Allocates memory to store partial results of the SVD algorithm */ template -DAAL_EXPORT Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method) +Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { set(outputOfStep2ForStep3, KeyValueDataCollectionPtr(new KeyValueDataCollection())); Argument::set(finalResultFromStep2Master, ResultPtr(new Result())); @@ -62,7 +61,7 @@ DAAL_EXPORT Status DistributedPartialResult::allocate(const daal::algorithms::In * \param[out] nBlocks Number of rows in the input data set */ template -DAAL_EXPORT Status DistributedPartialResult::setPartialResultStorage(KeyValueDataCollection * inCollection, size_t & nBlocks) +Status DistributedPartialResult::setPartialResultStorage(KeyValueDataCollection * inCollection, size_t & nBlocks) { KeyValueDataCollectionPtr partialCollection = staticPointerCast(Argument::get(outputOfStep2ForStep3)); if (!partialCollection) diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt.cpp index a9b1845e0a3..c41ef6b87a4 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt.cpp @@ -30,11 +30,10 @@ namespace svd { namespace interface1 { -template DAAL_EXPORT services::Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, - const int method); -template DAAL_EXPORT services::Status DistributedPartialResult::setPartialResultStorage( - data_management::KeyValueDataCollection * inCollection, size_t & nBlocks); +template services::Status DistributedPartialResult::allocate(const daal::algorithms::Input * input, + const daal::algorithms::Parameter * parameter, const int method); +template services::Status DistributedPartialResult::setPartialResultStorage(data_management::KeyValueDataCollection * inCollection, + size_t & nBlocks); } // namespace interface1 } // namespace svd diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3.h b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3.h index f2be0f34797..e7b8e664c3e 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3.h +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3.h @@ -42,8 +42,7 @@ namespace interface1 * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method) +Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { Argument::set(finalResultFromStep3, ResultPtr(new Result())); return Status(); @@ -55,7 +54,7 @@ DAAL_EXPORT Status DistributedPartialResultStep3::allocate(const daal::algorithm * \param[in] qCollection DataCollection of all partial results from step 1 of the SVD algorithm in the distributed processing mode */ template -DAAL_EXPORT Status DistributedPartialResultStep3::setPartialResultStorage(data_management::DataCollection * qCollection) +Status DistributedPartialResultStep3::setPartialResultStorage(data_management::DataCollection * qCollection) { size_t qSize = qCollection->size(); size_t m = 0; diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt.cpp index 24892f71a28..1e5ec49aea0 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt.cpp @@ -30,11 +30,9 @@ namespace svd { namespace interface1 { -template DAAL_EXPORT services::Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, - const int method); -template DAAL_EXPORT services::Status DistributedPartialResultStep3::setPartialResultStorage( - data_management::DataCollection * qCollection); +template services::Status DistributedPartialResultStep3::allocate(const daal::algorithms::Input * input, + const daal::algorithms::Parameter * parameter, const int method); +template services::Status DistributedPartialResultStep3::setPartialResultStorage(data_management::DataCollection * qCollection); } // namespace interface1 } // namespace svd diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_online.h b/cpp/daal/src/algorithms/svd/svd_dense_default_online.h old mode 100755 new mode 100644 index c3e00bf3614..30475167f3b --- a/cpp/daal/src/algorithms/svd/svd_dense_default_online.h +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_online.h @@ -46,8 +46,7 @@ using namespace daal::services; * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status OnlinePartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method) +Status OnlinePartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { auto pDataCollection13 = new DataCollection(); auto pDataCollection12 = new DataCollection(); @@ -58,8 +57,7 @@ DAAL_EXPORT Status OnlinePartialResult::allocate(const daal::algorithms::Input * } template -DAAL_EXPORT Status OnlinePartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - const int method) +Status OnlinePartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { get(outputOfStep1ForStep3)->clear(); get(outputOfStep1ForStep2)->clear(); @@ -74,7 +72,7 @@ DAAL_EXPORT Status OnlinePartialResult::initialize(const daal::algorithms::Input * \param[in] par Reference to the object with the algorithm parameters */ template -DAAL_EXPORT Status OnlinePartialResult::addPartialResultStorage(size_t m, size_t n, Parameter & par) +Status OnlinePartialResult::addPartialResultStorage(size_t m, size_t n, Parameter & par) { DataCollectionPtr rCollection = staticPointerCast(Argument::get(outputOfStep1ForStep2)); Status st; diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt.cpp index 3042502723e..dc5c90fdd06 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt.cpp @@ -30,11 +30,11 @@ namespace svd { namespace interface1 { -template DAAL_EXPORT Status OnlinePartialResult::allocate(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, const int method); -template DAAL_EXPORT Status OnlinePartialResult::initialize(const daal::algorithms::Input * input, - const daal::algorithms::Parameter * parameter, const int method); -template DAAL_EXPORT Status OnlinePartialResult::addPartialResultStorage(size_t m, size_t n, Parameter & par); +template Status OnlinePartialResult::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method); +template Status OnlinePartialResult::initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + const int method); +template Status OnlinePartialResult::addPartialResultStorage(size_t m, size_t n, Parameter & par); } // namespace interface1 } // namespace svd From c75cd9cbc57e41704263cbf4c7e118377235d070 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 04:19:56 -0700 Subject: [PATCH 063/120] minor fixes --- .../src/algorithms/normalization/minmax/minmax_parameter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp index 4753dbd98e7..bc98bac50db 100644 --- a/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp +++ b/cpp/daal/src/algorithms/normalization/minmax/minmax_parameter.cpp @@ -37,14 +37,14 @@ namespace minmax namespace interface1 { /** Constructs min-max normalization parameters */ -DAAL_EXPORT ParameterBase::ParameterBase(double lowerBound, double upperBound, const SharedPtr & moments) +ParameterBase::ParameterBase(double lowerBound, double upperBound, const SharedPtr & moments) : lowerBound(lowerBound), upperBound(upperBound), moments(moments) {} /** * Check the correctness of the %ParameterBase object */ -DAAL_EXPORT Status ParameterBase::check() const +Status ParameterBase::check() const { DAAL_CHECK(moments, ErrorNullParameterNotSupported); DAAL_CHECK(lowerBound < upperBound, ErrorLowerBoundGreaterThanOrEqualToUpperBound); From 1fe8a6c8b25a0a7612c571bee1da8a1a0f08086d Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 06:13:30 -0700 Subject: [PATCH 064/120] minor fix --- cpp/daal/include/algorithms/normalization/zscore.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore.h b/cpp/daal/include/algorithms/normalization/zscore.h index 1347e814f31..53f36728b28 100644 --- a/cpp/daal/include/algorithms/normalization/zscore.h +++ b/cpp/daal/include/algorithms/normalization/zscore.h @@ -78,7 +78,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * \brief Abstract class that specifies interface of the algorithms * for computing correlation or variance-covariance matrix in the batch processing mode */ -class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis +class BatchImpl : public daal::algorithms::Analysis { public: typedef algorithms::normalization::zscore::Input InputType; @@ -174,7 +174,7 @@ class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis * - daal::algorithms::normalization::zscore::ResulToComputetId Identifiers of z-score normalization optional result to compute */ template -class DAAL_EXPORT Batch : public BatchImpl +class Batch : public BatchImpl { public: typedef BatchImpl super; From 036202aee7ec1f38931b5b8aa30a60bc8eaa4957 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 07:35:30 -0700 Subject: [PATCH 065/120] minor fixes --- cpp/daal/include/algorithms/normalization/zscore.h | 4 ++-- cpp/daal/include/algorithms/pca/pca_types.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore.h b/cpp/daal/include/algorithms/normalization/zscore.h index 53f36728b28..1347e814f31 100644 --- a/cpp/daal/include/algorithms/normalization/zscore.h +++ b/cpp/daal/include/algorithms/normalization/zscore.h @@ -78,7 +78,7 @@ class BatchContainer : public daal::algorithms::AnalysisContainerIface * \brief Abstract class that specifies interface of the algorithms * for computing correlation or variance-covariance matrix in the batch processing mode */ -class BatchImpl : public daal::algorithms::Analysis +class DAAL_EXPORT BatchImpl : public daal::algorithms::Analysis { public: typedef algorithms::normalization::zscore::Input InputType; @@ -174,7 +174,7 @@ class BatchImpl : public daal::algorithms::Analysis * - daal::algorithms::normalization::zscore::ResulToComputetId Identifiers of z-score normalization optional result to compute */ template -class Batch : public BatchImpl +class DAAL_EXPORT Batch : public BatchImpl { public: typedef BatchImpl super; diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index b2b46d7a2e6..f874c8319cd 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -663,7 +663,7 @@ namespace interface3 * * \brief Class that specifies the common parameters of the PCA Batch algorithms */ -class BaseBatchParameter : public daal::algorithms::Parameter +class DAAL_EXPORT BaseBatchParameter : public daal::algorithms::Parameter { public: /** Constructs PCA parameters */ From cdf6af4fd796bfd1bf6688c2c712ee7277ed9300 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 08:33:27 -0700 Subject: [PATCH 066/120] svd fixes --- cpp/daal/include/algorithms/normalization/zscore_types.h | 2 +- .../src/algorithms/pca/pca_batchparameter_svd_fpt.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore_types.h b/cpp/daal/include/algorithms/normalization/zscore_types.h index 4cdbb0907d5..c208f3099d1 100644 --- a/cpp/daal/include/algorithms/normalization/zscore_types.h +++ b/cpp/daal/include/algorithms/normalization/zscore_types.h @@ -113,7 +113,7 @@ namespace interface1 * * \brief %Input objects for the z-score normalization algorithm */ -class Input : public daal::algorithms::Input +class DAAL_EXPORT Input : public daal::algorithms::Input { public: /** Default constructor */ diff --git a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp index 2a09f1b771e..25fa822e4da 100644 --- a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp @@ -33,19 +33,19 @@ namespace interface3 { /** Constructs PCA parameters */ template -BatchParameter::BatchParameter(const services::SharedPtr & normalization) +DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & normalization) : normalization(normalization) {}; template -services::Status BatchParameter::check() const +DAAL_EXPORT services::Status BatchParameter::check() const { DAAL_CHECK(normalization, services::ErrorNullAuxiliaryAlgorithm); return services::Status(); } -template BatchParameter::BatchParameter(const services::SharedPtr & normalization); +template DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & normalization); -template services::Status BatchParameter::check() const; +template DAAL_EXPORT services::Status BatchParameter::check() const; } // namespace interface3 } // namespace pca From 4daf784ef2f708569bc9b54159a1e90154fad3a2 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 08:52:28 -0700 Subject: [PATCH 067/120] minor fix --- cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp index 25fa822e4da..3def58e790b 100644 --- a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp @@ -33,11 +33,11 @@ namespace interface3 { /** Constructs PCA parameters */ template -DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & normalization) +BatchParameter::BatchParameter(const services::SharedPtr & normalization) : normalization(normalization) {}; template -DAAL_EXPORT services::Status BatchParameter::check() const +services::Status BatchParameter::check() const { DAAL_CHECK(normalization, services::ErrorNullAuxiliaryAlgorithm); return services::Status(); From e77bedda8fb9b158e06a90fa25c68bfd6b334b28 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 09:45:43 -0700 Subject: [PATCH 068/120] fix for clang --- cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp index 3def58e790b..2efc7501e4d 100644 --- a/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp +++ b/cpp/daal/src/algorithms/pca/pca_batchparameter_svd_fpt.cpp @@ -43,7 +43,8 @@ services::Status BatchParameter::check() const return services::Status(); } -template DAAL_EXPORT BatchParameter::BatchParameter(const services::SharedPtr & normalization); +template DAAL_EXPORT BatchParameter::BatchParameter( + const services::SharedPtr & normalization); template DAAL_EXPORT services::Status BatchParameter::check() const; From 45057f6f4c1866009e0034e7a89bfca64e6bd2a3 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 12:30:30 -0700 Subject: [PATCH 069/120] fix distributed kmeans and dbscan --- .../algorithms/dbscan/dbscan_distributed.h | 28 +- .../algorithms/kmeans/kmeans_distributed.h | 460 ------------------ 2 files changed, 14 insertions(+), 474 deletions(-) diff --git a/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h b/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h index 18d3768c52d..4badaf2f495 100644 --- a/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h +++ b/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h @@ -448,7 +448,7 @@ class DistributedContainer : public T * - Result class */ template -class Distributed +class DAAL_EXPORT Distributed {}; /** @@ -465,7 +465,7 @@ class Distributed * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -585,7 +585,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -705,7 +705,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -827,7 +827,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -949,7 +949,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1070,7 +1070,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1192,7 +1192,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1298,7 +1298,7 @@ class Distributed : public daal::algorithm * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1418,7 +1418,7 @@ class Distributed : public daal::algorithms * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1544,7 +1544,7 @@ class Distributed : public daal::algorithm * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1664,7 +1664,7 @@ class Distributed : public daal::algorithm * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1784,7 +1784,7 @@ class Distributed : public daal::algorithm * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1904,7 +1904,7 @@ class Distributed : public daal::algorithm * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h index ae670106a5d..e69de29bb2d 100644 --- a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h +++ b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h @@ -1,460 +0,0 @@ -/* file: kmeans_distributed.h */ -/******************************************************************************* -* Copyright 2014 Intel Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*******************************************************************************/ - -/* -//++ -// Implementation of the interface for K-Means algorithm in the distributed -// processing mode -//-- -*/ - -#ifndef __KMEANS_DISTRIBITED_H__ -#define __KMEANS_DISTRIBITED_H__ - -#include "algorithms/algorithm.h" -#include "data_management/data/numeric_table.h" -#include "services/daal_defines.h" -#include "algorithms/kmeans/kmeans_types.h" - -namespace daal -{ -namespace algorithms -{ -namespace kmeans -{ -namespace interface2 -{ -/** - * @defgroup kmeans_distributed Distributed - * @ingroup kmeans_compute - * @{ - */ -/** - * - * \brief Provides methods to run implementations of K-Means algorithm. - * This class is associated with the daal::algorithms::kmeans::Distributed class - * and supports the method of K-Means computation in the distributed processing mode. - * - * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float - * \tparam method Computation method of the algorithm, \ref daal::algorithms::kmeans::Method - */ -template -class DistributedContainer; - -/** - * - * \brief Class containing computation methods for K-Means algorithm in the first step of the distributed processing mode - */ -template -class DistributedContainer : public daal::algorithms::AnalysisContainerIface -{ -public: - /** - * Constructs a container for K-Means algorithm with a specified environment - * in the first step of the distributed processing mode - * \param[in] daalEnv Environment object - */ - DistributedContainer(daal::services::Environment::env * daalEnv); - /** Default destructor */ - virtual ~DistributedContainer(); - /** - * Computes a partial result of K-Means algorithm in the first step of the - * distributed processing mode - */ - virtual services::Status compute() DAAL_C11_OVERRIDE; - /** - * Computes the result of K-Means algorithm in the first step of the - * distributed processing mode - */ - virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE; -}; - -/** - * - * \brief Class containing computation methods for K-Means algorithm in the second step of the distributed processing mode - */ -template -class DistributedContainer : public daal::algorithms::AnalysisContainerIface -{ -public: - /** - * Constructs a container for K-Means algorithm with a specified environment - * in the second step of the distributed processing mode - * \param[in] daalEnv Environment object - */ - DistributedContainer(daal::services::Environment::env * daalEnv); - /** Default destructor */ - virtual ~DistributedContainer(); - /** - * Computes a partial result of K-Means algorithm in the second step of the - * distributed processing mode - */ - virtual services::Status compute() DAAL_C11_OVERRIDE; - /** - * Computes the result of K-Means algorithm in the second step of the - * distributed processing mode - */ - virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE; -}; - -/** - * - * \brief Computes the results of K-Means algorithm in the distributed processing mode - * - * - * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float - * \tparam method Computation method of the algorithm, \ref Method - * - * \par Enumerations - * - \ref Method Computation methods for K-Means algorithm - * - \ref InputId Identifiers of input objects for K-Means algorithm - * - \ref ResultId Identifiers of results of K-Means algorithm - * - * \par References - * - Input class - * - Result class - */ -template -class Distributed -{}; - -/** - * - * \brief Computes the results of K-Means algorithm in the first step of the distributed processing mode - * - * - * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float - * \tparam method Computation method of the algorithm, \ref Method - * - * \par Enumerations - * - \ref Method Computation methods for K-Means algorithm - * - \ref InputId Identifiers of input objects for the K-Means algorithm - * - \ref ResultId Identifiers of results of K-Means algorithm - */ -template -class Distributed : public daal::algorithms::Analysis -{ -public: - typedef algorithms::kmeans::Input InputType; - typedef algorithms::kmeans::Parameter ParameterType; - typedef algorithms::kmeans::Result ResultType; - typedef algorithms::kmeans::PartialResult PartialResultType; - - /** - * Constructs K-Means algorithm - * \param[in] nClusters Number of clusters - * \param[in] assignFlag Flag to calculate partial assignment - */ - Distributed(size_t nClusters, bool assignFlag = false); - - /** - * Constructs K-Means algorithm by copying input objects and parameters - * of another K-Means algorithm - * \param[in] other An algorithm to be used as the source to initialize the input objects - * and parameters of the algorithm - */ - Distributed(const Distributed & other); - - /** - * Returns the method of the algorithm - * \return Method of the algorithm - */ - virtual int getMethod() const DAAL_C11_OVERRIDE { return (int)method; } - - /** - * Returns the structure that contains the results of K-Means algorithm - * \return Structure that contains the results of K-Means algorithm - */ - ResultPtr getResult() { return _result; } - - /** - * Registers user-allocated memory to store the results of K-Means algorithm - * \param[in] result Structure to store the results of K-Means algorithm - */ - services::Status setResult(const ResultPtr & result) - { - DAAL_CHECK(result, services::ErrorNullResult) - _result = result; - _res = _result.get(); - return services::Status(); - } - - /** - * Returns the structure that contains computed partial results - * \return Structure that contains computed partial results - */ - PartialResultPtr getPartialResult() { return _partialResult; } - - /** - * Sets the structure that contains computed partial results - */ - services::Status setPartialResult(const PartialResultPtr & partialRes) - { - DAAL_CHECK(partialRes, services::ErrorNullPartialResult); - _partialResult = partialRes; - _pres = _partialResult.get(); - return services::Status(); - } - - /** - * Validates the parameters of the finalizeCompute() method - */ - services::Status checkFinalizeComputeParams() DAAL_C11_OVERRIDE { return services::Status(); } - - /** - * Returns a pointer to the newly allocated K-Means algorithm with a copy of input objects - * and parameters of this K-Means algorithm - * \return Pointer to the newly allocated algorithm - */ - services::SharedPtr > clone() const - { - return services::SharedPtr >(cloneImpl()); - } - - /** - * Gets parameter of the algorithm - * \return parameter of the algorithm - */ - ParameterType & parameter() { return *static_cast(_par); } - - /** - * Gets parameter of the algorithm - * \return parameter of the algorithm - */ - const ParameterType & parameter() const { return *static_cast(_par); } - -protected: - virtual Distributed * cloneImpl() const DAAL_C11_OVERRIDE - { - return new Distributed(*this); - } - - virtual services::Status allocateResult() DAAL_C11_OVERRIDE - { - _result.reset(new ResultType()); - services::Status s = _result->allocate(_in, _par, (int)method); - _res = _result.get(); - return s; - } - - virtual services::Status allocatePartialResult() DAAL_C11_OVERRIDE - { - _partialResult.reset(new PartialResultType()); - services::Status s = _partialResult->allocate(&input, _par, (int)method); - _pres = _partialResult.get(); - return s; - } - - virtual services::Status initializePartialResult() DAAL_C11_OVERRIDE { return services::Status(); } - - void initialize() - { - Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(distributed, DistributedContainer, step1Local, algorithmFPType, method)(&_env); - _in = &input; - } - -public: - InputType input; /*!< %Input data structure */ - -private: - PartialResultPtr _partialResult; - ResultPtr _result; - - Distributed & operator=(const Distributed &); -}; - -/** - * - * \brief Computes the results of K-Means algorithm in the second step of the distributed processing mode - * - * - * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float - * \tparam method Computation method of the algorithm, \ref Method - * - * \par Enumerations - * - \ref Method Computation methods for K-Means algorithm - * - \ref InputId Identifiers of input objects for K-Means algorithm - * - \ref ResultId Identifiers of results of K-Means algorithm - * - * \par References - * - Input class - */ -template -class Distributed : public daal::algorithms::Analysis -{ -public: - typedef algorithms::kmeans::DistributedStep2MasterInput InputType; - typedef algorithms::kmeans::Parameter ParameterType; - typedef algorithms::kmeans::Result ResultType; - typedef algorithms::kmeans::PartialResult PartialResultType; - - /** - * Main constructor - * \param[in] nClusters Number of clusters - * \param[in] nIterations Number of iterations - */ - Distributed(size_t nClusters, size_t nIterations = 1); - - /** - * Constructs K-Means algorithm by copying input objects and parameters - * of another K-Means algorithm - * \param[in] other An algorithm to be used as the source to initialize the input objects - * and parameters of the algorithm - */ - Distributed(const Distributed & other); - - /** - * Returns the method of the algorithm - * \return Method of the algorithm - */ - virtual int getMethod() const DAAL_C11_OVERRIDE { return (int)method; } - - /** - * Returns the structure that contains the results of K-Means algorithm - * \return Structure that contains the results of K-Means algorithm - */ - ResultPtr getResult() { return _result; } - - /** - * Registers user-allocated memory to store the results of K-Means algorithm - * \param[in] result Structure to store the results of K-Means algorithm - */ - services::Status setResult(const ResultPtr & result) - { - DAAL_CHECK(result, services::ErrorNullResult) - _result = result; - _res = _result.get(); - return services::Status(); - } - - /** - * Returns the structure that contains computed partial results - * \return Structure that contains computed partial results - */ - PartialResultPtr getPartialResult() { return _partialResult; } - - /** - * Sets the structure that contains computed partial results - */ - services::Status setPartialResult(const PartialResultPtr & partialRes) - { - DAAL_CHECK(partialRes, services::ErrorNullPartialResult); - _partialResult = partialRes; - _pres = _partialResult.get(); - return services::Status(); - } - - /** - * Validates the parameters of the finalizeCompute() method - */ - services::Status checkFinalizeComputeParams() DAAL_C11_OVERRIDE - { - services::Status s; - if (_partialResult) - { - s |= _partialResult->check(_par, method); - if (!s) - { - return s; - } - } - else - { - return services::Status(services::ErrorNullResult); - } - - if (_result) - { - s |= _result->check(_partialResult.get(), _par, method); - } - else - { - return services::Status(services::ErrorNullResult); - } - return s; - } - - /** - * Returns a pointer to the newly allocated K-Means algorithm with a copy of input objects - * and parameters of this K-Means algorithm - * \return Pointer to the newly allocated algorithm - */ - services::SharedPtr > clone() const - { - return services::SharedPtr >(cloneImpl()); - } - - /** - * Gets parameter of the algorithm - * \return parameter of the algorithm - */ - ParameterType & parameter() { return *static_cast(_par); } - - /** - * Gets parameter of the algorithm - * \return parameter of the algorithm - */ - const ParameterType & parameter() const { return *static_cast(_par); } - -protected: - virtual Distributed * cloneImpl() const DAAL_C11_OVERRIDE - { - return new Distributed(*this); - } - - virtual services::Status allocateResult() DAAL_C11_OVERRIDE - { - _result.reset(new ResultType()); - services::Status s = _result->allocate(_pres, _par, (int)method); - _res = _result.get(); - return s; - } - - virtual services::Status allocatePartialResult() DAAL_C11_OVERRIDE - { - _partialResult.reset(new PartialResultType()); - services::Status s = _partialResult->allocate(&input, _par, (int)method); - _pres = _partialResult.get(); - return s; - } - - virtual services::Status initializePartialResult() DAAL_C11_OVERRIDE { return services::Status(); } - - void initialize() - { - Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(distributed, DistributedContainer, step2Master, algorithmFPType, method)(&_env); - _in = &input; - } - -public: - InputType input; /*!< %Input data structure */ - -private: - PartialResultPtr _partialResult; - ResultPtr _result; - - Distributed & operator=(const Distributed &); -}; -/** @} */ -} // namespace interface2 - -using interface2::DistributedContainer; -using interface2::Distributed; -} // namespace kmeans -} // namespace algorithms -} // namespace daal -#endif From 288ca32825667cdaa5a8cd11a71b956959e87d65 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 12:45:16 -0700 Subject: [PATCH 070/120] fix for kmeans --- .../algorithms/kmeans/kmeans_distributed.h | 460 ++++++++++++++++++ 1 file changed, 460 insertions(+) diff --git a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h index e69de29bb2d..a3fb7e8cd2f 100644 --- a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h +++ b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h @@ -0,0 +1,460 @@ +/* file: kmeans_distributed.h */ +/******************************************************************************* +* Copyright 2014 Intel Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*******************************************************************************/ + +/* +//++ +// Implementation of the interface for K-Means algorithm in the distributed +// processing mode +//-- +*/ + +#ifndef __KMEANS_DISTRIBITED_H__ +#define __KMEANS_DISTRIBITED_H__ + +#include "algorithms/algorithm.h" +#include "data_management/data/numeric_table.h" +#include "services/daal_defines.h" +#include "algorithms/kmeans/kmeans_types.h" + +namespace daal +{ +namespace algorithms +{ +namespace kmeans +{ +namespace interface2 +{ +/** + * @defgroup kmeans_distributed Distributed + * @ingroup kmeans_compute + * @{ + */ +/** + * + * \brief Provides methods to run implementations of K-Means algorithm. + * This class is associated with the daal::algorithms::kmeans::Distributed class + * and supports the method of K-Means computation in the distributed processing mode. + * + * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float + * \tparam method Computation method of the algorithm, \ref daal::algorithms::kmeans::Method + */ +template +class DistributedContainer; + +/** + * + * \brief Class containing computation methods for K-Means algorithm in the first step of the distributed processing mode + */ +template +class DistributedContainer : public daal::algorithms::AnalysisContainerIface +{ +public: + /** + * Constructs a container for K-Means algorithm with a specified environment + * in the first step of the distributed processing mode + * \param[in] daalEnv Environment object + */ + DistributedContainer(daal::services::Environment::env * daalEnv); + /** Default destructor */ + virtual ~DistributedContainer(); + /** + * Computes a partial result of K-Means algorithm in the first step of the + * distributed processing mode + */ + virtual services::Status compute() DAAL_C11_OVERRIDE; + /** + * Computes the result of K-Means algorithm in the first step of the + * distributed processing mode + */ + virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE; +}; + +/** + * + * \brief Class containing computation methods for K-Means algorithm in the second step of the distributed processing mode + */ +template +class DistributedContainer : public daal::algorithms::AnalysisContainerIface +{ +public: + /** + * Constructs a container for K-Means algorithm with a specified environment + * in the second step of the distributed processing mode + * \param[in] daalEnv Environment object + */ + DistributedContainer(daal::services::Environment::env * daalEnv); + /** Default destructor */ + virtual ~DistributedContainer(); + /** + * Computes a partial result of K-Means algorithm in the second step of the + * distributed processing mode + */ + virtual services::Status compute() DAAL_C11_OVERRIDE; + /** + * Computes the result of K-Means algorithm in the second step of the + * distributed processing mode + */ + virtual services::Status finalizeCompute() DAAL_C11_OVERRIDE; +}; + +/** + * + * \brief Computes the results of K-Means algorithm in the distributed processing mode + * + * + * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float + * \tparam method Computation method of the algorithm, \ref Method + * + * \par Enumerations + * - \ref Method Computation methods for K-Means algorithm + * - \ref InputId Identifiers of input objects for K-Means algorithm + * - \ref ResultId Identifiers of results of K-Means algorithm + * + * \par References + * - Input class + * - Result class + */ +template +class DAAL_EXPORT Distributed +{}; + +/** + * + * \brief Computes the results of K-Means algorithm in the first step of the distributed processing mode + * + * + * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float + * \tparam method Computation method of the algorithm, \ref Method + * + * \par Enumerations + * - \ref Method Computation methods for K-Means algorithm + * - \ref InputId Identifiers of input objects for the K-Means algorithm + * - \ref ResultId Identifiers of results of K-Means algorithm + */ +template +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +{ +public: + typedef algorithms::kmeans::Input InputType; + typedef algorithms::kmeans::Parameter ParameterType; + typedef algorithms::kmeans::Result ResultType; + typedef algorithms::kmeans::PartialResult PartialResultType; + + /** + * Constructs K-Means algorithm + * \param[in] nClusters Number of clusters + * \param[in] assignFlag Flag to calculate partial assignment + */ + Distributed(size_t nClusters, bool assignFlag = false); + + /** + * Constructs K-Means algorithm by copying input objects and parameters + * of another K-Means algorithm + * \param[in] other An algorithm to be used as the source to initialize the input objects + * and parameters of the algorithm + */ + Distributed(const Distributed & other); + + /** + * Returns the method of the algorithm + * \return Method of the algorithm + */ + virtual int getMethod() const DAAL_C11_OVERRIDE { return (int)method; } + + /** + * Returns the structure that contains the results of K-Means algorithm + * \return Structure that contains the results of K-Means algorithm + */ + ResultPtr getResult() { return _result; } + + /** + * Registers user-allocated memory to store the results of K-Means algorithm + * \param[in] result Structure to store the results of K-Means algorithm + */ + services::Status setResult(const ResultPtr & result) + { + DAAL_CHECK(result, services::ErrorNullResult) + _result = result; + _res = _result.get(); + return services::Status(); + } + + /** + * Returns the structure that contains computed partial results + * \return Structure that contains computed partial results + */ + PartialResultPtr getPartialResult() { return _partialResult; } + + /** + * Sets the structure that contains computed partial results + */ + services::Status setPartialResult(const PartialResultPtr & partialRes) + { + DAAL_CHECK(partialRes, services::ErrorNullPartialResult); + _partialResult = partialRes; + _pres = _partialResult.get(); + return services::Status(); + } + + /** + * Validates the parameters of the finalizeCompute() method + */ + services::Status checkFinalizeComputeParams() DAAL_C11_OVERRIDE { return services::Status(); } + + /** + * Returns a pointer to the newly allocated K-Means algorithm with a copy of input objects + * and parameters of this K-Means algorithm + * \return Pointer to the newly allocated algorithm + */ + services::SharedPtr > clone() const + { + return services::SharedPtr >(cloneImpl()); + } + + /** + * Gets parameter of the algorithm + * \return parameter of the algorithm + */ + ParameterType & parameter() { return *static_cast(_par); } + + /** + * Gets parameter of the algorithm + * \return parameter of the algorithm + */ + const ParameterType & parameter() const { return *static_cast(_par); } + +protected: + virtual Distributed * cloneImpl() const DAAL_C11_OVERRIDE + { + return new Distributed(*this); + } + + virtual services::Status allocateResult() DAAL_C11_OVERRIDE + { + _result.reset(new ResultType()); + services::Status s = _result->allocate(_in, _par, (int)method); + _res = _result.get(); + return s; + } + + virtual services::Status allocatePartialResult() DAAL_C11_OVERRIDE + { + _partialResult.reset(new PartialResultType()); + services::Status s = _partialResult->allocate(&input, _par, (int)method); + _pres = _partialResult.get(); + return s; + } + + virtual services::Status initializePartialResult() DAAL_C11_OVERRIDE { return services::Status(); } + + void initialize() + { + Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(distributed, DistributedContainer, step1Local, algorithmFPType, method)(&_env); + _in = &input; + } + +public: + InputType input; /*!< %Input data structure */ + +private: + PartialResultPtr _partialResult; + ResultPtr _result; + + Distributed & operator=(const Distributed &); +}; + +/** + * + * \brief Computes the results of K-Means algorithm in the second step of the distributed processing mode + * + * + * \tparam algorithmFPType Data type to use in intermediate computations of K-Means, double or float + * \tparam method Computation method of the algorithm, \ref Method + * + * \par Enumerations + * - \ref Method Computation methods for K-Means algorithm + * - \ref InputId Identifiers of input objects for K-Means algorithm + * - \ref ResultId Identifiers of results of K-Means algorithm + * + * \par References + * - Input class + */ +template +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +{ +public: + typedef algorithms::kmeans::DistributedStep2MasterInput InputType; + typedef algorithms::kmeans::Parameter ParameterType; + typedef algorithms::kmeans::Result ResultType; + typedef algorithms::kmeans::PartialResult PartialResultType; + + /** + * Main constructor + * \param[in] nClusters Number of clusters + * \param[in] nIterations Number of iterations + */ + Distributed(size_t nClusters, size_t nIterations = 1); + + /** + * Constructs K-Means algorithm by copying input objects and parameters + * of another K-Means algorithm + * \param[in] other An algorithm to be used as the source to initialize the input objects + * and parameters of the algorithm + */ + Distributed(const Distributed & other); + + /** + * Returns the method of the algorithm + * \return Method of the algorithm + */ + virtual int getMethod() const DAAL_C11_OVERRIDE { return (int)method; } + + /** + * Returns the structure that contains the results of K-Means algorithm + * \return Structure that contains the results of K-Means algorithm + */ + ResultPtr getResult() { return _result; } + + /** + * Registers user-allocated memory to store the results of K-Means algorithm + * \param[in] result Structure to store the results of K-Means algorithm + */ + services::Status setResult(const ResultPtr & result) + { + DAAL_CHECK(result, services::ErrorNullResult) + _result = result; + _res = _result.get(); + return services::Status(); + } + + /** + * Returns the structure that contains computed partial results + * \return Structure that contains computed partial results + */ + PartialResultPtr getPartialResult() { return _partialResult; } + + /** + * Sets the structure that contains computed partial results + */ + services::Status setPartialResult(const PartialResultPtr & partialRes) + { + DAAL_CHECK(partialRes, services::ErrorNullPartialResult); + _partialResult = partialRes; + _pres = _partialResult.get(); + return services::Status(); + } + + /** + * Validates the parameters of the finalizeCompute() method + */ + services::Status checkFinalizeComputeParams() DAAL_C11_OVERRIDE + { + services::Status s; + if (_partialResult) + { + s |= _partialResult->check(_par, method); + if (!s) + { + return s; + } + } + else + { + return services::Status(services::ErrorNullResult); + } + + if (_result) + { + s |= _result->check(_partialResult.get(), _par, method); + } + else + { + return services::Status(services::ErrorNullResult); + } + return s; + } + + /** + * Returns a pointer to the newly allocated K-Means algorithm with a copy of input objects + * and parameters of this K-Means algorithm + * \return Pointer to the newly allocated algorithm + */ + services::SharedPtr > clone() const + { + return services::SharedPtr >(cloneImpl()); + } + + /** + * Gets parameter of the algorithm + * \return parameter of the algorithm + */ + ParameterType & parameter() { return *static_cast(_par); } + + /** + * Gets parameter of the algorithm + * \return parameter of the algorithm + */ + const ParameterType & parameter() const { return *static_cast(_par); } + +protected: + virtual Distributed * cloneImpl() const DAAL_C11_OVERRIDE + { + return new Distributed(*this); + } + + virtual services::Status allocateResult() DAAL_C11_OVERRIDE + { + _result.reset(new ResultType()); + services::Status s = _result->allocate(_pres, _par, (int)method); + _res = _result.get(); + return s; + } + + virtual services::Status allocatePartialResult() DAAL_C11_OVERRIDE + { + _partialResult.reset(new PartialResultType()); + services::Status s = _partialResult->allocate(&input, _par, (int)method); + _pres = _partialResult.get(); + return s; + } + + virtual services::Status initializePartialResult() DAAL_C11_OVERRIDE { return services::Status(); } + + void initialize() + { + Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(distributed, DistributedContainer, step2Master, algorithmFPType, method)(&_env); + _in = &input; + } + +public: + InputType input; /*!< %Input data structure */ + +private: + PartialResultPtr _partialResult; + ResultPtr _result; + + Distributed & operator=(const Distributed &); +}; +/** @} */ +} // namespace interface2 + +using interface2::DistributedContainer; +using interface2::Distributed; +} // namespace kmeans +} // namespace algorithms +} // namespace daal +#endif From c4349ad0a51290af4e3906a4a702b8763c82ba33 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 14:25:00 -0700 Subject: [PATCH 071/120] minor fix --- .../algorithms/dbscan/dbscan_distributed.h | 26 +++++++++---------- .../algorithms/kmeans/kmeans_distributed.h | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h b/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h index 4badaf2f495..8b2ea059014 100644 --- a/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h +++ b/cpp/daal/include/algorithms/dbscan/dbscan_distributed.h @@ -465,7 +465,7 @@ class DAAL_EXPORT Distributed * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -585,7 +585,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -705,7 +705,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -827,7 +827,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -949,7 +949,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1070,7 +1070,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1192,7 +1192,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1298,7 +1298,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1418,7 +1418,7 @@ class DAAL_EXPORT Distributed : public daal * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1544,7 +1544,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1664,7 +1664,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1784,7 +1784,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; @@ -1904,7 +1904,7 @@ class DAAL_EXPORT Distributed : public daa * - \ref ResultId Identifiers of results of the DBSCAN algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::dbscan::DistributedInput InputType; diff --git a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h index a3fb7e8cd2f..86a93f895ed 100644 --- a/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h +++ b/cpp/daal/include/algorithms/kmeans/kmeans_distributed.h @@ -146,7 +146,7 @@ class DAAL_EXPORT Distributed * - \ref ResultId Identifiers of results of K-Means algorithm */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::kmeans::Input InputType; @@ -294,7 +294,7 @@ class DAAL_EXPORT Distributed : public daal * - Input class */ template -class DAAL_EXPORT Distributed : public daal::algorithms::Analysis +class Distributed : public daal::algorithms::Analysis { public: typedef algorithms::kmeans::DistributedStep2MasterInput InputType; From 97ef736030911200ce10a3f7cbcce5957092a3d1 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 16 Apr 2024 15:44:03 -0700 Subject: [PATCH 072/120] minor fixes --- cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h | 2 +- cpp/daal/include/algorithms/svd/svd_distributed.h | 2 +- cpp/daal/src/algorithms/svd/svd_dense_default_batch.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h b/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h index 2f8b09ea9b0..9669ec1a4b3 100644 --- a/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h +++ b/cpp/daal/include/algorithms/kmeans/kmeans_init_distributed.h @@ -270,7 +270,7 @@ class DistributedBase : public daal::algorithms::Analysis * - Result class */ template -class Distributed; +class DAAL_EXPORT Distributed; /** * diff --git a/cpp/daal/include/algorithms/svd/svd_distributed.h b/cpp/daal/include/algorithms/svd/svd_distributed.h index 0d33eee118a..e2e63a53e4b 100644 --- a/cpp/daal/include/algorithms/svd/svd_distributed.h +++ b/cpp/daal/include/algorithms/svd/svd_distributed.h @@ -151,7 +151,7 @@ class DistributedContainer : public da * - \ref Method SVD computation methods */ template -class Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis {}; /** diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h b/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h index 14e3e396003..2705f6540ab 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h @@ -43,7 +43,7 @@ namespace interface1 * \param[in] method Algorithm computation method */ template -Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { const Input * in = static_cast(input); return allocateImpl(in->get(data)->getNumberOfColumns(), in->get(data)->getNumberOfRows()); @@ -56,7 +56,7 @@ Status Result::allocate(const daal::algorithms::Input * input, const daal::algor * \param[in] method Algorithm computation method */ template -Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) +DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) { const OnlinePartialResult * in = static_cast(partialResult); return allocateImpl(in->getNumberOfColumns(), in->getNumberOfRows()); From a225f162f736f18523fba40b3c09f3d7ec1fd95a Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 01:04:12 -0700 Subject: [PATCH 073/120] fix for svd --- cpp/daal/include/algorithms/svd/svd_types.h | 2 +- cpp/daal/src/algorithms/svd/svd_dense_default_batch.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index 2da9b0efaf5..b16016747c7 100644 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -401,7 +401,7 @@ typedef services::SharedPtr OnlinePartialResultPtr; * \brief Provides methods to access final results obtained with the compute() method of the SVD algorithm in the batch processing mode * or with the finalizeCompute() method in the online processing mode or steps 2 and 3 in the distributed processing mode */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h b/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h index 2705f6540ab..14e3e396003 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_batch.h @@ -43,7 +43,7 @@ namespace interface1 * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method) { const Input * in = static_cast(input); return allocateImpl(in->get(data)->getNumberOfColumns(), in->get(data)->getNumberOfRows()); @@ -56,7 +56,7 @@ DAAL_EXPORT Status Result::allocate(const daal::algorithms::Input * input, const * \param[in] method Algorithm computation method */ template -DAAL_EXPORT Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) +Status Result::allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method) { const OnlinePartialResult * in = static_cast(partialResult); return allocateImpl(in->getNumberOfColumns(), in->getNumberOfRows()); From 894e1a2989d3086f50e7893ce1196ae192d58e3a Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 03:06:24 -0700 Subject: [PATCH 074/120] fix for svd --- cpp/daal/include/algorithms/svd/svd_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index b16016747c7..1e441b44faf 100644 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -181,7 +181,7 @@ struct Parameter : public daal::algorithms::Parameter * \brief Input objects for the SVD algorithm in the batch processing and online processing modes, and the first step in the distributed * processing mode */ -class Input : public daal::algorithms::Input +class DAAL_EXPORT Input : public daal::algorithms::Input { public: /** Default constructor */ From a2dedf2778657edb77cc6dfed03826f506c35bf9 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 03:31:40 -0700 Subject: [PATCH 075/120] fixes for transform and pca --- cpp/daal/include/algorithms/pca/pca_types.h | 4 ++-- .../include/algorithms/pca/transform/pca_transform_types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index f874c8319cd..41ace250e70 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -543,7 +543,7 @@ class DistributedParameter : pub * \brief Input objects for the PCA algorithm in the distributed processing mode */ template -class DistributedInput +class DAAL_EXPORT DistributedInput {}; /** @@ -681,7 +681,7 @@ class DAAL_EXPORT BaseBatchParameter : public daal::algorithms::Parameter * \brief Class that specifies the parameters of the PCA algorithm in the batch computing mode */ template -class BatchParameter +class DAAL_EXPORT BatchParameter {}; /** diff --git a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h index c97bbc2eff4..7841372fad5 100644 --- a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h +++ b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h @@ -106,7 +106,7 @@ namespace interface1 * \brief Input objects for the PCA transformation algorithm in the batch and online processing modes and for the first distributed step of the * algorithm. */ -class Input : public daal::algorithms::Input +class DAAL_EXPORT Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -226,7 +226,7 @@ typedef services::SharedPtr * \brief Parameters for the PCA transformation compute method */ -struct Parameter : public daal::algorithms::Parameter +struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter { /** * Parameter constructor From 2ba3770842f5489f82eeb17986cde445ea49cf08 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 05:44:01 -0700 Subject: [PATCH 076/120] fixes --- cpp/daal/include/algorithms/pca/pca_types.h | 10 +++++----- .../algorithms/pca/transform/pca_transform_types.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 41ace250e70..0a1939b1475 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -195,7 +195,7 @@ class InputIface : public daal::algorithms::Input * * \brief Input objects for the PCA algorithm */ -class Input : public InputIface +class DAAL_EXPORT Input : public InputIface { public: Input(); @@ -260,7 +260,7 @@ class PartialResultBase : public daal::algorithms::PartialResult * PCA algorithm in the online or distributed processing mode */ template -class PartialResult : public PartialResultBase +class DAAL_EXPORT PartialResult : public PartialResultBase {}; /** @@ -453,7 +453,7 @@ class PartialResult : public PartialResultBase * \brief Class that specifies the common parameters of the PCA algorithm */ template -class BaseParameter : public daal::algorithms::Parameter +class DAAL_EXPORT BaseParameter : public daal::algorithms::Parameter { public: /** Constructs PCA parameters */ @@ -465,7 +465,7 @@ class BaseParameter : public daal::algorithms::Parameter * \brief Class that specifies the parameters of the PCA algorithm in the online computing mode */ template -class OnlineParameter : public BaseParameter +class DAAL_EXPORT OnlineParameter : public BaseParameter {}; /** @@ -732,7 +732,7 @@ class BatchParameter : public BaseBatchParameter * * \brief Provides methods to access results obtained with the PCA algorithm */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) diff --git a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h index 7841372fad5..329fb8aff4f 100644 --- a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h +++ b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h @@ -176,7 +176,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * in the batch processing mode or finalizeCompute() method of algorithm in the online processing mode * or on the second and third steps of the algorithm in the distributed processing mode */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) From 5c78cd694d883d4d81eb6e079d26fc90e9343039 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 06:54:47 -0700 Subject: [PATCH 077/120] fixes pca(prev commit build fine) --- cpp/daal/include/algorithms/engines/engine_types.h | 2 +- cpp/daal/include/algorithms/svd/svd_types.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/daal/include/algorithms/engines/engine_types.h b/cpp/daal/include/algorithms/engines/engine_types.h index 1baecb34d54..86d46221ebd 100644 --- a/cpp/daal/include/algorithms/engines/engine_types.h +++ b/cpp/daal/include/algorithms/engines/engine_types.h @@ -71,7 +71,7 @@ namespace interface1 * * \brief %Input objects for engines */ -class Input : public daal::algorithms::Input +class DAAL_EXPORT Input : public daal::algorithms::Input { public: /** diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index 1e441b44faf..c183d365693 100644 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -222,7 +222,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * * \brief %Input objects for the second step of the SVD algorithm in the distributed processing mode */ -class DistributedStep2Input : public daal::algorithms::Input +class DAAL_EXPORT DistributedStep2Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -279,7 +279,7 @@ class DistributedStep2Input : public daal::algorithms::Input * * \brief %Input objects for the third step of the SVD algorithm in the distributed processing mode */ -class DistributedStep3Input : public daal::algorithms::Input +class DAAL_EXPORT DistributedStep3Input : public daal::algorithms::Input { public: /** Default constructor */ @@ -318,7 +318,7 @@ class DistributedStep3Input : public daal::algorithms::Input * \brief Provides methods to access partial results obtained with the compute() method of the SVD algorithm in the online processing mode or * the first step in the distributed processing mode */ -class OnlinePartialResult : public daal::algorithms::PartialResult +class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult { public: DECLARE_SERIALIZABLE_CAST(OnlinePartialResult) @@ -486,7 +486,7 @@ typedef services::SharedPtr ResultPtr; * \brief Provides methods to access partial results obtained with the compute() method of the SVD algorithm in the second step in the * distributed processing mode */ -class DistributedPartialResult : public daal::algorithms::PartialResult +class DAAL_EXPORT DistributedPartialResult : public daal::algorithms::PartialResult { public: DECLARE_SERIALIZABLE_CAST(DistributedPartialResult) @@ -585,7 +585,7 @@ typedef services::SharedPtr DistributedPartialResultPt * \brief Provides methods to access partial results obtained with the compute() method of the SVD algorithm * in the third step in the distributed processing mode */ -class DistributedPartialResultStep3 : public daal::algorithms::PartialResult +class DAAL_EXPORT DistributedPartialResultStep3 : public daal::algorithms::PartialResult { public: DECLARE_SERIALIZABLE_CAST(DistributedPartialResultStep3) From b12e495a0e2667a93743139b7e90c3d5c15600b3 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 09:39:14 -0700 Subject: [PATCH 078/120] minor fixes --- cpp/daal/include/algorithms/engines/engine_types.h | 2 +- .../include/algorithms/normalization/zscore_types.h | 2 +- cpp/daal/include/algorithms/pca/pca_types.h | 13 +++++++------ cpp/daal/include/algorithms/svd/svd_types.h | 12 ++++++------ 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/cpp/daal/include/algorithms/engines/engine_types.h b/cpp/daal/include/algorithms/engines/engine_types.h index 86d46221ebd..2cbd67b45be 100644 --- a/cpp/daal/include/algorithms/engines/engine_types.h +++ b/cpp/daal/include/algorithms/engines/engine_types.h @@ -111,7 +111,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * * \brief Provides methods to access the result obtained with the compute() method of the engine */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: /** \brief Constructor */ diff --git a/cpp/daal/include/algorithms/normalization/zscore_types.h b/cpp/daal/include/algorithms/normalization/zscore_types.h index c208f3099d1..a4ee74d4e3a 100644 --- a/cpp/daal/include/algorithms/normalization/zscore_types.h +++ b/cpp/daal/include/algorithms/normalization/zscore_types.h @@ -162,7 +162,7 @@ namespace interface2 * \brief Provides methods to access final results obtained with the compute() method of the * z-score normalization algorithm in the batch processing mode */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 0a1939b1475..736c68092b7 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -318,7 +318,7 @@ class PartialResult : public PartialRes * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Initializes memory to store partial results of the PCA SVD algorithm @@ -328,7 +328,7 @@ class PartialResult : public PartialRes * \return Status of initialization */ template - services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); protected: services::Status checkImpl(size_t nFeatures) const; @@ -425,7 +425,7 @@ class PartialResult : public PartialResultBase * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Initializes memory to store partial results of the PCA SVD algorithm @@ -435,7 +435,7 @@ class PartialResult : public PartialResultBase * \return Status of initialization */ template - services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); protected: services::Status checkImpl(size_t nFeatures) const; @@ -777,7 +777,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \param[in] method Computation method */ template - services::Status allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, daal::algorithms::Parameter * parameter, const Method method); /** * Allocates memory for storing partial results of the PCA algorithm * \param[in] partialResult Pointer to an object containing input data @@ -785,7 +785,8 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \param[in] method Computation method */ template - services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const Method method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, + const Method method); /** * Checks the results of the PCA algorithm diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index c183d365693..64f7acdbe47 100644 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -335,7 +335,7 @@ class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Initializes additional memory to store partial results of the SVD algorithm for each subsequent compute() method @@ -345,7 +345,7 @@ class DAAL_EXPORT OnlinePartialResult : public daal::algorithms::PartialResult * \return Status of initialization */ template - services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status initialize(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates additional memory to store partial results of the SVD algorithm for each subsequent compute() method @@ -425,7 +425,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store final results of the SVD algorithm @@ -500,7 +500,7 @@ class DAAL_EXPORT DistributedPartialResult : public daal::algorithms::PartialRes * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store partial results of the SVD algorithm based on the known structure of partial results from step 1 in the @@ -602,7 +602,7 @@ class DAAL_EXPORT DistributedPartialResultStep3 : public daal::algorithms::Parti * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store partial results of the SVD algorithm obtained in the third step in the distributed processing mode @@ -610,7 +610,7 @@ class DAAL_EXPORT DistributedPartialResultStep3 : public daal::algorithms::Parti * \param[in] qCollection DataCollection of all partial results from step 1 of the SVD algorithm in the distributed processing mode */ template - services::Status setPartialResultStorage(data_management::DataCollection * qCollection); + DAAL_EXPORT services::Status setPartialResultStorage(data_management::DataCollection * qCollection); /** * Returns results of the SVD algorithm with singular values and the left orthogonal matrix calculated From d116ef054482b62482e7f0c4c8c4e3f52676c618 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 11:07:46 -0700 Subject: [PATCH 079/120] minor fixes for pca --- cpp/daal/include/algorithms/pca/pca_types.h | 14 +++++++------- .../algorithms/pca/transform/pca_transform_types.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 736c68092b7..6b95b80cf40 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -273,7 +273,7 @@ class PartialResult : public PartialRes { public: DECLARE_SERIALIZABLE_CAST(PartialResult) - PartialResult(); + DAAL_EXPORT PartialResult(); /** * Gets partial results of the PCA Correlation algorithm @@ -351,7 +351,7 @@ class PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) - PartialResult(); + DAAL_EXPORT PartialResult(); /** * Gets partial results of the PCA SVD algorithm @@ -554,8 +554,8 @@ template <> class DistributedInput : public InputIface { public: - DistributedInput(); - DistributedInput(const DistributedInput & other); + DAAL_EXPORT DistributedInput(); + DAAL_EXPORT DistributedInput(const DistributedInput & other); /** * Sets input objects for the PCA on the second step in the distributed processing mode @@ -582,7 +582,7 @@ class DistributedInput : public InputIface * \param[in] id Identifier of the argument * \param[in] value Pointer to the argument */ - void add(Step2MasterInputId id, const services::SharedPtr > & value); + DAAL_EXPORT void add(Step2MasterInputId id, const services::SharedPtr > & value); /** * Returns the number of columns in the input data set @@ -607,8 +607,8 @@ template <> class DistributedInput : public InputIface { public: - DistributedInput(); - DistributedInput(const DistributedInput & other); + DAAL_EXPORT DistributedInput(); + DAAL_EXPORT DistributedInput(const DistributedInput & other); /** * Sets input objects for the PCA on the second step in the distributed processing mode diff --git a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h index 329fb8aff4f..480fc109ab8 100644 --- a/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h +++ b/cpp/daal/include/algorithms/pca/transform/pca_transform_types.h @@ -199,7 +199,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \param[in] method Algorithm method */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Sets an input object for the PCA transformation algorithm From 874a39e3e428cf06aa78459e8aa4d04fcffc7abb Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 12:15:29 -0700 Subject: [PATCH 080/120] fixes for pca --- cpp/daal/include/algorithms/pca/pca_types.h | 2 +- cpp/daal/include/algorithms/svd/svd_types.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 6b95b80cf40..525079d28fa 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -629,7 +629,7 @@ class DistributedInput : public InputIface * \param[in] id Identifier of the input object * \param[in] value Pointer to the input object */ - void add(Step2MasterInputId id, const services::SharedPtr > & value); + DAAL_EXPORT void add(Step2MasterInputId id, const services::SharedPtr > & value); /** * Retrieves specific partial result from the input objects of the PCA algorithm on the second step in the distributed processing mode diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index 64f7acdbe47..9606560fed3 100644 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -435,7 +435,8 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of allocation */ template - services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::PartialResult * partialResult, daal::algorithms::Parameter * parameter, + const int method); /** * Sets the final result of the SVD algorithm From e3d89c296fa404b8758b88081c070d7e008804b1 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 17 Apr 2024 15:13:47 -0700 Subject: [PATCH 081/120] minor fix for icl --- cpp/daal/include/algorithms/pca/pca_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 525079d28fa..256787ecafc 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -260,7 +260,7 @@ class PartialResultBase : public daal::algorithms::PartialResult * PCA algorithm in the online or distributed processing mode */ template -class DAAL_EXPORT PartialResult : public PartialResultBase +class PartialResult : public PartialResultBase {}; /** @@ -543,7 +543,7 @@ class DistributedParameter : pub * \brief Input objects for the PCA algorithm in the distributed processing mode */ template -class DAAL_EXPORT DistributedInput +class DistributedInput {}; /** From 6f787c1ff10be5ae0561a5244ffd05c7c25f7e2e Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 18 Apr 2024 11:13:37 -0700 Subject: [PATCH 082/120] minor fix for makefile --- dev/make/compiler_definitions/icx.mkl.32e.mk | 4 ++-- makefile | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 0b139177d1c..d6bfd827d21 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -30,10 +30,10 @@ CORE.SERV.COMPILER.icx = generic -Qopt = $(if $(OS_is_win),-qopt-,-qopt-) COMPILER.lnx.icx = icx -m64 \ - -Werror -Wreturn-type + -Werror -Wreturn-type -O2 -O3 -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Qopenmp-simd -Wno-deprecated-declarations +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -O2 -O3 -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 diff --git a/makefile b/makefile index 5abdaa1a6a4..c879de30ff4 100644 --- a/makefile +++ b/makefile @@ -118,6 +118,7 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) +-cxx11 := $(if $(OS_is_win),/Qstd=c++11,-std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) @@ -482,7 +483,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) $(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) @@ -492,7 +493,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -839,7 +840,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From fbfc3bb62faf223f787d0f0a12aec5b007cbd67d Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 18 Apr 2024 11:21:56 -0700 Subject: [PATCH 083/120] add new exports --- cpp/daal/include/algorithms/algorithm_types.h | 2 +- .../algorithms/pca/pca_explained_variance_types.h | 8 ++++---- cpp/daal/include/algorithms/pca/pca_types.h | 14 +++++++------- cpp/daal/include/algorithms/svd/svd_types.h | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cpp/daal/include/algorithms/algorithm_types.h b/cpp/daal/include/algorithms/algorithm_types.h index aeea6b1b8ce..3456f4293a6 100644 --- a/cpp/daal/include/algorithms/algorithm_types.h +++ b/cpp/daal/include/algorithms/algorithm_types.h @@ -352,7 +352,7 @@ class PartialResult : public SerializableArgument /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - virtual int getSerializationTag() const { return 0; } + DAAL_EXPORT virtual int getSerializationTag() const { return 0; } /** * Retrieves the initialization flag diff --git a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h index 3f9b37065c7..867b432fbb5 100644 --- a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h +++ b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h @@ -108,7 +108,7 @@ struct Parameter : public daal::algorithms::Parameter * * \brief %Input objects for explained variance quality metrics */ -class Input : public daal::algorithms::Input +class DAAL_EXPORT Input : public daal::algorithms::Input { public: DAAL_CAST_OPERATOR(Input) @@ -140,7 +140,7 @@ class Input : public daal::algorithms::Input * * \return Status of computations */ - services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; }; typedef services::SharedPtr InputPtr; @@ -148,7 +148,7 @@ typedef services::SharedPtr InputPtr; * * \brief Provides interface for the result of linear regression quality metrics */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -189,7 +189,7 @@ class Result : public daal::algorithms::Result * * \return Status of computations */ - services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; protected: using daal::algorithms::interface1::Result::check; diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 256787ecafc..47681db4ab9 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -280,7 +280,7 @@ class PartialResult : public PartialRes * \param[in] id Identifier of the input object * \return Input object that corresponds to the given identifier */ - data_management::NumericTablePtr get(PartialCorrelationResultId id) const; + DAAL_EXPORT data_management::NumericTablePtr get(PartialCorrelationResultId id) const; virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; @@ -289,7 +289,7 @@ class PartialResult : public PartialRes * \param[in] id Identifier of the result * \param[in] value Pointer to the object */ - void set(const PartialCorrelationResultId id, const data_management::NumericTablePtr & value); + DAAL_EXPORT void set(const PartialCorrelationResultId id, const data_management::NumericTablePtr & value); virtual ~PartialResult() {}; @@ -300,7 +300,7 @@ class PartialResult : public PartialRes * \param[in] method Computation method * \return Errors detected while checking */ - services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; /** * Checks partial results of the PCA Ccorrelation algorithm @@ -308,7 +308,7 @@ class PartialResult : public PartialRes * \param[in] method Computation method * \return Errors detected while checking */ - services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; /** * Allocates memory to store partial results of the PCA SVD algorithm @@ -358,7 +358,7 @@ class PartialResult : public PartialResultBase * \param[in] id Identifier of the input object * \return Input object that corresponds to the given identifier */ - data_management::NumericTablePtr get(PartialSVDTableResultId id) const; + DAAL_EXPORT data_management::NumericTablePtr get(PartialSVDTableResultId id) const; virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; @@ -382,7 +382,7 @@ class PartialResult : public PartialResultBase * \param[in] id Identifier of the result * \param[in] value Pointer to the object */ - void set(PartialSVDTableResultId id, const data_management::NumericTablePtr & value); + DAAL_EXPORT void set(PartialSVDTableResultId id, const data_management::NumericTablePtr & value); /** * Sets partial result of the PCA SVD algorithm @@ -562,7 +562,7 @@ class DistributedInput : public InputIface * \param[in] id Identifier of the input object * \param[in] ptr Input object that corresponds to the given identifier */ - void set(Step2MasterInputId id, const data_management::DataCollectionPtr & ptr); + DAAL_EXPORT void set(Step2MasterInputId id, const data_management::DataCollectionPtr & ptr); /** * Gets input objects for the PCA on the second step in the distributed processing mode diff --git a/cpp/daal/include/algorithms/svd/svd_types.h b/cpp/daal/include/algorithms/svd/svd_types.h index 9606560fed3..cce06a36441 100644 --- a/cpp/daal/include/algorithms/svd/svd_types.h +++ b/cpp/daal/include/algorithms/svd/svd_types.h @@ -514,7 +514,7 @@ class DAAL_EXPORT DistributedPartialResult : public daal::algorithms::PartialRes * \param[out] nBlocks Number of rows in the input data set */ template - services::Status setPartialResultStorage(data_management::KeyValueDataCollection * inCollection, size_t & nBlocks); + DAAL_EXPORT services::Status setPartialResultStorage(data_management::KeyValueDataCollection * inCollection, size_t & nBlocks); /** * Returns partial results of the SVD algorithm. From c380439b0e754ec670ae4c990fb427e7bc0b2e41 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 18 Apr 2024 12:12:40 -0700 Subject: [PATCH 084/120] makefile fix --- makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index c879de30ff4..5abdaa1a6a4 100644 --- a/makefile +++ b/makefile @@ -118,7 +118,6 @@ scr := $(if $(OS_is_win),bat,sh) y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Fo := $(if $(OS_is_win),-Fo,-o) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) --cxx11 := $(if $(OS_is_win),/Qstd=c++11,-std=c++11) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) -Zl := $(-Zl.$(COMPILER)) @@ -483,7 +482,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) \ $(CORE.tmpdir_y)/$(core_y:%.$y=%_link.txt) ; $(LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(CORE.objs_a): $(CORE.tmpdir_a)/inc_a_folders.txt -$(CORE.objs_a): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_a): COPT += -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) @@ -493,7 +492,7 @@ $(filter %threading.$o, $(CORE.objs_a)): COPT += -D__DO_TBB_LAYER__ $(eval $(call append_uarch_copt,$(CORE.objs_a))) $(CORE.objs_y): $(CORE.tmpdir_y)/inc_y_folders.txt -$(CORE.objs_y): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(CORE.objs_y): COPT += -D__DAAL_IMPLEMENTATION \ -D__TBB_NO_IMPLICIT_LINKAGE -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -840,7 +839,7 @@ THR.objs_y := $(THR_TBB.objs_y) THR_TBB.objs := $(THR_TBB.objs_a) $(THR_TBB.objs_y) THR.objs := $(THR.objs_a) $(THR.objs_y) -$(THR.objs): COPT += $(-fPIC) $(-cxx11) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX +$(THR.objs): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) -DDAAL_HIDE_DEPRECATED -DTBB_USE_ASSERT=0 -D_ENABLE_ATOMIC_ALIGNMENT_FIX $(THR_TBB.objs): COPT += -D__DO_TBB_LAYER__ $(THR.objs_a): $(THR.tmpdir_a)/thr_inc_a_folders.txt From 402c1de20a39e110004d0852de61ab83cc9cc1e1 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 18 Apr 2024 12:48:24 -0700 Subject: [PATCH 085/120] minor fix --- .../include/algorithms/pca/pca_explained_variance_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h index 867b432fbb5..1e0485d0fa6 100644 --- a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h +++ b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h @@ -140,7 +140,7 @@ class DAAL_EXPORT Input : public daal::algorithms::Input * * \return Status of computations */ - DAAL_EXPORT services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; }; typedef services::SharedPtr InputPtr; @@ -189,7 +189,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * * \return Status of computations */ - DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; protected: using daal::algorithms::interface1::Result::check; From 36207d1a87e723c2ee3cd4b712c20270809d6601 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 19 Apr 2024 01:03:15 -0700 Subject: [PATCH 086/120] minor fixes --- cpp/daal/include/algorithms/pca/pca_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 47681db4ab9..ce878608428 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -300,7 +300,8 @@ class PartialResult : public PartialRes * \param[in] method Computation method * \return Errors detected while checking */ - DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + int method) const DAAL_C11_OVERRIDE; /** * Checks partial results of the PCA Ccorrelation algorithm From e06b4b548fac351a192f8cf4cfbd14ac4d1a91c4 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 19 Apr 2024 03:08:48 -0700 Subject: [PATCH 087/120] minor fixes for unresolved symbols --- cpp/daal/include/algorithms/algorithm_types.h | 2 +- .../algorithms/pca/pca_explained_variance_types.h | 4 ++-- .../algorithms/pca/pca_quality_metric_set_types.h | 8 ++++---- cpp/daal/include/algorithms/pca/pca_types.h | 11 ++++++----- .../src/algorithms/pca/metrics/pca_quality_metric.cpp | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/cpp/daal/include/algorithms/algorithm_types.h b/cpp/daal/include/algorithms/algorithm_types.h index 3456f4293a6..76719f80f2d 100644 --- a/cpp/daal/include/algorithms/algorithm_types.h +++ b/cpp/daal/include/algorithms/algorithm_types.h @@ -423,7 +423,7 @@ class Result : public SerializableArgument /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - virtual int getSerializationTag() const { return 0; } + DAAL_EXPORT virtual int getSerializationTag() const { return 0; } /** * Checks the correctness of the final results structure diff --git a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h index 1e0485d0fa6..f55dda6efaa 100644 --- a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h +++ b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h @@ -89,7 +89,7 @@ namespace interface1 /* [Parameter source code] */ struct Parameter : public daal::algorithms::Parameter { - Parameter(size_t nFeatures, size_t nComponents); + DAAL_EXPORT Parameter(size_t nFeatures, size_t nComponents); virtual ~Parameter() {} size_t nFeatures; /*!< Number of features */ @@ -179,7 +179,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of computations */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method); /** * Checks the result of linear regression quality metrics diff --git a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h index 09614cbaed5..947f9f771a5 100644 --- a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h +++ b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_types.h @@ -66,7 +66,7 @@ namespace interface1 /* [Parameter source code] */ struct Parameter : public daal::algorithms::Parameter { - Parameter(size_t nComponents = 0, size_t nFeatures = 0); + DAAL_EXPORT Parameter(size_t nComponents = 0, size_t nFeatures = 0); virtual ~Parameter() {} @@ -78,7 +78,7 @@ struct Parameter : public daal::algorithms::Parameter * * \return Status of computations */ - virtual services::Status check() const; + DAAL_EXPORT virtual services::Status check() const; }; /* [Parameter source code] */ @@ -98,7 +98,7 @@ class ResultCollection : public algorithms::quality_metric_set::ResultCollection * \param[in] id Identifier of the result * \return Result that corresponds to the given identifier */ - algorithms::ResultPtr getResult(QualityMetricId id) const; + DAAL_EXPORT algorithms::ResultPtr getResult(QualityMetricId id) const; }; typedef services::SharedPtr ResultCollectionPtr; @@ -118,7 +118,7 @@ class InputDataCollection : public algorithms::quality_metric_set::InputDataColl * \param[in] id Identifier of the input object * \return %Input object that corresponds to the given identifier */ - algorithms::InputPtr getInput(QualityMetricId id) const; + DAAL_EXPORT algorithms::InputPtr getInput(QualityMetricId id) const; }; typedef services::SharedPtr InputDataCollectionPtr; diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index ce878608428..b79c2f8f1ce 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -282,7 +282,7 @@ class PartialResult : public PartialRes */ DAAL_EXPORT data_management::NumericTablePtr get(PartialCorrelationResultId id) const; - virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** * Sets partial result of the PCA Correlation algorithm @@ -390,7 +390,7 @@ class PartialResult : public PartialResultBase * \param[in] id Identifier of the result * \param[in] value Pointer to the object */ - void set(PartialSVDCollectionResultId id, const data_management::DataCollectionPtr & value); + DAAL_EXPORT void set(PartialSVDCollectionResultId id, const data_management::DataCollectionPtr & value); /** * Adds partial result of the PCA SVD algorithm @@ -406,7 +406,8 @@ class PartialResult : public PartialResultBase * \param[in] method Computation method * \return Errors detected while checking */ - services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + int method) const DAAL_C11_OVERRIDE; /** * Checks partial results of the PCA SVD algorithm @@ -414,7 +415,7 @@ class PartialResult : public PartialResultBase * \param[in] par %Parameter of algorithm * \return Errors detected while checking */ - services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + DAAL_EXPORT services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; virtual ~PartialResult() {}; @@ -616,7 +617,7 @@ class DistributedInput : public InputIface * \param[in] id Identifier of the input object * \param[in] ptr Input object that corresponds to the given identifier */ - void set(Step2MasterInputId id, const data_management::DataCollectionPtr & ptr); + DAAL_EXPORT void set(Step2MasterInputId id, const data_management::DataCollectionPtr & ptr); /** * Gets input objects for the PCA algorithm on the second step in the distributed processing mode diff --git a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp index 66bb895985d..8512127c839 100755 --- a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp +++ b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp @@ -48,7 +48,7 @@ services::Status Parameter::check() const return services::Status(); } -void Batch::initializeQualityMetrics() +DAAL_EXPORT void Batch::initializeQualityMetrics() { inputAlgorithms[explainedVariancesMetrics] = SharedPtr >( new pca::quality_metric::explained_variance::Batch<>(parameter.nFeatures, parameter.nComponents)); From c5a6d6bcc787b57fcad58c14c5b2f8f6262b0d89 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 19 Apr 2024 04:26:53 -0700 Subject: [PATCH 088/120] minor fixes --- cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h | 2 +- cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h index dbc9d979fb4..5c20f19e462 100644 --- a/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h +++ b/cpp/daal/include/algorithms/pca/pca_quality_metric_set_batch.h @@ -99,7 +99,7 @@ class Batch : public algorithms::quality_metric_set::Batch } protected: - virtual void initializeQualityMetrics(); + DAAL_EXPORT virtual void initializeQualityMetrics(); }; /** @} */ } // namespace interface1 diff --git a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp index 8512127c839..66bb895985d 100755 --- a/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp +++ b/cpp/daal/src/algorithms/pca/metrics/pca_quality_metric.cpp @@ -48,7 +48,7 @@ services::Status Parameter::check() const return services::Status(); } -DAAL_EXPORT void Batch::initializeQualityMetrics() +void Batch::initializeQualityMetrics() { inputAlgorithms[explainedVariancesMetrics] = SharedPtr >( new pca::quality_metric::explained_variance::Batch<>(parameter.nFeatures, parameter.nComponents)); From 40590c619a94389c0c0469174ab1fcd80a80cd5d Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 19 Apr 2024 07:24:02 -0700 Subject: [PATCH 089/120] minor fixes --- .../include/algorithms/pca/pca_explained_variance_types.h | 2 +- cpp/daal/include/algorithms/pca/pca_types.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h index f55dda6efaa..02fd0bc26ca 100644 --- a/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h +++ b/cpp/daal/include/algorithms/pca/pca_explained_variance_types.h @@ -100,7 +100,7 @@ struct Parameter : public daal::algorithms::Parameter * * \return Status of computations */ - virtual services::Status check() const; + DAAL_EXPORT virtual services::Status check() const; }; /* [Parameter source code] */ diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index b79c2f8f1ce..4935c275531 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -282,6 +282,8 @@ class PartialResult : public PartialRes */ DAAL_EXPORT data_management::NumericTablePtr get(PartialCorrelationResultId id) const; + DAAL_EXPORT virtual size_t getSerializationTag() const DAAL_C11_OVERRIDE; + DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** @@ -361,14 +363,16 @@ class PartialResult : public PartialResultBase */ DAAL_EXPORT data_management::NumericTablePtr get(PartialSVDTableResultId id) const; - virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + DAAL_EXPORT virtual size_t getSerializationTag() const DAAL_C11_OVERRIDE; + + DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object * \return Input object that corresponds to the given identifier */ - data_management::DataCollectionPtr get(PartialSVDCollectionResultId id) const; + DAAL_EXPORT data_management::DataCollectionPtr get(PartialSVDCollectionResultId id) const; /** * Gets partial results of the PCA SVD algorithm From 2f437a2111d9e0d5e9f11650100bc1fe4efb81ac Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 19 Apr 2024 10:37:47 -0700 Subject: [PATCH 090/120] minor fix --- cpp/daal/include/algorithms/algorithm_types.h | 4 ++-- cpp/daal/include/algorithms/pca/pca_types.h | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cpp/daal/include/algorithms/algorithm_types.h b/cpp/daal/include/algorithms/algorithm_types.h index 76719f80f2d..aeea6b1b8ce 100644 --- a/cpp/daal/include/algorithms/algorithm_types.h +++ b/cpp/daal/include/algorithms/algorithm_types.h @@ -352,7 +352,7 @@ class PartialResult : public SerializableArgument /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - DAAL_EXPORT virtual int getSerializationTag() const { return 0; } + virtual int getSerializationTag() const { return 0; } /** * Retrieves the initialization flag @@ -423,7 +423,7 @@ class Result : public SerializableArgument /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - DAAL_EXPORT virtual int getSerializationTag() const { return 0; } + virtual int getSerializationTag() const { return 0; } /** * Checks the correctness of the final results structure diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 4935c275531..a1ecd9d65db 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -272,7 +272,7 @@ template <> class PartialResult : public PartialResultBase { public: - DECLARE_SERIALIZABLE_CAST(PartialResult) + DAAL_EXPORT DECLARE_SERIALIZABLE_CAST(PartialResult) DAAL_EXPORT PartialResult(); /** @@ -282,8 +282,6 @@ class PartialResult : public PartialRes */ DAAL_EXPORT data_management::NumericTablePtr get(PartialCorrelationResultId id) const; - DAAL_EXPORT virtual size_t getSerializationTag() const DAAL_C11_OVERRIDE; - DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** @@ -353,7 +351,7 @@ template <> class PartialResult : public PartialResultBase { public: - DECLARE_SERIALIZABLE_CAST(PartialResult) + DAAL_EXPORT DECLARE_SERIALIZABLE_CAST(PartialResult) DAAL_EXPORT PartialResult(); /** @@ -363,8 +361,6 @@ class PartialResult : public PartialResultBase */ DAAL_EXPORT data_management::NumericTablePtr get(PartialSVDTableResultId id) const; - DAAL_EXPORT virtual size_t getSerializationTag() const DAAL_C11_OVERRIDE; - DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** From f49d780f1cd129e482618ab2b8d1ef83473fb097 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 19 Apr 2024 12:39:20 -0700 Subject: [PATCH 091/120] fix for win --- cpp/daal/include/algorithms/pca/pca_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index a1ecd9d65db..4187e08d4d5 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -272,7 +272,7 @@ template <> class PartialResult : public PartialResultBase { public: - DAAL_EXPORT DECLARE_SERIALIZABLE_CAST(PartialResult) + DECLARE_SERIALIZABLE_CAST(PartialResult) DAAL_EXPORT PartialResult(); /** @@ -351,7 +351,7 @@ template <> class PartialResult : public PartialResultBase { public: - DAAL_EXPORT DECLARE_SERIALIZABLE_CAST(PartialResult) + DECLARE_SERIALIZABLE_CAST(PartialResult) DAAL_EXPORT PartialResult(); /** From b691ea452f87b3f71b771413b7d4be5ac21c4c25 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 00:32:52 -0700 Subject: [PATCH 092/120] minor fix --- cpp/daal/include/algorithms/pca/pca_types.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 4187e08d4d5..fb19ba7b9bf 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -251,6 +251,8 @@ class PartialResultBase : public daal::algorithms::PartialResult virtual size_t getNFeatures() const = 0; + virtual int getSerializationTag() const = 0; + virtual ~PartialResultBase() {}; }; @@ -284,6 +286,8 @@ class PartialResult : public PartialRes DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + DAAL_EXPORT virtual int getSerializationTag() const DAAL_C11_OVERRIDE; + /** * Sets partial result of the PCA Correlation algorithm * \param[in] id Identifier of the result @@ -363,6 +367,7 @@ class PartialResult : public PartialResultBase DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + DAAL_EXPORT virtual int getSerializationTag() const DAAL_C11_OVERRIDE; /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object From 942c7daacf59ad4e3aa176a8808cef68d67c72ae Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 00:55:38 -0700 Subject: [PATCH 093/120] minor fix --- cpp/daal/include/algorithms/pca/pca_types.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index fb19ba7b9bf..161d35e51a5 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -251,8 +251,6 @@ class PartialResultBase : public daal::algorithms::PartialResult virtual size_t getNFeatures() const = 0; - virtual int getSerializationTag() const = 0; - virtual ~PartialResultBase() {}; }; @@ -271,7 +269,7 @@ class PartialResult : public PartialResultBase * in the online or distributed processing mode */ template <> -class PartialResult : public PartialResultBase +class DAAL_EXPORT PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) @@ -286,8 +284,6 @@ class PartialResult : public PartialRes DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; - DAAL_EXPORT virtual int getSerializationTag() const DAAL_C11_OVERRIDE; - /** * Sets partial result of the PCA Correlation algorithm * \param[in] id Identifier of the result @@ -352,7 +348,7 @@ class PartialResult : public PartialRes * in the online or distributed processing mode */ template <> -class PartialResult : public PartialResultBase +class DAAL_EXPORT PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) @@ -367,7 +363,6 @@ class PartialResult : public PartialResultBase DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; - DAAL_EXPORT virtual int getSerializationTag() const DAAL_C11_OVERRIDE; /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object From 295c372613ebc0e8b5eddfea4ad0b88bf2a942ac Mon Sep 17 00:00:00 2001 From: Aleksandr Solovev Date: Mon, 22 Apr 2024 12:11:35 +0200 Subject: [PATCH 094/120] Update dev/make/compiler_definitions/icx.mkl.32e.mk Co-authored-by: Aleksei Khomenko --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index d6bfd827d21..32eb12ffdf3 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -20,7 +20,7 @@ PLATs.icx = lnx32e win32e -CMPLRDIRSUFF.icx = _icx +CMPLRDIRSUFF.icx = CORE.SERV.COMPILER.icx = generic From 932dae8bc772031f47b563380be26262b4e3abfa Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 03:17:14 -0700 Subject: [PATCH 095/120] minor fix for export --- cpp/daal/include/algorithms/pca/pca_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 161d35e51a5..4187e08d4d5 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -269,7 +269,7 @@ class PartialResult : public PartialResultBase * in the online or distributed processing mode */ template <> -class DAAL_EXPORT PartialResult : public PartialResultBase +class PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) @@ -348,7 +348,7 @@ class DAAL_EXPORT PartialResult : publi * in the online or distributed processing mode */ template <> -class DAAL_EXPORT PartialResult : public PartialResultBase +class PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) From 1236120672a5fe8899b5db6646d0d64c9296e40e Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 03:57:35 -0700 Subject: [PATCH 096/120] minor fix --- cpp/daal/include/data_management/data/data_serialize.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/data_management/data/data_serialize.h b/cpp/daal/include/data_management/data/data_serialize.h index 9d1c67e8bb0..4d2f93c1887 100755 --- a/cpp/daal/include/data_management/data/data_serialize.h +++ b/cpp/daal/include/data_management/data/data_serialize.h @@ -69,7 +69,7 @@ class DAAL_EXPORT SerializationIface : public Base * Returns a serialization tag, a unique identifier of this class used in serialization * \return Serialization tag */ - virtual int getSerializationTag() const = 0; + DAAL_EXPORT virtual int getSerializationTag() const = 0; /** * Interfaces for the implementation of serialization From c1764878f972efbe4ea37d6b5662a9f5c855e379 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 05:10:54 -0700 Subject: [PATCH 097/120] temporary revert --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 32eb12ffdf3..d6bfd827d21 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -20,7 +20,7 @@ PLATs.icx = lnx32e win32e -CMPLRDIRSUFF.icx = +CMPLRDIRSUFF.icx = _icx CORE.SERV.COMPILER.icx = generic From b3fd6fc913864cae1def11d7f6bb54581490d0ec Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 07:03:24 -0700 Subject: [PATCH 098/120] fix for compiler --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index d6bfd827d21..32eb12ffdf3 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -20,7 +20,7 @@ PLATs.icx = lnx32e win32e -CMPLRDIRSUFF.icx = _icx +CMPLRDIRSUFF.icx = CORE.SERV.COMPILER.icx = generic From 273946b98499a588caa54286e0a33aada0ef039c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 08:57:12 -0700 Subject: [PATCH 099/120] fix for win --- cpp/daal/include/algorithms/pca/pca_types.h | 6 ++++++ cpp/daal/include/data_management/data/data_serialize.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 4187e08d4d5..394f468de15 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -284,6 +284,7 @@ class PartialResult : public PartialRes DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + DAAL_EXPORT int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_PCA_CORRELATION_DENSE_ID; } /** * Sets partial result of the PCA Correlation algorithm * \param[in] id Identifier of the result @@ -363,6 +364,11 @@ class PartialResult : public PartialResultBase DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + /** + * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() + */ + DAAL_EXPORT int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_PCA_SVD_DENSE_ID; } + /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object diff --git a/cpp/daal/include/data_management/data/data_serialize.h b/cpp/daal/include/data_management/data/data_serialize.h index 4d2f93c1887..9d1c67e8bb0 100755 --- a/cpp/daal/include/data_management/data/data_serialize.h +++ b/cpp/daal/include/data_management/data/data_serialize.h @@ -69,7 +69,7 @@ class DAAL_EXPORT SerializationIface : public Base * Returns a serialization tag, a unique identifier of this class used in serialization * \return Serialization tag */ - DAAL_EXPORT virtual int getSerializationTag() const = 0; + virtual int getSerializationTag() const = 0; /** * Interfaces for the implementation of serialization From deaf1b66697a961304fb398f81fb471df17ca68e Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 10:21:42 -0700 Subject: [PATCH 100/120] fixes for serialization tag --- cpp/daal/include/algorithms/pca/pca_types.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 394f468de15..4187e08d4d5 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -284,7 +284,6 @@ class PartialResult : public PartialRes DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; - DAAL_EXPORT int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_PCA_CORRELATION_DENSE_ID; } /** * Sets partial result of the PCA Correlation algorithm * \param[in] id Identifier of the result @@ -364,11 +363,6 @@ class PartialResult : public PartialResultBase DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; - /** - * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() - */ - DAAL_EXPORT int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_PCA_SVD_DENSE_ID; } - /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object From 1d62f074d034eda80bf3b96449a5cd57f184472f Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 22 Apr 2024 14:59:27 -0700 Subject: [PATCH 101/120] fix for serialization --- cpp/daal/include/algorithms/algorithm_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/algorithm_types.h b/cpp/daal/include/algorithms/algorithm_types.h index aeea6b1b8ce..3456f4293a6 100644 --- a/cpp/daal/include/algorithms/algorithm_types.h +++ b/cpp/daal/include/algorithms/algorithm_types.h @@ -352,7 +352,7 @@ class PartialResult : public SerializableArgument /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - virtual int getSerializationTag() const { return 0; } + DAAL_EXPORT virtual int getSerializationTag() const { return 0; } /** * Retrieves the initialization flag From 2e12b18908af40f655591a0aba7d3549f5a9248b Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 23 Apr 2024 01:45:26 -0700 Subject: [PATCH 102/120] minor fix --- .ci/pipeline/ci.yml | 2 +- cpp/daal/include/algorithms/algorithm_types.h | 2 +- cpp/daal/include/algorithms/model.h | 2 +- cpp/daal/include/data_management/data/data_dictionary.h | 2 +- .../data_management/data_source/data_source_dictionary.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/pipeline/ci.yml b/.ci/pipeline/ci.yml index ba612e9fe64..2fb7416ea7d 100755 --- a/.ci/pipeline/ci.yml +++ b/.ci/pipeline/ci.yml @@ -181,7 +181,7 @@ jobs: - job: 'LinuxMakeDPCPP' timeoutInMinutes: 0 variables: - release.dir: '__release_lnx_icx' + release.dir: '__release_lnx' platform.type : 'lnx32e' pool: vmImage: 'ubuntu-22.04' diff --git a/cpp/daal/include/algorithms/algorithm_types.h b/cpp/daal/include/algorithms/algorithm_types.h index 3456f4293a6..76719f80f2d 100644 --- a/cpp/daal/include/algorithms/algorithm_types.h +++ b/cpp/daal/include/algorithms/algorithm_types.h @@ -423,7 +423,7 @@ class Result : public SerializableArgument /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - virtual int getSerializationTag() const { return 0; } + DAAL_EXPORT virtual int getSerializationTag() const { return 0; } /** * Checks the correctness of the final results structure diff --git a/cpp/daal/include/algorithms/model.h b/cpp/daal/include/algorithms/model.h index 064bcbf93d6..40265bfe7c5 100644 --- a/cpp/daal/include/algorithms/model.h +++ b/cpp/daal/include/algorithms/model.h @@ -62,7 +62,7 @@ class Model : public data_management::SerializationIface /** * \copydoc daal::data_management::interface1::SerializationIface::getSerializationTag() */ - int getSerializationTag() const DAAL_C11_OVERRIDE { return 0; } + DAAL_EXPORT int getSerializationTag() const DAAL_C11_OVERRIDE { return 0; } protected: template diff --git a/cpp/daal/include/data_management/data/data_dictionary.h b/cpp/daal/include/data_management/data/data_dictionary.h index 55f5c3534a2..2308e152f84 100755 --- a/cpp/daal/include/data_management/data/data_dictionary.h +++ b/cpp/daal/include/data_management/data/data_dictionary.h @@ -128,7 +128,7 @@ class NumericTableFeature : public SerializationIface return services::Status(); } - virtual int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_DATAFEATURE_NT_ID; } + DAAL_EXPORT virtual int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_DATAFEATURE_NT_ID; } features::IndexNumType getIndexType() const { return indexType; } }; diff --git a/cpp/daal/include/data_management/data_source/data_source_dictionary.h b/cpp/daal/include/data_management/data_source/data_source_dictionary.h index 6f69289f171..c13505c17af 100755 --- a/cpp/daal/include/data_management/data_source/data_source_dictionary.h +++ b/cpp/daal/include/data_management/data_source/data_source_dictionary.h @@ -229,7 +229,7 @@ class DataSourceFeature : public SerializationIface return status; } - virtual int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_DATAFEATURE_NT_ID; } + DAAL_EXPORT virtual int getSerializationTag() const DAAL_C11_OVERRIDE { return SERIALIZATION_DATAFEATURE_NT_ID; } features::IndexNumType getIndexType() const { return ntFeature.indexType; } From 87e2a649f91eed0abf8a84c534c7546f6032905c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 23 Apr 2024 03:56:17 -0700 Subject: [PATCH 103/120] fix for pca partial --- cpp/daal/include/algorithms/pca/pca_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 4187e08d4d5..161d35e51a5 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -269,7 +269,7 @@ class PartialResult : public PartialResultBase * in the online or distributed processing mode */ template <> -class PartialResult : public PartialResultBase +class DAAL_EXPORT PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) @@ -348,7 +348,7 @@ class PartialResult : public PartialRes * in the online or distributed processing mode */ template <> -class PartialResult : public PartialResultBase +class DAAL_EXPORT PartialResult : public PartialResultBase { public: DECLARE_SERIALIZABLE_CAST(PartialResult) From de8a26f69ee506814f62c1db4c4be7df27620112 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 23 Apr 2024 05:47:19 -0700 Subject: [PATCH 104/120] minor fix --- cpp/daal/include/algorithms/pca/pca_types.h | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 161d35e51a5..12d4c809d42 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -273,23 +273,23 @@ class DAAL_EXPORT PartialResult : publi { public: DECLARE_SERIALIZABLE_CAST(PartialResult) - DAAL_EXPORT PartialResult(); + PartialResult(); /** * Gets partial results of the PCA Correlation algorithm * \param[in] id Identifier of the input object * \return Input object that corresponds to the given identifier */ - DAAL_EXPORT data_management::NumericTablePtr get(PartialCorrelationResultId id) const; + data_management::NumericTablePtr get(PartialCorrelationResultId id) const; - DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** * Sets partial result of the PCA Correlation algorithm * \param[in] id Identifier of the result * \param[in] value Pointer to the object */ - DAAL_EXPORT void set(const PartialCorrelationResultId id, const data_management::NumericTablePtr & value); + void set(const PartialCorrelationResultId id, const data_management::NumericTablePtr & value); virtual ~PartialResult() {}; @@ -300,7 +300,7 @@ class DAAL_EXPORT PartialResult : publi * \param[in] method Computation method * \return Errors detected while checking */ - DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; /** @@ -309,7 +309,7 @@ class DAAL_EXPORT PartialResult : publi * \param[in] method Computation method * \return Errors detected while checking */ - DAAL_EXPORT services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; /** * Allocates memory to store partial results of the PCA SVD algorithm @@ -352,23 +352,23 @@ class DAAL_EXPORT PartialResult : public Partia { public: DECLARE_SERIALIZABLE_CAST(PartialResult) - DAAL_EXPORT PartialResult(); + PartialResult(); /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object * \return Input object that corresponds to the given identifier */ - DAAL_EXPORT data_management::NumericTablePtr get(PartialSVDTableResultId id) const; + data_management::NumericTablePtr get(PartialSVDTableResultId id) const; - DAAL_EXPORT virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; + virtual size_t getNFeatures() const DAAL_C11_OVERRIDE; /** * Gets partial results of the PCA SVD algorithm * \param[in] id Identifier of the input object * \return Input object that corresponds to the given identifier */ - DAAL_EXPORT data_management::DataCollectionPtr get(PartialSVDCollectionResultId id) const; + data_management::DataCollectionPtr get(PartialSVDCollectionResultId id) const; /** * Gets partial results of the PCA SVD algorithm @@ -383,14 +383,14 @@ class DAAL_EXPORT PartialResult : public Partia * \param[in] id Identifier of the result * \param[in] value Pointer to the object */ - DAAL_EXPORT void set(PartialSVDTableResultId id, const data_management::NumericTablePtr & value); + void set(PartialSVDTableResultId id, const data_management::NumericTablePtr & value); /** * Sets partial result of the PCA SVD algorithm * \param[in] id Identifier of the result * \param[in] value Pointer to the object */ - DAAL_EXPORT void set(PartialSVDCollectionResultId id, const data_management::DataCollectionPtr & value); + void set(PartialSVDCollectionResultId id, const data_management::DataCollectionPtr & value); /** * Adds partial result of the PCA SVD algorithm @@ -406,7 +406,7 @@ class DAAL_EXPORT PartialResult : public Partia * \param[in] method Computation method * \return Errors detected while checking */ - DAAL_EXPORT services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, + services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; /** @@ -415,7 +415,7 @@ class DAAL_EXPORT PartialResult : public Partia * \param[in] par %Parameter of algorithm * \return Errors detected while checking */ - DAAL_EXPORT services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; + services::Status check(const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE; virtual ~PartialResult() {}; From a530644fa347fca26dac2d14d6dade5829ab9346 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 23 Apr 2024 09:14:42 -0700 Subject: [PATCH 105/120] clang fix --- cpp/daal/include/algorithms/pca/pca_types.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpp/daal/include/algorithms/pca/pca_types.h b/cpp/daal/include/algorithms/pca/pca_types.h index 12d4c809d42..3c8e99dca5a 100644 --- a/cpp/daal/include/algorithms/pca/pca_types.h +++ b/cpp/daal/include/algorithms/pca/pca_types.h @@ -300,8 +300,7 @@ class DAAL_EXPORT PartialResult : publi * \param[in] method Computation method * \return Errors detected while checking */ - services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - int method) const DAAL_C11_OVERRIDE; + services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; /** * Checks partial results of the PCA Ccorrelation algorithm @@ -406,8 +405,7 @@ class DAAL_EXPORT PartialResult : public Partia * \param[in] method Computation method * \return Errors detected while checking */ - services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, - int method) const DAAL_C11_OVERRIDE; + services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE; /** * Checks partial results of the PCA SVD algorithm From eee8adb1d3eedffd242309d5a560a30fecb20afc Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 24 Apr 2024 00:36:33 -0700 Subject: [PATCH 106/120] minor fix --- dev/make/compiler_definitions/dpcpp.mk | 2 +- dev/make/compiler_definitions/icx.mkl.32e.mk | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index 848f36c2db1..eae5dbe6b36 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -28,7 +28,7 @@ CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = -DEBC.dpcpp = -g -COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ +COMPILER.lnx.dpcpp = icpx -fsycl -O0 -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 32eb12ffdf3..b10a75a637c 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -30,10 +30,10 @@ CORE.SERV.COMPILER.icx = generic -Qopt = $(if $(OS_is_win),-qopt-,-qopt-) COMPILER.lnx.icx = icx -m64 \ - -Werror -Wreturn-type -O2 -O3 + -Werror -Wreturn-type -O3 -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -O2 -O3 -WX -Qopenmp-simd -Wno-deprecated-declarations +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -O3 -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 From d7964942e56501c384f75161bb84809820fcdc8c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 30 Apr 2024 01:47:46 -0700 Subject: [PATCH 107/120] minor fix --- dev/make/compiler_definitions/dpcpp.mk | 2 +- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index eae5dbe6b36..b1f24804508 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -28,7 +28,7 @@ CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = -DEBC.dpcpp = -g -COMPILER.lnx.dpcpp = icpx -fsycl -O0 -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ +COMPILER.lnx.dpcpp = icpx -fsycl -O3 -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index b10a75a637c..5b4f1df0e3f 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -30,7 +30,7 @@ CORE.SERV.COMPILER.icx = generic -Qopt = $(if $(OS_is_win),-qopt-,-qopt-) COMPILER.lnx.icx = icx -m64 \ - -Werror -Wreturn-type -O3 + -Werror -Wreturn-type -qopenmp-simd -O3 COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -O3 -WX -Qopenmp-simd -Wno-deprecated-declarations From 5bf792042e300b0aacdd86bf6dcb37c26c472e0e Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 27 May 2024 02:22:57 -0700 Subject: [PATCH 108/120] fix --- cpp/daal/src/externals/core_threading_win_dll.cpp | 8 -------- dev/make/compiler_definitions/dpcpp.mk | 2 +- dev/make/compiler_definitions/icx.mkl.32e.mk | 4 ++-- samples/daal/cpp/mysql/makefile_lnx | 2 +- samples/daal/cpp/mysql/makefile_mac | 2 +- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 617016a0e2e..15cc9ba71b3 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -29,14 +29,6 @@ static HMODULE daal_thr_dll_handle = NULL; daal::services::Environment::LibraryThreadingType __daal_serv_get_thr_set(); -#define __GLUE__(a, b) a##b - -#ifdef _DEBUG - #define _DLL_SUFFIX(name) __GLUE__(name, "d.2.dll") -#else - #define _DLL_SUFFIX(name) __GLUE__(name, ".2.dll") -#endif - #define DAAL_LOAD_DLL(name) _daal_load_win_dynamic_lib(name) DAAL_EXPORT HMODULE load_onedal_thread_dll() diff --git a/dev/make/compiler_definitions/dpcpp.mk b/dev/make/compiler_definitions/dpcpp.mk index b1f24804508..848f36c2db1 100644 --- a/dev/make/compiler_definitions/dpcpp.mk +++ b/dev/make/compiler_definitions/dpcpp.mk @@ -28,7 +28,7 @@ CORE.SERV.COMPILER.dpcpp = generic -Zl.dpcpp = -DEBC.dpcpp = -g -COMPILER.lnx.dpcpp = icpx -fsycl -O3 -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ +COMPILER.lnx.dpcpp = icpx -fsycl -m64 -stdlib=libstdc++ -fgnu-runtime -fwrapv \ -Werror -Wreturn-type -fsycl-device-code-split=per_kernel COMPILER.win.dpcpp = icx -fsycl $(if $(MSVC_RT_is_release),-MD, -MDd /debug:none) -nologo -WX \ -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 5b4f1df0e3f..16758eb32ad 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -30,10 +30,10 @@ CORE.SERV.COMPILER.icx = generic -Qopt = $(if $(OS_is_win),-qopt-,-qopt-) COMPILER.lnx.icx = icx -m64 \ - -Werror -Wreturn-type -qopenmp-simd -O3 + -Werror -Wreturn-type -qopenmp-simd -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -O3 -WX -Qopenmp-simd -Wno-deprecated-declarations +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 diff --git a/samples/daal/cpp/mysql/makefile_lnx b/samples/daal/cpp/mysql/makefile_lnx index 03bed8f96f1..a0dd6494d40 100644 --- a/samples/daal/cpp/mysql/makefile_lnx +++ b/samples/daal/cpp/mysql/makefile_lnx @@ -84,7 +84,7 @@ RES = $(addprefix $(RES_DIR)/, $(if $(filter run, $(mode)), $(addsuffix .res ,$( ifeq ($(compiler),intel) - CC = icx + CC = icc endif ifeq ($(compiler),gnu) diff --git a/samples/daal/cpp/mysql/makefile_mac b/samples/daal/cpp/mysql/makefile_mac index a8143453737..71fbb6a1b0c 100644 --- a/samples/daal/cpp/mysql/makefile_mac +++ b/samples/daal/cpp/mysql/makefile_mac @@ -77,7 +77,7 @@ RES = $(addprefix $(RES_DIR)/, $(if $(filter run, $(mode)), $(addsuffix .res ,$( ifeq ($(compiler),intel) - CC = icx + CC = icc endif ifeq ($(compiler),gnu) From 816e0ee4b9c5bea3577b1674aa158a0046709d11 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 24 Jun 2024 03:03:56 -0700 Subject: [PATCH 109/120] fix dynamic link --- dev/make/compiler_definitions/icx.mkl.32e.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 16758eb32ad..7b25eeb39bb 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -36,6 +36,7 @@ COMPILER.lnx.icx = icx -m64 \ COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 +link.dynamic.win.icx = icx -m64 pedantic.opts.icx = -pedantic \ -Wall \ From 357d554e5156e574309c8c1d7bbd5505c57ef11b Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Mon, 24 Jun 2024 05:40:04 -0700 Subject: [PATCH 110/120] fix --- dev/make/compiler_definitions/icx.mkl.32e.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 7b25eeb39bb..fb9e39b1415 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -25,15 +25,15 @@ CMPLRDIRSUFF.icx = CORE.SERV.COMPILER.icx = generic -Zl.icx = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib=libirc --DEBC.icx = -g +-DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) --Qopt = $(if $(OS_is_win),-qopt-,-qopt-) +-Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) COMPILER.lnx.icx = icx -m64 \ -Werror -Wreturn-type -qopenmp-simd -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -WX -Qopenmp-simd -Wno-deprecated-declarations +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -nologo -WX -Qopenmp-simd -Wno-deprecated-declarations -Qdiag-disable:10441 link.dynamic.lnx.icx = icx -m64 link.dynamic.win.icx = icx -m64 From 29c8c68a6b4c49b10c586a7ec5f5fa95cdb49f4c Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Tue, 6 Aug 2024 06:31:01 -0700 Subject: [PATCH 111/120] minor fix --- cpp/daal/include/algorithms/normalization/zscore_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore_types.h b/cpp/daal/include/algorithms/normalization/zscore_types.h index a4ee74d4e3a..167768e9873 100644 --- a/cpp/daal/include/algorithms/normalization/zscore_types.h +++ b/cpp/daal/include/algorithms/normalization/zscore_types.h @@ -162,7 +162,7 @@ namespace interface2 * \brief Provides methods to access final results obtained with the compute() method of the * z-score normalization algorithm in the batch processing mode */ -class DAAL_EXPORT Result : public daal::algorithms::Result +class Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) @@ -180,7 +180,7 @@ class DAAL_EXPORT Result : public daal::algorithms::Result * \return Status of computations */ template - services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); + DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * parameter, const int method); /** * Allocates memory to store final results of the z-score normalization algorithms From 6fa12067845e242028a9bfd70c8e505d2b0fbf23 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 7 Aug 2024 01:55:38 -0700 Subject: [PATCH 112/120] minor fix for zscore --- cpp/daal/include/algorithms/normalization/zscore_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/normalization/zscore_types.h b/cpp/daal/include/algorithms/normalization/zscore_types.h index 167768e9873..9edc9e00eea 100644 --- a/cpp/daal/include/algorithms/normalization/zscore_types.h +++ b/cpp/daal/include/algorithms/normalization/zscore_types.h @@ -162,7 +162,7 @@ namespace interface2 * \brief Provides methods to access final results obtained with the compute() method of the * z-score normalization algorithm in the batch processing mode */ -class Result : public daal::algorithms::Result +class DAAL_EXPORT Result : public daal::algorithms::Result { public: DECLARE_SERIALIZABLE_CAST(Result) From 6ec4137d39cbb5613a64ca48cf4112d83ca5506e Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 14 Aug 2024 00:44:47 -0700 Subject: [PATCH 113/120] updates for master --- .../oneapi/bf_knn_classification_model_ucapi_impl.h | 2 ++ dev/make/compiler_definitions/icx.mkl.32e.mk | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h b/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h index 84a66aaf94b..810824f762c 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/oneapi/bf_knn_classification_model_ucapi_impl.h @@ -91,6 +91,8 @@ class Model::ModelImpl data_management::BlockDescriptor destBD, srcBD; DAAL_CHECK_STATUS_VAR(dest->getBlockOfRows(0, dest->getNumberOfRows(), data_management::writeOnly, destBD)); DAAL_CHECK_STATUS_VAR(value->getBlockOfRows(0, value->getNumberOfRows(), data_management::readOnly, srcBD)); + auto source = srcBD.getBlockPtr(); + auto destination = destBD.getBlockPtr(); services::internal::daal_memcpy_s( destBD.getBlockPtr(), destBD.getNumberOfColumns() * destBD.getNumberOfRows() * sizeof(algorithmFPType), srcBD.getBlockPtr(), srcBD.getNumberOfColumns() * srcBD.getNumberOfRows() * sizeof(algorithmFPType)); diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index fb9e39b1415..5e064b3be1d 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -24,7 +24,7 @@ CMPLRDIRSUFF.icx = CORE.SERV.COMPILER.icx = generic --Zl.icx = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib=libirc +-Zl.icx = $(if $(OS_is_win),-Zl,) $(-Q)no-intel-lib -DEBC.icx = $(if $(OS_is_win),-debug:all -Z7,-g) -Qopt = $(if $(OS_is_win),-Qopt-,-qopt-) @@ -35,8 +35,8 @@ COMPILER.lnx.icx = icx -m64 \ COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -nologo -WX -Qopenmp-simd -Wno-deprecated-declarations -Qdiag-disable:10441 -link.dynamic.lnx.icx = icx -m64 -link.dynamic.win.icx = icx -m64 +link.dynamic.lnx.icx = icx -m64 -no-intel-lib +link.dynamic.win.icx = icx -m64 -no-intel-lib pedantic.opts.icx = -pedantic \ -Wall \ From 6b7892f72aae985958eda5a5a29c7c80ee33db4f Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Wed, 28 Aug 2024 09:29:15 -0700 Subject: [PATCH 114/120] fix for win --- dev/make/compiler_definitions/icx.mkl.32e.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 6b6ca8ef339..19bd4ff8041 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -33,7 +33,7 @@ CORE.SERV.COMPILER.icx = generic COMPILER.lnx.icx = icx -m64 \ -Werror -Wreturn-type -qopenmp-simd -COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -nologo -WX -Qopenmp-simd -Wno-deprecated-declarations -Qdiag-disable:10441 +COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -nologo -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 -no-intel-lib link.dynamic.win.icx = icx -m64 -no-intel-lib From fb340cca9053857600c23983e516feac078f6543 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 29 Aug 2024 01:19:06 -0700 Subject: [PATCH 115/120] fixes for icx --- .../k_nearest_neighbors/bf_knn_classification_model_impl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_model_impl.h b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_model_impl.h index 5a903d39a46..0383368a486 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_model_impl.h +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_model_impl.h @@ -84,8 +84,6 @@ class Model::ModelImpl data_management::BlockDescriptor destBD, srcBD; DAAL_CHECK_STATUS_VAR(dest->getBlockOfRows(0, dest->getNumberOfRows(), data_management::writeOnly, destBD)); DAAL_CHECK_STATUS_VAR(value->getBlockOfRows(0, value->getNumberOfRows(), data_management::readOnly, srcBD)); - auto source = srcBD.getBlockPtr(); - auto destination = destBD.getBlockPtr(); services::internal::daal_memcpy_s(destBD.getBlockPtr(), destBD.getNumberOfColumns() * destBD.getNumberOfRows() * sizeof(algorithmFPType), srcBD.getBlockPtr(), srcBD.getNumberOfColumns() * srcBD.getNumberOfRows() * sizeof(algorithmFPType)); DAAL_CHECK_STATUS_VAR(dest->releaseBlockOfRows(destBD)); From 689c90124022c3c090598ad74186655864e222a6 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 29 Aug 2024 01:53:07 -0700 Subject: [PATCH 116/120] update link opts for win --- dev/make/compiler_definitions/icx.mkl.32e.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/make/compiler_definitions/icx.mkl.32e.mk b/dev/make/compiler_definitions/icx.mkl.32e.mk index 19bd4ff8041..af18b3fe0ec 100644 --- a/dev/make/compiler_definitions/icx.mkl.32e.mk +++ b/dev/make/compiler_definitions/icx.mkl.32e.mk @@ -36,7 +36,6 @@ COMPILER.lnx.icx = icx -m64 \ COMPILER.win.icx = icx $(if $(MSVC_RT_is_release),-MD, -MDd) -nologo -WX -Qopenmp-simd -Wno-deprecated-declarations link.dynamic.lnx.icx = icx -m64 -no-intel-lib -link.dynamic.win.icx = icx -m64 -no-intel-lib pedantic.opts.icx = -pedantic \ -Wall \ From a2043598c209ab148876a83ae1342fc2d73edfb7 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Thu, 29 Aug 2024 09:12:46 -0700 Subject: [PATCH 117/120] update major binary version --- makefile.ver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile.ver b/makefile.ver index 5dd325388c7..9ffe0b05dc5 100644 --- a/makefile.ver +++ b/makefile.ver @@ -21,7 +21,7 @@ BUILD = $(shell date +'%Y%m%d') STATUS = P BUILDREV ?= work -MAJORBINARY = 2 +MAJORBINARY = 3 MINORBINARY = 0 #------------------------------------------------------------------------------- From a608ee0ca2c1e0f40d3fa77deb8a16f83fb261aa Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 30 Aug 2024 07:27:28 -0700 Subject: [PATCH 118/120] increasing binary version everywhere --- cpp/daal/include/daal_win.h | 2 +- cpp/daal/src/externals/core_threading_win_dll.cpp | 12 ++++++------ cpp/daal/src/services/dll.rc | 4 ++-- docs/source/onedal/build_app/build-application.rst | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cpp/daal/include/daal_win.h b/cpp/daal/include/daal_win.h index 203a8e8db65..e17eff16796 100755 --- a/cpp/daal/include/daal_win.h +++ b/cpp/daal/include/daal_win.h @@ -20,7 +20,7 @@ #pragma warning(disable : 809) #if defined(_DAAL_PAR_DYNAMIC) - #pragma comment(lib, "onedal_core_dll.2.lib") + #pragma comment(lib, "onedal_core_dll.3.lib") #pragma comment(lib, "tbb12.lib") #pragma comment(lib, "tbbmalloc.lib") #elif defined(_DAAL_PAR_STATIC) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index e78a8027031..5203de530ad 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -14,9 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ - +c /* -//++ +//++c // Implementation of "stubs" for threading layer functions for win dll case. //-- */ @@ -34,9 +34,9 @@ daal::services::Environment::LibraryThreadingType __daal_serv_get_thr_set(); DAAL_EXPORT HMODULE load_onedal_thread_dll() { #ifdef _DEBUG - return DAAL_LOAD_DLL("onedal_threadd.2.dll"); + return DAAL_LOAD_DLL("onedal_threadd.3.dll"); #else - return DAAL_LOAD_DLL("onedal_thread.2.dll"); + return DAAL_LOAD_DLL("onedal_thread.3.dll"); #endif } @@ -54,7 +54,7 @@ static void load_daal_thr_dll(void) daal_thr_dll_handle = load_onedal_thread_dll(); if (daal_thr_dll_handle == NULL) { - printf("Intel oneDAL FATAL ERROR: Cannot load onedal_thread.2.dll.\n"); + printf("Intel oneDAL FATAL ERROR: Cannot load onedal_thread.3.dll.\n"); exit(1); } break; @@ -67,7 +67,7 @@ static void load_daal_thr_dll(void) return; } - printf("Intel oneDAL FATAL ERROR: Cannot load onedal_thread.2.dll.\n"); + printf("Intel oneDAL FATAL ERROR: Cannot load onedal_thread.3.dll.\n"); exit(1); } } diff --git a/cpp/daal/src/services/dll.rc b/cpp/daal/src/services/dll.rc index 1fc21a3ceec..fc99628d6d2 100644 --- a/cpp/daal/src/services/dll.rc +++ b/cpp/daal/src/services/dll.rc @@ -21,11 +21,11 @@ #if defined(_DAAL_THR_TBB) #define FILE_COMMENT "Parallel version.\0" - #define ORIG_FILE_NAME "onedal_thread.2.dll \0" + #define ORIG_FILE_NAME "onedal_thread.3.dll \0" #define INTERNAL_FILE_NAME "onedal_thread\0" #else #define FILE_COMMENT "Analitics algorithms optimized for IA.\0" - #define ORIG_FILE_NAME "onedal_core.2.dll\0" + #define ORIG_FILE_NAME "onedal_core.3.dll\0" #define INTERNAL_FILE_NAME "onedal_core\0" #endif diff --git a/docs/source/onedal/build_app/build-application.rst b/docs/source/onedal/build_app/build-application.rst index 5e7249b29bb..4092a3256ad 100644 --- a/docs/source/onedal/build_app/build-application.rst +++ b/docs/source/onedal/build_app/build-application.rst @@ -142,13 +142,13 @@ Applications on Windows* OS | onedal_threadd.lib * - Dynamic linking - - | onedal_cored_dll.lib (onedal_cored_dll.2.lib), - | onedald_dll.lib (onedald_dll.2.lib), - | onedal_dpcd_dll.lib (onedal_dpcd_dll.2.lib), - | onedald.2.dll, - | onedal_cored.2.dll, - | onedal_dpcd.2.dll, - | onedal_threadd.2.dll + | onedal_cored_dll.lib (onedal_cored_dll.3.lib), + | onedald_dll.lib (onedald_dll.3.lib), + | onedal_dpcd_dll.lib (onedal_dpcd_dll.3.lib), + | onedald.3.dll, + | onedal_cored.3.dll, + | onedal_dpcd.3.dll, + | onedal_threadd.3.dll Examples ******** From 4aaee8db243c5b58338ee712cf434548bf46e1b4 Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 30 Aug 2024 07:30:30 -0700 Subject: [PATCH 119/120] minor fix --- cpp/daal/src/externals/core_threading_win_dll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index 5203de530ad..d06acfa9aed 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ -c + /* //++c // Implementation of "stubs" for threading layer functions for win dll case. From 39b094509d852e2b2b4049c41e73c5b5a47ceedd Mon Sep 17 00:00:00 2001 From: Alexandr-Solovev Date: Fri, 30 Aug 2024 07:31:20 -0700 Subject: [PATCH 120/120] minor fix --- cpp/daal/src/externals/core_threading_win_dll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/externals/core_threading_win_dll.cpp b/cpp/daal/src/externals/core_threading_win_dll.cpp index d06acfa9aed..7a25a0eddd1 100644 --- a/cpp/daal/src/externals/core_threading_win_dll.cpp +++ b/cpp/daal/src/externals/core_threading_win_dll.cpp @@ -16,7 +16,7 @@ *******************************************************************************/ /* -//++c +//++ // Implementation of "stubs" for threading layer functions for win dll case. //-- */