From 3713c43029ad2860d6400bd2a2ebf2b3b9e1991c Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 06:48:20 +0100 Subject: [PATCH 001/126] Update build.sh --- .ci/scripts/build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ci/scripts/build.sh b/.ci/scripts/build.sh index 0a62509c3a2..0863df5725f 100755 --- a/.ci/scripts/build.sh +++ b/.ci/scripts/build.sh @@ -36,6 +36,7 @@ show_help() { --tbb-dir:The TBB installation directory to use to build oneDAL with in the case that the backend is given as `ref`. If the installation directory does not exist, attempts to build this from source --use-openrng:Set this to yes if openrng is to be used as RNG backend. Use this only with the `ref` backend. --sysroot:The sysroot to use, in the case that clang is used as the cross-compiler +--debug:Enable debug symbols in build ' } @@ -76,6 +77,9 @@ while [[ $# -gt 0 ]]; do --use-openrng) use_openrng="$2" shift;; + --debug) + use_debug="yes" + shift;; --help) show_help exit 0 @@ -247,6 +251,10 @@ if [ "${use_openrng}" == "yes" ]; then make_options+=(RNG_BACKEND=openrng) fi +if [ "${use_debug}" == "yes" ]; then + make_options+=(REQDBG=yes) +fi + echo "Calling make" echo "CXX=$CXX" echo "CC=$CC" From 8fac1f82b37fb134f39d5e79f1a0f8ff3062a6fb Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 08:54:19 +0100 Subject: [PATCH 002/126] Update ci.yml --- .github/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2190c04003e..e694a5f5e33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ concurrency: jobs: LinuxMakeDPCPP: - name: LinuxMakeDPCPP + name: Linux Make DPCPP with Debug if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge timeout-minutes: 120 @@ -59,17 +59,19 @@ jobs: - name: Make daal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal --debug - name: Make onedal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal --debug - name: Archive build + if: github.event_name == "push" uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: __release_lnx path: ./__release_lnx - name: Archive oneDAL environment + if: github.event_name == "push" uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: oneDAL_env @@ -90,3 +92,48 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh .ci/scripts/test.sh --test-kind samples --build-dir __release_lnx --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake + - name: Cache build + # Placed at the end to minimize time necessary in cache, debug build is ~1GB in size, total cache available is 10GB + if: github.event_name == "pull_request" + uses: actions/cache/save@v4 + with: + key: __release_lnx + path: ./__release_lnx + + LinuxABICheck: + name: ABI Conformance + if: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == "pull_request" }} + needs: LinuxMakeDPCPP + runs-on: uxl-xlarge + timeout-minutes: 20 + + steps: + - name: Checkout oneDAL + uses: actions/checkout@v4 + - name: install ABI checking tools + run: | + sudo apt-get install abigail-tools + - name: Get run ID of "CI" workflow + id: get-run-id + run: | + OTHER_REPO="uxlfoundation/oneDAL" + WF_NAME="CI" + JQ_QUERY='map(select(.event == "push")) | .[0].databaseId' + RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` + echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" + echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ github.token }} + - name: Download oneDAL main build artifact + uses: actions/download-artifact@v4 + with: + name: __release_lnx + github-token: ${{ github.token }} + repository: uxlfoundation/oneDAL + run-id: ${{ steps.get-run-id.outputs.run-id }} + path: ./__release_lnx_main + - name: Restore oneDAL build cache + uses: actions/cache/restore@v4 + with: + path: ./__release_lnx + key: __release_lnx From 5a9c85f60e507d3b5a65b74f2932babf0634b8f0 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 09:05:49 +0100 Subject: [PATCH 003/126] Update ci.yml --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e694a5f5e33..21aba1a196d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,11 @@ jobs: LinuxABICheck: name: ABI Conformance - if: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == "pull_request" }} + if: | + ${{ github.repository == 'uxlfoundation/oneDAL' && + github.event_name == 'pull_request' && + !(github.event.action == 'labeled' && + contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} needs: LinuxMakeDPCPP runs-on: uxl-xlarge timeout-minutes: 20 From 90fb8741b2865e5e257a44f04158090130bb58ac Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 09:07:46 +0100 Subject: [PATCH 004/126] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21aba1a196d..105e3d23292 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,13 +65,13 @@ jobs: source /opt/intel/oneapi/setvars.sh .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal --debug - name: Archive build - if: github.event_name == "push" + if: github.event_name == 'push' uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: __release_lnx path: ./__release_lnx - name: Archive oneDAL environment - if: github.event_name == "push" + if: github.event_name == 'push' uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: oneDAL_env @@ -94,7 +94,7 @@ jobs: .ci/scripts/test.sh --test-kind samples --build-dir __release_lnx --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake - name: Cache build # Placed at the end to minimize time necessary in cache, debug build is ~1GB in size, total cache available is 10GB - if: github.event_name == "pull_request" + if: github.event_name == 'pull_request' uses: actions/cache/save@v4 with: key: __release_lnx From 81fde9ea0e15332ffef795f81806cecfb4d0f6c1 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 16:04:08 +0100 Subject: [PATCH 005/126] Update build.sh --- .ci/scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/build.sh b/.ci/scripts/build.sh index 0863df5725f..516e087312a 100755 --- a/.ci/scripts/build.sh +++ b/.ci/scripts/build.sh @@ -79,7 +79,7 @@ while [[ $# -gt 0 ]]; do shift;; --debug) use_debug="yes" - shift;; + ;; --help) show_help exit 0 From b1387e69d275efec03c29b1b1fd12797fd6745f6 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 18:18:36 +0100 Subject: [PATCH 006/126] Update test.sh --- .ci/scripts/test.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/test.sh b/.ci/scripts/test.sh index 65d2d5d3e0c..327b0b1c4b4 100755 --- a/.ci/scripts/test.sh +++ b/.ci/scripts/test.sh @@ -74,6 +74,10 @@ while [[ $# -gt 0 ]]; do --cross-compile) cross_compile="yes" ;; + --jobs) + jobs="$2" + shift + ;; --help) show_help_text exit 0 @@ -133,7 +137,9 @@ else exit 1 fi -if [ "$(uname)" == "Linux" ]; then +if [[ -n "${jobs}" ]]; then + make_op="-j${jobs}" +elif "$(uname)" == "Linux" ]; then make_op="-j$(nproc --all)" else make_op="-j$(sysctl -n hw.physicalcpu)" From 3ee4fc53ca9b9ac2d875493d7d45dc921f415bf1 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 18:19:22 +0100 Subject: [PATCH 007/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 105e3d23292..4d7f06fecd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,7 +87,7 @@ jobs: - name: oneapi/dpc examples run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/dpc --build-system cmake + .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/dpc --build-system cmake --jobs 8 - name: daal/cpp/mpi examples run: | source /opt/intel/oneapi/setvars.sh From ae766474d7969ac45444e7d08e23844fddb1de03 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 18:20:30 +0100 Subject: [PATCH 008/126] Update test.sh --- .ci/scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/test.sh b/.ci/scripts/test.sh index 327b0b1c4b4..4ed32e5c868 100755 --- a/.ci/scripts/test.sh +++ b/.ci/scripts/test.sh @@ -139,7 +139,7 @@ fi if [[ -n "${jobs}" ]]; then make_op="-j${jobs}" -elif "$(uname)" == "Linux" ]; then +elif [ "$(uname)" == "Linux" ]; then make_op="-j$(nproc --all)" else make_op="-j$(sysctl -n hw.physicalcpu)" From 211f3e9ad4b3fe5ada0f7e96d9ac0e9a6c428075 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 19:36:44 +0100 Subject: [PATCH 009/126] Update ci.yml --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d7f06fecd5..adc0239d317 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,12 @@ jobs: # Miniforge is necessary in order to get Intel MPI from conda-forge for MPI examples - name: Install Miniforge run: .ci/env/apt.sh miniforge + - name: Set Environment Variables + run: | + echo "NEOReadDebugKeys=1" >> "$GITHUB_ENV" + echo "EnableRecoverablePageFaults=1" >> "$GITHUB_ENV" + echo "DisableScratchPages=0" >> "$GITHUB_ENV" + echo "GpuFaultCheckThreshold=0" >> "$GITHUB_ENV - name: System Info run: | source /opt/intel/oneapi/setvars.sh From 3986ec058ace9d9b9286a9814823f40f31cfd57d Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 19:41:56 +0100 Subject: [PATCH 010/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index adc0239d317..a7614d1d04e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: echo "NEOReadDebugKeys=1" >> "$GITHUB_ENV" echo "EnableRecoverablePageFaults=1" >> "$GITHUB_ENV" echo "DisableScratchPages=0" >> "$GITHUB_ENV" - echo "GpuFaultCheckThreshold=0" >> "$GITHUB_ENV + echo "GpuFaultCheckThreshold=0" >> "$GITHUB_ENV" - name: System Info run: | source /opt/intel/oneapi/setvars.sh From 9e59cc7b363318e75de48c4bd8271ee4d0923dac Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 22:31:57 +0100 Subject: [PATCH 011/126] Update ci.yml --- .github/workflows/ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7614d1d04e..c6b16add420 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,16 @@ jobs: with: name: oneDAL_env path: .ci/env + - name: Cache build + if: github.event_name == 'pull_request' + uses: actions/cache/save@v4 + with: + key: __release_lnx_${{ github.event.pull_request.number }} + path: ./__release_lnx + - name: Strip oneDAL debug symbols + run: | + # The size must be reduced in order to complete example testing on github actions runners + strip -v --strip-unneeded __release_lnx/daal/latest/lib/intel64/* - name: daal/cpp examples run: | source /opt/intel/oneapi/setvars.sh @@ -93,18 +103,11 @@ jobs: - name: oneapi/dpc examples run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/dpc --build-system cmake --jobs 8 + .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/dpc --build-system cmake - name: daal/cpp/mpi examples run: | source /opt/intel/oneapi/setvars.sh .ci/scripts/test.sh --test-kind samples --build-dir __release_lnx --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake - - name: Cache build - # Placed at the end to minimize time necessary in cache, debug build is ~1GB in size, total cache available is 10GB - if: github.event_name == 'pull_request' - uses: actions/cache/save@v4 - with: - key: __release_lnx - path: ./__release_lnx LinuxABICheck: name: ABI Conformance @@ -146,4 +149,4 @@ jobs: uses: actions/cache/restore@v4 with: path: ./__release_lnx - key: __release_lnx + key: __release_lnx_${{ github.event.pull_request.number }} From 8bd7424714b8b81c40276a9e093ad2156d0ca9c8 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Tue, 18 Feb 2025 23:36:16 +0100 Subject: [PATCH 012/126] Update ci.yml --- .github/workflows/ci.yml | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6b16add420..cdcccb82f04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,12 +52,6 @@ jobs: # Miniforge is necessary in order to get Intel MPI from conda-forge for MPI examples - name: Install Miniforge run: .ci/env/apt.sh miniforge - - name: Set Environment Variables - run: | - echo "NEOReadDebugKeys=1" >> "$GITHUB_ENV" - echo "EnableRecoverablePageFaults=1" >> "$GITHUB_ENV" - echo "DisableScratchPages=0" >> "$GITHUB_ENV" - echo "GpuFaultCheckThreshold=0" >> "$GITHUB_ENV" - name: System Info run: | source /opt/intel/oneapi/setvars.sh @@ -65,29 +59,21 @@ jobs: - name: Make daal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal --debug + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal - name: Make onedal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal --debug + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal - name: Archive build - if: github.event_name == 'push' uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: __release_lnx path: ./__release_lnx - name: Archive oneDAL environment - if: github.event_name == 'push' uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: name: oneDAL_env path: .ci/env - - name: Cache build - if: github.event_name == 'pull_request' - uses: actions/cache/save@v4 - with: - key: __release_lnx_${{ github.event.pull_request.number }} - path: ./__release_lnx - name: Strip oneDAL debug symbols run: | # The size must be reduced in order to complete example testing on github actions runners @@ -145,8 +131,8 @@ jobs: repository: uxlfoundation/oneDAL run-id: ${{ steps.get-run-id.outputs.run-id }} path: ./__release_lnx_main - - name: Restore oneDAL build cache - uses: actions/cache/restore@v4 + - name: Restore oneDAL build artifact + uses: actions/download-artifact@v4 with: + name: __release_lnx path: ./__release_lnx - key: __release_lnx_${{ github.event.pull_request.number }} From 8d32b11465944c055f78fd9b6ef6be7bdc289162 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 00:32:13 +0100 Subject: [PATCH 013/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdcccb82f04..97bd113608c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: !(github.event.action == 'labeled' && contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} needs: LinuxMakeDPCPP - runs-on: uxl-xlarge + runs-on: ubuntu-24.04 timeout-minutes: 20 steps: From f6ae1340416e4107e2e9c9b41defa1d3eb3bc4f1 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:36:43 +0100 Subject: [PATCH 014/126] Update makefile --- makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 8ef5d75fe03..48043c3123f 100644 --- a/makefile +++ b/makefile @@ -132,8 +132,10 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -DMKL_ILP64 := $(if $(filter mkl,$(BACKEND_CONFIG)),-DMKL_ILP64) -Zl := $(-Zl.$(COMPILER)) -Zl_DPCPP := $(-Zl.dpcpp) --DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE --DEBC_DPCPP := $(if $(REQDBG),$(-DEBC.dpcpp) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT) +# if REQDBG set to 'symbols', it will disable assert checking +# This greatly reduces compiling with the static library when only symbols are desired +-DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE +-DEBC_DPCPP := $(if $(REQDBG),$(-DEBC.dpcpp) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) -EHsc := $(if $(OS_is_win),-EHsc,) -isystem := $(if $(OS_is_win),-I,-isystem) @@ -1116,7 +1118,9 @@ Flags: possible values: $(CORE.ALGORITHMS.CUSTOM.AVAILABLE) REQCPU - list of CPU optimizations to be included into library possible values: $(CPUs) - REQDBG - flag that enables build in debug mode + REQDBG - flag that enables build in debug mode. Debug mode contains oneDAL + assertions, TBB legacy mode, and debug symbols. For only debug symbols + set flag to special value: symbols REQPROFILE - flag that enables kernel profiling using endef From c4842d5865eeec441d46cd93ef92dcd14b3a1cdd Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:38:48 +0100 Subject: [PATCH 015/126] Update build.sh --- .ci/scripts/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/scripts/build.sh b/.ci/scripts/build.sh index 516e087312a..b32330a9ef3 100755 --- a/.ci/scripts/build.sh +++ b/.ci/scripts/build.sh @@ -78,8 +78,8 @@ while [[ $# -gt 0 ]]; do use_openrng="$2" shift;; --debug) - use_debug="yes" - ;; + use_debug="$2" + shift;; --help) show_help exit 0 @@ -251,8 +251,8 @@ if [ "${use_openrng}" == "yes" ]; then make_options+=(RNG_BACKEND=openrng) fi -if [ "${use_debug}" == "yes" ]; then - make_options+=(REQDBG=yes) +if [ -n "${use_debug}" ]; then + make_options+=(REQDBG="${use_debug}") fi echo "Calling make" From f3747b8dab8af4b7efd169a969d4783e7640f3cd Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:42:30 +0100 Subject: [PATCH 016/126] Update ci.yml --- .github/workflows/ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97bd113608c..7c080aae440 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ concurrency: jobs: LinuxMakeDPCPP: - name: Linux Make DPCPP with Debug + name: Linux Make Debug DPCPP if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge timeout-minutes: 120 @@ -59,11 +59,11 @@ jobs: - name: Make daal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal --debug symbols - name: Make onedal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal --debug symbols - name: Archive build uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: @@ -77,7 +77,9 @@ jobs: - name: Strip oneDAL debug symbols run: | # The size must be reduced in order to complete example testing on github actions runners + ls -lh __release_lnx/daal/latest/lib/intel64 strip -v --strip-unneeded __release_lnx/daal/latest/lib/intel64/* + ls -lh __release_lnx/daal/latest/lib/intel64 - name: daal/cpp examples run: | source /opt/intel/oneapi/setvars.sh From e4c3fa666ba03dbc9ca8daebf2397351f5748405 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:45:49 +0100 Subject: [PATCH 017/126] Update makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 48043c3123f..33d0db94ef7 100644 --- a/makefile +++ b/makefile @@ -134,7 +134,7 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Zl_DPCPP := $(-Zl.dpcpp) # if REQDBG set to 'symbols', it will disable assert checking # This greatly reduces compiling with the static library when only symbols are desired --DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE +-DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE)) -DEBC_DPCPP := $(if $(REQDBG),$(-DEBC.dpcpp) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) -EHsc := $(if $(OS_is_win),-EHsc,) From 4c50a3ccab9949e2c089d7e50650fb03ed1c44d5 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:47:52 +0100 Subject: [PATCH 018/126] Update build.sh --- .ci/scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/build.sh b/.ci/scripts/build.sh index b32330a9ef3..3d6aabf7026 100755 --- a/.ci/scripts/build.sh +++ b/.ci/scripts/build.sh @@ -36,7 +36,7 @@ show_help() { --tbb-dir:The TBB installation directory to use to build oneDAL with in the case that the backend is given as `ref`. If the installation directory does not exist, attempts to build this from source --use-openrng:Set this to yes if openrng is to be used as RNG backend. Use this only with the `ref` backend. --sysroot:The sysroot to use, in the case that clang is used as the cross-compiler ---debug:Enable debug symbols in build +--debug:Set build debug mode flag ' } From d9d165e048d7b0bf95d0e3e2f0a251ad715a8d11 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:55:10 +0100 Subject: [PATCH 019/126] Update makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 33d0db94ef7..48043c3123f 100644 --- a/makefile +++ b/makefile @@ -134,7 +134,7 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Zl_DPCPP := $(-Zl.dpcpp) # if REQDBG set to 'symbols', it will disable assert checking # This greatly reduces compiling with the static library when only symbols are desired --DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE)) +-DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE -DEBC_DPCPP := $(if $(REQDBG),$(-DEBC.dpcpp) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) -EHsc := $(if $(OS_is_win),-EHsc,) From 55c36758602fe7da45994a869bc249dd2c9e5110 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:58:07 +0100 Subject: [PATCH 020/126] Update makefile --- makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 48043c3123f..ef3706ec16c 100644 --- a/makefile +++ b/makefile @@ -134,8 +134,8 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Zl_DPCPP := $(-Zl.dpcpp) # if REQDBG set to 'symbols', it will disable assert checking # This greatly reduces compiling with the static library when only symbols are desired --DEBC := $(if $(REQDBG),$(-DEBC.$(COMPILER)) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE --DEBC_DPCPP := $(if $(REQDBG),$(-DEBC.dpcpp) $(if $(filter symbols,$(REQDBG)),,-DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) +-DEBC := $(if $(REQDBG),$(if $(filter symbols,$(REQDBG)),$(-DEBC.$(COMPILER)),$(-DEBC.$(COMPILER)) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DTBB_SUPPRESS_DEPRECATED_MESSAGES -D__TBB_LEGACY_MODE +-DEBC_DPCPP := $(if $(REQDBG),$(if $(filter symbols,$(REQDBG)),$(-DEBC.dpcpp),$(-DEBC.dpcpp) -DDEBUG_ASSERT -DONEDAL_ENABLE_ASSERT)) -DEBL := $(if $(REQDBG),$(if $(OS_is_win),-debug,)) -EHsc := $(if $(OS_is_win),-EHsc,) -isystem := $(if $(OS_is_win),-I,-isystem) From 0d5308120b2da337182831a044af99780411dace Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 02:59:22 +0100 Subject: [PATCH 021/126] Update makefile --- makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index ef3706ec16c..36b587fb2bd 100644 --- a/makefile +++ b/makefile @@ -1118,9 +1118,9 @@ Flags: possible values: $(CORE.ALGORITHMS.CUSTOM.AVAILABLE) REQCPU - list of CPU optimizations to be included into library possible values: $(CPUs) - REQDBG - flag that enables build in debug mode. Debug mode contains oneDAL - assertions, TBB legacy mode, and debug symbols. For only debug symbols - set flag to special value: symbols + REQDBG - flag that enables build in debug mode. Debug mode turns on oneDAL + assertions and adds debug symbols. For only debug symbols set flag to + special value: symbols REQPROFILE - flag that enables kernel profiling using endef From 5e8138ac69ab5d98efd492645776af6473b46887 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 03:02:30 +0100 Subject: [PATCH 022/126] Update INSTALL.md --- INSTALL.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index dab844272bd..ad79f73bcb7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -155,10 +155,14 @@ It is possible to build oneDAL libraries with selected set of algorithms and/or On **Linux\*** it is possible to build debug version of oneDAL or the version that allows to do kernel profiling using . -- To build debug version of oneDAL, run: +- To build debug version of oneDAL (including debug symbols), run: make -f makefile daal oneapi_c PLAT=lnx32e REQDBG=yes +- To build oneDAL to include only symbols, run: + + make -f makefile daal oneapi_c PLAT=lnx32e REQDBG=symbols + - To build oneDAL with kernel profiling information, run: make -f makefile daal oneapi_c PLAT=lnx32e REQPROFILE=yes From 730ee27dee1116d5c9b8f1b1d86461236e24e959 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 16:10:08 +0100 Subject: [PATCH 023/126] Update ci.yml --- .github/workflows/ci.yml | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c080aae440..053892b871a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,28 +74,6 @@ jobs: with: name: oneDAL_env path: .ci/env - - name: Strip oneDAL debug symbols - run: | - # The size must be reduced in order to complete example testing on github actions runners - ls -lh __release_lnx/daal/latest/lib/intel64 - strip -v --strip-unneeded __release_lnx/daal/latest/lib/intel64/* - ls -lh __release_lnx/daal/latest/lib/intel64 - - name: daal/cpp examples - run: | - source /opt/intel/oneapi/setvars.sh - .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface daal/cpp --build-system cmake - - name: oneapi/cpp examples - run: | - source /opt/intel/oneapi/setvars.sh - .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/cpp --build-system cmake - - name: oneapi/dpc examples - run: | - source /opt/intel/oneapi/setvars.sh - .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/dpc --build-system cmake - - name: daal/cpp/mpi examples - run: | - source /opt/intel/oneapi/setvars.sh - .ci/scripts/test.sh --test-kind samples --build-dir __release_lnx --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake LinuxABICheck: name: ABI Conformance @@ -107,6 +85,10 @@ jobs: needs: LinuxMakeDPCPP runs-on: ubuntu-24.04 timeout-minutes: 20 + env: + release_: __release_lnx + release_main: __release_lnx_main + lib_dir: /daal/latest/lib/intel64 steps: - name: Checkout oneDAL @@ -138,3 +120,12 @@ jobs: with: name: __release_lnx path: ./__release_lnx + - name: abidiff libonedal_dpc + run: | + abidiff $release$lib_dir/libonedal_dpc.so $release_main$lib_dir/libonedal_dpc.so + - name: abidiff libonedal_core + run: | + abidiff $release$lib_dir/libonedal_core.so $release_main$lib_dir/libonedal_core.so + - name: abidiff libonedal_parameters + run: | + abidiff $release$lib_dir/libonedal_parameters.so $release_main$lib_dir/libonedal_parameters.so From a420fbeb867133c7d3b845aeaf1d0fce745fcc9e Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 17:06:29 +0100 Subject: [PATCH 024/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 053892b871a..352f1267543 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 20 env: - release_: __release_lnx + release: __release_lnx release_main: __release_lnx_main lib_dir: /daal/latest/lib/intel64 From bc22a4062934b68f71b71232ccca2e2b0dfa6018 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 18:05:49 +0100 Subject: [PATCH 025/126] Update ci.yml --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 352f1267543..0cb7ff725d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,11 +59,11 @@ jobs: - name: Make daal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal --debug symbols + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal - name: Make onedal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal --debug symbols + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal - name: Archive build uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: @@ -122,10 +122,10 @@ jobs: path: ./__release_lnx - name: abidiff libonedal_dpc run: | - abidiff $release$lib_dir/libonedal_dpc.so $release_main$lib_dir/libonedal_dpc.so + abidiff --verbose $release$lib_dir/libonedal_dpc.so $release_main$lib_dir/libonedal_dpc.so - name: abidiff libonedal_core run: | - abidiff $release$lib_dir/libonedal_core.so $release_main$lib_dir/libonedal_core.so + abidiff --verbose $release$lib_dir/libonedal_core.so $release_main$lib_dir/libonedal_core.so - name: abidiff libonedal_parameters run: | - abidiff $release$lib_dir/libonedal_parameters.so $release_main$lib_dir/libonedal_parameters.so + abidiff --verbose $release$lib_dir/libonedal_parameters.so $release_main$lib_dir/libonedal_parameters.so From 594d7459ef4eccb4875d04cad7b41a87a1964a66 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 19:02:22 +0100 Subject: [PATCH 026/126] Update ci.yml --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cb7ff725d1..0088ba711e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,10 +122,13 @@ jobs: path: ./__release_lnx - name: abidiff libonedal_dpc run: | - abidiff --verbose $release$lib_dir/libonedal_dpc.so $release_main$lib_dir/libonedal_dpc.so + abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_dpc.so __release_lnx_main/daal/latest/lib/intel64/libonedal_dpc.so + - name: abidiff libonedal + run: | + abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal.so __release_lnx_main/daal/latest/lib/intel64/libonedal.so - name: abidiff libonedal_core run: | - abidiff --verbose $release$lib_dir/libonedal_core.so $release_main$lib_dir/libonedal_core.so + abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_core.so __release_lnx_main/daal/latest/lib/intel64/libonedal_core.so - name: abidiff libonedal_parameters run: | - abidiff --verbose $release$lib_dir/libonedal_parameters.so $release_main$lib_dir/libonedal_parameters.so + abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_thread.so __release_lnx_main/daal/latest/lib/intel64/libonedal_thread.so From 49bacb16eae7839bf5e547d7aa81fb64c4f8d7b2 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 19:42:25 +0100 Subject: [PATCH 027/126] Update ci.yml --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0088ba711e7..f01f8aa31be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,9 +99,9 @@ jobs: - name: Get run ID of "CI" workflow id: get-run-id run: | - OTHER_REPO="uxlfoundation/oneDAL" + OTHER_REPO="icfaust/oneDAL" WF_NAME="CI" - JQ_QUERY='map(select(.event == "push")) | .[0].databaseId' + JQ_QUERY='map(select(.event == "workflow_run")) | .[0].databaseId' RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" @@ -112,7 +112,7 @@ jobs: with: name: __release_lnx github-token: ${{ github.token }} - repository: uxlfoundation/oneDAL + repository: icfaust/oneDAL run-id: ${{ steps.get-run-id.outputs.run-id }} path: ./__release_lnx_main - name: Restore oneDAL build artifact @@ -122,6 +122,7 @@ jobs: path: ./__release_lnx - name: abidiff libonedal_dpc run: | + ls -lh abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_dpc.so __release_lnx_main/daal/latest/lib/intel64/libonedal_dpc.so - name: abidiff libonedal run: | From b0ed506f66db75d38ec17adadf9a2f0326ce86b3 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 20:07:02 +0100 Subject: [PATCH 028/126] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f01f8aa31be..7e473df14a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,8 +100,8 @@ jobs: id: get-run-id run: | OTHER_REPO="icfaust/oneDAL" - WF_NAME="CI" - JQ_QUERY='map(select(.event == "workflow_run")) | .[0].databaseId' + WF_NAME="Nightly-build" + JQ_QUERY='map(select(.event == "scheduled")) | .[0].databaseId' RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" From 5d9925ec2f1734541be4ee340d5306ba436b5277 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 19 Feb 2025 21:12:27 +0100 Subject: [PATCH 029/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e473df14a7..1a0150cff74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: run: | OTHER_REPO="icfaust/oneDAL" WF_NAME="Nightly-build" - JQ_QUERY='map(select(.event == "scheduled")) | .[0].databaseId' + JQ_QUERY='map(select(.event == "schedule")) | .[0].databaseId' RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" From 70f97f01bbb114845230b604bd1d5c47eca2a1f5 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 00:10:52 +0100 Subject: [PATCH 030/126] add shell script --- .ci/env/apt.sh | 7 +++++++ .ci/scripts/abi_check.sh | 41 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 26 +++++-------------------- 3 files changed, 53 insertions(+), 21 deletions(-) create mode 100644 .ci/scripts/abi_check.sh diff --git a/.ci/env/apt.sh b/.ci/env/apt.sh index 10830d143e4..b8666b898ac 100755 --- a/.ci/env/apt.sh +++ b/.ci/env/apt.sh @@ -105,6 +105,10 @@ function install_miniforge { source /usr/share/miniconda/etc/profile.d/conda.sh } +function install_abigail { + sudo apt-get install -y abigail-tools +} + if [ "${component}" == "dpcpp" ]; then add_repo install_dpcpp @@ -143,6 +147,9 @@ elif [ "${component}" == "miniforge" ] ; then install_miniforge fi install_dev-base-conda +elif [ "${component}" == "abigail" ] ; then + update + install_abigail else echo "Usage:" echo " $0 [dpcpp|tbb|mkl|gnu-cross-compilers|clang-format|dev-base|qemu-apt|qemu-deb|llvm-version|build-sysroot|miniforge]" diff --git a/.ci/scripts/abi_check.sh b/.ci/scripts/abi_check.sh new file mode 100644 index 00000000000..8110daf5806 --- /dev/null +++ b/.ci/scripts/abi_check.sh @@ -0,0 +1,41 @@ +#! /bin/bash +#=============================================================================== +# Copyright Contibutors to the oneDAL project +# +# 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. +#=============================================================================== + +ci_dir=$(dirname $(dirname $(dirname "${BASH_SOURCE[0]}"))) +cd $ci_dir + +# relative paths must be made from the oneDAL repo root +release_dir=$1 +main_release_dir=$2 + +echo Shared Library ABI Conformance +solibs=($(ls $release_dir/lib*.so)) +for i in "${solibs[@]}" +do + name=$(basename $i) + echo "--------${name}--------" + abidiff $i $main_release_dir/$name +done + +echo Static Library ABI Conformance +alibs=($(ls $release_dir/lib*.a)) +for i in "${alibs[@]}" +do + name=$(basename $i) + echo "--------${name}--------" + abidiff $i $main_release_dir/$name +done \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a0150cff74..d5d0afa060c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ concurrency: jobs: LinuxMakeDPCPP: - name: Linux Make Debug DPCPP + name: LinuxMakeDPCPP if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge timeout-minutes: 120 @@ -85,17 +85,12 @@ jobs: needs: LinuxMakeDPCPP runs-on: ubuntu-24.04 timeout-minutes: 20 - env: - release: __release_lnx - release_main: __release_lnx_main - lib_dir: /daal/latest/lib/intel64 steps: - name: Checkout oneDAL uses: actions/checkout@v4 - name: install ABI checking tools - run: | - sudo apt-get install abigail-tools + run: .ci/env/apt.sh abigail - name: Get run ID of "CI" workflow id: get-run-id run: | @@ -115,21 +110,10 @@ jobs: repository: icfaust/oneDAL run-id: ${{ steps.get-run-id.outputs.run-id }} path: ./__release_lnx_main - - name: Restore oneDAL build artifact + - name: Download oneDAL build artifact uses: actions/download-artifact@v4 with: name: __release_lnx path: ./__release_lnx - - name: abidiff libonedal_dpc - run: | - ls -lh - abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_dpc.so __release_lnx_main/daal/latest/lib/intel64/libonedal_dpc.so - - name: abidiff libonedal - run: | - abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal.so __release_lnx_main/daal/latest/lib/intel64/libonedal.so - - name: abidiff libonedal_core - run: | - abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_core.so __release_lnx_main/daal/latest/lib/intel64/libonedal_core.so - - name: abidiff libonedal_parameters - run: | - abidiff --verbose __release_lnx/daal/latest/lib/intel64/libonedal_thread.so __release_lnx_main/daal/latest/lib/intel64/libonedal_thread.so + - name: Check ABI conformance + run: .ci/scripts/abi_check.sh __release_lnx/daal/latest/lib/intel64/ __release_lnx_main/daal/latest/lib/intel64/ From 15e07280eedd6b8cd6456b35219cdaae39e7138d Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 00:11:43 +0100 Subject: [PATCH 031/126] missing whitespace --- .ci/scripts/abi_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/abi_check.sh b/.ci/scripts/abi_check.sh index 8110daf5806..5e84490b619 100644 --- a/.ci/scripts/abi_check.sh +++ b/.ci/scripts/abi_check.sh @@ -38,4 +38,4 @@ do name=$(basename $i) echo "--------${name}--------" abidiff $i $main_release_dir/$name -done \ No newline at end of file +done From 3115747764bc8e8650cbd37f2f50bc2bfd13bfa8 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 00:17:35 +0100 Subject: [PATCH 032/126] spelling mistake --- .ci/scripts/abi_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/scripts/abi_check.sh b/.ci/scripts/abi_check.sh index 5e84490b619..bd0b21392dc 100644 --- a/.ci/scripts/abi_check.sh +++ b/.ci/scripts/abi_check.sh @@ -1,6 +1,6 @@ #! /bin/bash #=============================================================================== -# Copyright Contibutors to the oneDAL project +# Copyright contributors to the oneDAL project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 16bcb6c02946d7c852291e23fbe898e66c42ff04 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 19 Feb 2025 15:48:49 -0800 Subject: [PATCH 033/126] set file permissions --- .ci/scripts/abi_check.sh | 0 .ci/scripts/test.sh | 3 ++- makefile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 .ci/scripts/abi_check.sh diff --git a/.ci/scripts/abi_check.sh b/.ci/scripts/abi_check.sh old mode 100644 new mode 100755 diff --git a/.ci/scripts/test.sh b/.ci/scripts/test.sh index 4ed32e5c868..9d7bbd46e3b 100755 --- a/.ci/scripts/test.sh +++ b/.ci/scripts/test.sh @@ -219,7 +219,8 @@ for link_mode in "${link_modes[@]}"; do -S . -G "Unix Makefiles" -DONEDAL_LINK="${link_mode}" - -DREF_BACKEND="${ref_backend}") + -DREF_BACKEND="${ref_backend}" + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON) if [ "${cross_compile}" == "yes" ] ; then # Set the cmake toolchain file to set up the cross-compilation diff --git a/makefile b/makefile index 36b587fb2bd..e5c0477918f 100644 --- a/makefile +++ b/makefile @@ -804,7 +804,7 @@ $(WORKDIR.lib)/$(oneapi_y.dpc): \ $(ONEAPI.tmpdir_y.dpc)/$(oneapi_y.dpc:%.$y=%_link.txt) ; $(DPC.LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(-fPIC) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(daaldep.rt.dpc) -$(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(REQDBG),-flink-huge-device-code,) +$(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(REQDBG),-flink-huge-device-code -fsycl-no-rdc,) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(OS_is_win),-IMPLIB:$(@:%.$(MAJORBINARY).dll=%_dll.lib),) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(OS_is_win),$(WORKDIR.lib)/$(core_y:%.$(MAJORBINARY).dll=%_dll.lib)) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(OS_is_win),sycl$d.lib OpenCL.lib) From b053826eebb346e4cac77381ae74a2c5a0ae4888 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 19 Feb 2025 15:50:52 -0800 Subject: [PATCH 034/126] remove unwanted changes --- .ci/scripts/test.sh | 3 +-- makefile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.ci/scripts/test.sh b/.ci/scripts/test.sh index 9d7bbd46e3b..4ed32e5c868 100755 --- a/.ci/scripts/test.sh +++ b/.ci/scripts/test.sh @@ -219,8 +219,7 @@ for link_mode in "${link_modes[@]}"; do -S . -G "Unix Makefiles" -DONEDAL_LINK="${link_mode}" - -DREF_BACKEND="${ref_backend}" - -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON) + -DREF_BACKEND="${ref_backend}") if [ "${cross_compile}" == "yes" ] ; then # Set the cmake toolchain file to set up the cross-compilation diff --git a/makefile b/makefile index e5c0477918f..36b587fb2bd 100644 --- a/makefile +++ b/makefile @@ -804,7 +804,7 @@ $(WORKDIR.lib)/$(oneapi_y.dpc): \ $(ONEAPI.tmpdir_y.dpc)/$(oneapi_y.dpc:%.$y=%_link.txt) ; $(DPC.LINK.DYNAMIC) ; $(LINK.DYNAMIC.POST) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(-fPIC) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(daaldep.rt.dpc) -$(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(REQDBG),-flink-huge-device-code -fsycl-no-rdc,) +$(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(REQDBG),-flink-huge-device-code,) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(OS_is_win),-IMPLIB:$(@:%.$(MAJORBINARY).dll=%_dll.lib),) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(OS_is_win),$(WORKDIR.lib)/$(core_y:%.$(MAJORBINARY).dll=%_dll.lib)) $(WORKDIR.lib)/$(oneapi_y.dpc): LOPT += $(if $(OS_is_win),sycl$d.lib OpenCL.lib) From f83c78dd87faccc49843945bba491707f725fbe7 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 01:26:24 +0100 Subject: [PATCH 035/126] Update abi_check.sh --- .ci/scripts/abi_check.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/scripts/abi_check.sh b/.ci/scripts/abi_check.sh index bd0b21392dc..054446a7655 100755 --- a/.ci/scripts/abi_check.sh +++ b/.ci/scripts/abi_check.sh @@ -19,23 +19,23 @@ ci_dir=$(dirname $(dirname $(dirname "${BASH_SOURCE[0]}"))) cd $ci_dir # relative paths must be made from the oneDAL repo root -release_dir=$1 -main_release_dir=$2 +main_release_dir=$1 +release_dir=$2 echo Shared Library ABI Conformance -solibs=($(ls $release_dir/lib*.so)) +solibs=($(ls $main_release_dir/lib*.so)) for i in "${solibs[@]}" do name=$(basename $i) echo "--------${name}--------" - abidiff $i $main_release_dir/$name + abidiff $i $release_dir/$name done echo Static Library ABI Conformance -alibs=($(ls $release_dir/lib*.a)) +alibs=($(ls $main_release_dir/lib*.a)) for i in "${alibs[@]}" do name=$(basename $i) echo "--------${name}--------" - abidiff $i $main_release_dir/$name + abidiff $i $release_dir/$name done From 07f662e7438f60b725603fd1307c16b463d89c5e Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 01:26:46 +0100 Subject: [PATCH 036/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5d0afa060c..a3d40dc497f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,4 +116,4 @@ jobs: name: __release_lnx path: ./__release_lnx - name: Check ABI conformance - run: .ci/scripts/abi_check.sh __release_lnx/daal/latest/lib/intel64/ __release_lnx_main/daal/latest/lib/intel64/ + run: .ci/scripts/abi_check.sh __release_lnx_main/daal/latest/lib/intel64/ __release_lnx/daal/latest/lib/intel64/ From 278fab60ab259307c42e5b1bef8844d08f7c99bb Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 09:33:43 +0100 Subject: [PATCH 037/126] add ignore file --- .github/.abignore | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/.abignore diff --git a/.github/.abignore b/.github/.abignore new file mode 100644 index 00000000000..7997bea5367 --- /dev/null +++ b/.github/.abignore @@ -0,0 +1,41 @@ +; +; Copyright contributors to the oneDAL project +; +; 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. +; + +;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; DAAL DESELECTIONS ;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;; +; deselect daal::internal namespace +[suppress_type] + name_regexp = daal::internal.* + +[suppress_variable] + name_regexp = daal::internal.* + +[suppress_function] + name_regexp = daal::internal.* + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; oneDAL DESELECTIONS ;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; deselect oneap::dal::backend namespace +[suppress_type] + name_regexp = oneapi::dal::backend.* + +[suppress_variable] + name_regexp = oneapi::dal::backend.* + +[suppress_function] + name_regexp = oneapi::dal::backend.* From f9cc5fc538c555326d33637b5bc6f9f8cca483c5 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 10:15:15 +0100 Subject: [PATCH 038/126] fix CI and shell --- .ci/scripts/abi_check.sh | 9 --------- .github/.abignore | 2 +- .github/workflows/ci.yml | 4 +++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.ci/scripts/abi_check.sh b/.ci/scripts/abi_check.sh index 054446a7655..ff7481d9701 100755 --- a/.ci/scripts/abi_check.sh +++ b/.ci/scripts/abi_check.sh @@ -30,12 +30,3 @@ do echo "--------${name}--------" abidiff $i $release_dir/$name done - -echo Static Library ABI Conformance -alibs=($(ls $main_release_dir/lib*.a)) -for i in "${alibs[@]}" -do - name=$(basename $i) - echo "--------${name}--------" - abidiff $i $release_dir/$name -done diff --git a/.github/.abignore b/.github/.abignore index 7997bea5367..82d729f5833 100644 --- a/.github/.abignore +++ b/.github/.abignore @@ -30,7 +30,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; oneDAL DESELECTIONS ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; deselect oneap::dal::backend namespace +; deselect oneapi::dal::backend namespace [suppress_type] name_regexp = oneapi::dal::backend.* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3d40dc497f..467ade94c11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,8 @@ jobs: contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} needs: LinuxMakeDPCPP runs-on: ubuntu-24.04 + env: + LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE: ${{ github.workspace }/.github/.abignore timeout-minutes: 20 steps: @@ -116,4 +118,4 @@ jobs: name: __release_lnx path: ./__release_lnx - name: Check ABI conformance - run: .ci/scripts/abi_check.sh __release_lnx_main/daal/latest/lib/intel64/ __release_lnx/daal/latest/lib/intel64/ + run: .ci/scripts/abi_check.sh __release_lnx/daal/latest/lib/intel64/ __release_lnx_main/daal/latest/lib/intel64/ From 4a63442bee93162c3859976b5527bf506de7c0b5 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 10:16:33 +0100 Subject: [PATCH 039/126] swap back --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 467ade94c11..f8fee34f977 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,4 +118,4 @@ jobs: name: __release_lnx path: ./__release_lnx - name: Check ABI conformance - run: .ci/scripts/abi_check.sh __release_lnx/daal/latest/lib/intel64/ __release_lnx_main/daal/latest/lib/intel64/ + run: .ci/scripts/abi_check.sh __release_lnx_main/daal/latest/lib/intel64/ __release_lnx/daal/latest/lib/intel64/ From e6430342d8a8d686349bea17853056f7329f7e9a Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 10:41:54 +0100 Subject: [PATCH 040/126] close bracket --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8fee34f977..14f891bb45f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: needs: LinuxMakeDPCPP runs-on: ubuntu-24.04 env: - LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE: ${{ github.workspace }/.github/.abignore + LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE: ${{ github.workspace }}/.github/.abignore timeout-minutes: 20 steps: From ef866273d0788fb7c1f783c88030c34f6ca06102 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 11:09:25 +0100 Subject: [PATCH 041/126] spy into variables --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14f891bb45f..dc3c879287e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,11 @@ jobs: name: LinuxMakeDPCPP if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge + env: + TEST1: ${{ github.repository }} + TEST2: ${{ github.event_name }} + TEST3: ${{ github.event.action }} + TEST4: ${{ toJson(github.event.pull_request.labels.*.name) }} timeout-minutes: 120 steps: From 2b984494e1d29eef75fbaa803100951ade5ac0d4 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 11:17:27 +0100 Subject: [PATCH 042/126] fix if statement --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc3c879287e..c5feb37cf2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,6 @@ jobs: name: LinuxMakeDPCPP if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge - env: - TEST1: ${{ github.repository }} - TEST2: ${{ github.event_name }} - TEST3: ${{ github.event.action }} - TEST4: ${{ toJson(github.event.pull_request.labels.*.name) }} timeout-minutes: 120 steps: @@ -85,8 +80,7 @@ jobs: if: | ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && - !(github.event.action == 'labeled' && - contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} needs: LinuxMakeDPCPP runs-on: ubuntu-24.04 env: From e6cc863e3112bdef3be97508d024ccd6ef43cbdd Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 11:52:02 +0100 Subject: [PATCH 043/126] change spy improve regex --- .github/.abignore | 14 +++++++------- .github/workflows/ci.yml | 4 ++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/.abignore b/.github/.abignore index 82d729f5833..5f9cad4b7ed 100644 --- a/.github/.abignore +++ b/.github/.abignore @@ -19,23 +19,23 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;; ; deselect daal::internal namespace [suppress_type] - name_regexp = daal::internal.* + name_regexp = daal::internal::.* [suppress_variable] - name_regexp = daal::internal.* + name_regexp = daal::internal::.* [suppress_function] - name_regexp = daal::internal.* + name_regexp = daal::internal::.* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; oneDAL DESELECTIONS ;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; deselect oneapi::dal::backend namespace +; deselect oneapi::dal backend namespaces [suppress_type] - name_regexp = oneapi::dal::backend.* + name_regexp = oneapi::dal::.*backend::.* [suppress_variable] - name_regexp = oneapi::dal::backend.* + name_regexp = oneapi::dal::.*backend::.* [suppress_function] - name_regexp = oneapi::dal::backend.* + name_regexp = oneapi::dal::.*backend::.* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5feb37cf2b..a684807f96b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,10 @@ jobs: name: LinuxMakeDPCPP if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge + env: + TEST1: ${{ github.repository == 'uxlfoundation/oneDAL' }} + TEST2: ${{ github.event_name == 'pull_request' }} + TEST3: ${{ !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} timeout-minutes: 120 steps: From c08046e876e67673802c9713347276dd3780ad08 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Thu, 20 Feb 2025 14:41:19 +0100 Subject: [PATCH 044/126] add suggestions --- .github/.abignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/.abignore b/.github/.abignore index 5f9cad4b7ed..abda0889da5 100644 --- a/.github/.abignore +++ b/.github/.abignore @@ -39,3 +39,13 @@ [suppress_function] name_regexp = oneapi::dal::.*backend::.* + +; deselect oneapi::dal detail namespaces +[suppress_type] + name_regexp = oneapi::dal::.*detail::.* + +[suppress_variable] + name_regexp = oneapi::dal::.*detail::.* + +[suppress_function] + name_regexp = oneapi::dal::.*detail::.* From 9769b7aab41aec091db92846cf3fd651693bbe58 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 18:26:49 +0100 Subject: [PATCH 045/126] Update ci.yml --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a684807f96b..88b46491f54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,14 @@ jobs: TEST1: ${{ github.repository == 'uxlfoundation/oneDAL' }} TEST2: ${{ github.event_name == 'pull_request' }} TEST3: ${{ !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + TEST4: | + ${{ github.repository == 'uxlfoundation/oneDAL' && + github.event_name == 'pull_request' && + !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + TEST5: | + ${{ github.event_name == 'pull_request' && + !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + TEST6: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} timeout-minutes: 120 steps: From 4591caa8428d2298fefa6f9f0d42c3cb67124b06 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 19:57:04 +0100 Subject: [PATCH 046/126] Update ci.yml --- .github/workflows/ci.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88b46491f54..0f5b20fbd1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ concurrency: jobs: LinuxMakeDPCPP: - name: LinuxMakeDPCPP + name: LinuxMakeDPCPP(AVX512) if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge env: @@ -71,11 +71,11 @@ jobs: - name: Make daal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal + .ci/scripts/build.sh --compiler icx --optimizations avx512 --target daal - name: Make onedal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal + .ci/scripts/build.sh --compiler icx --optimizations avx512 --target onedal - name: Archive build uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: @@ -89,13 +89,24 @@ jobs: LinuxABICheck: name: ABI Conformance + needs: LinuxMakeDPCPP if: | ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - needs: LinuxMakeDPCPP runs-on: ubuntu-24.04 env: + TEST1: ${{ github.repository == 'uxlfoundation/oneDAL' }} + TEST2: ${{ github.event_name == 'pull_request' }} + TEST3: ${{ !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + TEST4: | + ${{ github.repository == 'uxlfoundation/oneDAL' && + github.event_name == 'pull_request' && + !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + TEST5: | + ${{ github.event_name == 'pull_request' && + !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + TEST6: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE: ${{ github.workspace }}/.github/.abignore timeout-minutes: 20 From 1e3d2ab469af33814669883377d2b34305a7282c Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 21:49:12 +0100 Subject: [PATCH 047/126] Update daal_defines.h --- cpp/daal/include/services/daal_defines.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/services/daal_defines.h b/cpp/daal/include/services/daal_defines.h index 6a0880fd444..726ededf89d 100644 --- a/cpp/daal/include/services/daal_defines.h +++ b/cpp/daal/include/services/daal_defines.h @@ -50,11 +50,11 @@ #define __int64 long long int #endif -#if defined(_WIN32) || defined(_WIN64) - #ifdef __DAAL_IMPLEMENTATION +#ifdef __DAAL_IMPLEMENTATION + #if defined(_WIN32) || defined(_WIN64) #define DAAL_EXPORT __declspec(dllexport) #else - #define DAAL_EXPORT + #define DAAL_EXPORT __attribute__((visibility("default"))) #endif #else #define DAAL_EXPORT From c379e4a7762131a4c84ea129e59e089cb5902f01 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 21:53:32 +0100 Subject: [PATCH 048/126] Update makefile --- makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 36b587fb2bd..4cfd03f994c 100644 --- a/makefile +++ b/makefile @@ -129,6 +129,7 @@ y := $(notdir $(filter $(_OS)/%,lnx/so win/dll mac/dylib)) -Q := $(if $(OS_is_win),$(if $(COMPILER_is_vc),-,-Q),-) -cxx17 := $(if $(COMPILER_is_vc),/std:c++17,$(-Q)std=c++17) -fPIC := $(if $(OS_is_win),,-fPIC) +-visibility := $(if $(OS_is_win),,-fvisibility=hidden) -DMKL_ILP64 := $(if $(filter mkl,$(BACKEND_CONFIG)),-DMKL_ILP64) -Zl := $(-Zl.$(COMPILER)) -Zl_DPCPP := $(-Zl.dpcpp) @@ -507,7 +508,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) $(VTUNES $(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) $(-DMKL_ILP64) $(-DPROFILER) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(-DMKL_ILP64) $(-DPROFILER) $(-visibility) $(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) @@ -516,7 +517,7 @@ $(CORE.objs_a): COPT += @$(CORE.tmpdir_a)/inc_a_folders.txt $(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) $(-DMKL_ILP64) $(-DPROFILER) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(-DMKL_ILP64) $(-DPROFILER) $(-visibility) $(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 \ From 23ee2f363a50f8ac484231dbd3c27391841251b5 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 22:01:46 +0100 Subject: [PATCH 049/126] Update ci.yml --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f5b20fbd1c..6b951b7c0a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,10 +90,7 @@ jobs: LinuxABICheck: name: ABI Conformance needs: LinuxMakeDPCPP - if: | - ${{ github.repository == 'uxlfoundation/oneDAL' && - github.event_name == 'pull_request' && - !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + if: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} runs-on: ubuntu-24.04 env: TEST1: ${{ github.repository == 'uxlfoundation/oneDAL' }} From 8d1888321d93c43a0dc7f3ccae3d650fea40a633 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 22:27:56 +0100 Subject: [PATCH 050/126] Update ci.yml --- .github/workflows/ci.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b951b7c0a3..15ec14569c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,20 +90,12 @@ jobs: LinuxABICheck: name: ABI Conformance needs: LinuxMakeDPCPP - if: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + if: > + ${{ github.repository == 'uxlfoundation/oneDAL' && + github.event_name == 'pull_request' && + !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} runs-on: ubuntu-24.04 env: - TEST1: ${{ github.repository == 'uxlfoundation/oneDAL' }} - TEST2: ${{ github.event_name == 'pull_request' }} - TEST3: ${{ !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - TEST4: | - ${{ github.repository == 'uxlfoundation/oneDAL' && - github.event_name == 'pull_request' && - !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - TEST5: | - ${{ github.event_name == 'pull_request' && - !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - TEST6: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE: ${{ github.workspace }}/.github/.abignore timeout-minutes: 20 From c63ba0f72d5ed05b2cc616d8ea17c1fedf824cc5 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 23:02:35 +0100 Subject: [PATCH 051/126] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15ec14569c4..387c92ad2ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: name: ABI Conformance needs: LinuxMakeDPCPP if: > - ${{ github.repository == 'uxlfoundation/oneDAL' && + ${{ success() && github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} runs-on: ubuntu-24.04 From fab9bd0b06f13ae3ffbb473eace566d811e80e04 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 23:44:24 +0100 Subject: [PATCH 052/126] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 387c92ad2ce..f161a1d88f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ concurrency: jobs: LinuxMakeDPCPP: - name: LinuxMakeDPCPP(AVX512) + name: LinuxMakeDPCPP(AVX2) if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge env: @@ -90,10 +90,10 @@ jobs: LinuxABICheck: name: ABI Conformance needs: LinuxMakeDPCPP - if: > - ${{ success() && github.repository == 'uxlfoundation/oneDAL' && + if: | + github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && - !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} + ! contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"') runs-on: ubuntu-24.04 env: LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE: ${{ github.workspace }}/.github/.abignore From b950b412df1cd6a476a3aeba32df9ec03e46b4b7 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 23:44:41 +0100 Subject: [PATCH 053/126] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f161a1d88f0..0661b48d482 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,11 +71,11 @@ jobs: - name: Make daal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx512 --target daal + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal - name: Make onedal run: | source /opt/intel/oneapi/setvars.sh - .ci/scripts/build.sh --compiler icx --optimizations avx512 --target onedal + .ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal - name: Archive build uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 with: From 942b01073336b6251d6ae3f4475d1278b4f57d54 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 23:45:46 +0100 Subject: [PATCH 054/126] Update ci.yml --- .github/workflows/ci.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0661b48d482..f60b3d36443 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,18 +36,6 @@ jobs: name: LinuxMakeDPCPP(AVX2) if: github.repository == 'uxlfoundation/oneDAL' runs-on: uxl-gpu-4xlarge - env: - TEST1: ${{ github.repository == 'uxlfoundation/oneDAL' }} - TEST2: ${{ github.event_name == 'pull_request' }} - TEST3: ${{ !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - TEST4: | - ${{ github.repository == 'uxlfoundation/oneDAL' && - github.event_name == 'pull_request' && - !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - TEST5: | - ${{ github.event_name == 'pull_request' && - !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} - TEST6: ${{ github.repository == 'uxlfoundation/oneDAL' && github.event_name == 'pull_request' && !(contains(toJson(github.event.pull_request.labels.*.name), '"API/ABI breaking change"')) }} timeout-minutes: 120 steps: From 94add60ae2177b4571d348ed69d5b224885a76b8 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 23:55:12 +0100 Subject: [PATCH 055/126] Update common.hpp --- cpp/oneapi/dal/common.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/oneapi/dal/common.hpp b/cpp/oneapi/dal/common.hpp index b9df2ece9a5..7927515b1ff 100644 --- a/cpp/oneapi/dal/common.hpp +++ b/cpp/oneapi/dal/common.hpp @@ -19,8 +19,8 @@ #include #include +#ifdef __ONEDAL_ENABLE_EXPORT__ #if defined(_WIN32) || defined(_WIN64) -#ifdef __ONEDAL_ENABLE_DLL_EXPORT__ #define __ONEDAL_IMPORT_IMPL __declspec(dllimport) #define __ONEDAL_EXPORT_IMPL __declspec(dllexport) #ifdef INVERT_EXPORT_IMPORT @@ -30,8 +30,10 @@ #define ONEDAL_EXPORT __ONEDAL_EXPORT_IMPL #define ONEDAL_IMPORT __ONEDAL_IMPORT_IMPL #endif // defined(INVERT_EXPORT_IMPORT) -#endif // __ONEDAL_ENABLE_DLL_EXPORT__ +#else +#define ONEDAL_EXPORT __attribute__((visibility("default"))) #endif // defined(_WIN32) || defined(_WIN64) +#endif // __ONEDAL_ENABLE_EXPORT__ #ifndef ONEDAL_EXPORT #define ONEDAL_EXPORT From f52fc5ad8ce8890b3b7798bcee7469c8826bf2bf Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 20 Feb 2025 23:56:31 +0100 Subject: [PATCH 056/126] Update makefile --- makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 4cfd03f994c..ac85a6de13e 100644 --- a/makefile +++ b/makefile @@ -705,7 +705,7 @@ $(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-E -DDAAL_HIDE_DEPRECATED \ -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) \ - -D__ONEDAL_ENABLE_DLL_EXPORT__ \ + -D__ONEDAL_ENABLE_EXPORT__ \ -D__TBB_NO_IMPLICIT_LINKAGE \ -DTBB_USE_ASSERT=0 \ @$(ONEAPI.tmpdir_y)/inc_y_folders.txt @@ -722,7 +722,7 @@ $(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl_DPCPP) $(-DMKL_ILP64) $(- -DONEDAL_DATA_PARALLEL \ -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ $(if $(CHECK_DLL_SIG),-DDAAL_CHECK_DLL_SIG) \ - -D__ONEDAL_ENABLE_DLL_EXPORT__ \ + -D__ONEDAL_ENABLE_EXPORT__ \ -D__TBB_NO_IMPLICIT_LINKAGE \ -DTBB_USE_ASSERT=0 \ @$(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt From a8de4d6525c1df8fcf85244d9319af4373fa4d6c Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 00:01:57 +0100 Subject: [PATCH 057/126] Update makefile --- makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index ac85a6de13e..eda33818385 100644 --- a/makefile +++ b/makefile @@ -508,7 +508,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) $(VTUNES $(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) $(-DMKL_ILP64) $(-DPROFILER) $(-visibility) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-visibility) $(-DEBC) $(-DMKL_ILP64) $(-DPROFILER) $(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) @@ -517,7 +517,7 @@ $(CORE.objs_a): COPT += @$(CORE.tmpdir_a)/inc_a_folders.txt $(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) $(-DMKL_ILP64) $(-DPROFILER) $(-visibility) +$(CORE.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-visibility) $(-DEBC) $(-DMKL_ILP64) $(-DPROFILER) $(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 \ @@ -700,7 +700,7 @@ $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_a.dpc),.dpcpp)) # Set compilation options to the object files which are part of DYNAMIC lib $(ONEAPI.objs_y): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y)/inc_y_folders.txt -$(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts) \ +$(ONEAPI.objs_y): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-visibility) $(-DMKL_ILP64) $(-DEBC) $(-EHsc) $(pedantic.opts) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -D_ENABLE_ATOMIC_ALIGNMENT_FIX \ @@ -716,7 +716,7 @@ $(eval $(call update_copt_from_dispatcher_tag,$(ONEAPI.objs_y))) # When compiling with the debug flag $(-DEBC_DPCPP), linking with libonedal_dpc.so may cause indefinite linking times # due to the extensive processing of debug information. For debugging, please use the static library version (libonedal_dpc.a). $(ONEAPI.objs_y.dpc): $(ONEAPI.dispatcher_cpu) $(ONEAPI.tmpdir_y.dpc)/inc_y_folders.txt -$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl_DPCPP) $(-DMKL_ILP64) $(-EHsc) $(pedantic.opts.dpcpp) \ +$(ONEAPI.objs_y.dpc): COPT += $(-fPIC) $(-cxx17) $(-Zl_DPCPP) $(-visibility) $(-DMKL_ILP64) $(-EHsc) $(pedantic.opts.dpcpp) \ -DDAAL_NOTHROW_EXCEPTIONS \ -DDAAL_HIDE_DEPRECATED \ -DONEDAL_DATA_PARALLEL \ From 6ee5eb394876295f4d5218afcc9d201376579046 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 00:29:29 +0100 Subject: [PATCH 058/126] Update makefile --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index eda33818385..f73bdefb85c 100644 --- a/makefile +++ b/makefile @@ -508,7 +508,7 @@ $(WORKDIR.lib)/$(core_y): $(daaldep.math_backend.ext) $(VTUNES $(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) $(-visibility) $(-DEBC) $(-DMKL_ILP64) $(-DPROFILER) +$(CORE.objs_a): COPT += $(-fPIC) $(-cxx17) $(-Zl) $(-DEBC) $(-DMKL_ILP64) $(-DPROFILER) $(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) From d23a68c63254cfdb632fc9d1f072fe7e5fee4ff8 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 01:06:35 +0100 Subject: [PATCH 059/126] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f60b3d36443..4c8fc3401e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,9 +95,9 @@ jobs: - name: Get run ID of "CI" workflow id: get-run-id run: | - OTHER_REPO="icfaust/oneDAL" - WF_NAME="Nightly-build" - JQ_QUERY='map(select(.event == "schedule")) | .[0].databaseId' + OTHER_REPO="uxlfoundation/oneDAL" + WF_NAME="CI" + JQ_QUERY='map(select(.event == "push")) | .[0].databaseId' RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" @@ -108,7 +108,7 @@ jobs: with: name: __release_lnx github-token: ${{ github.token }} - repository: icfaust/oneDAL + repository: uxlfoundation/oneDAL run-id: ${{ steps.get-run-id.outputs.run-id }} path: ./__release_lnx_main - name: Download oneDAL build artifact From d8ddd4ed04928da71c65c7c7c2df4e7f33774466 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 07:20:41 +0100 Subject: [PATCH 060/126] Update adaboost_predict_dense_default_batch_fpt_cpu.cpp --- .../adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp index 86e3cccd12c..89dc88900c0 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp @@ -40,8 +40,8 @@ template class BatchContainer; } // namespace interface2 namespace internal { -template class AdaBoostPredictKernel; -template class AdaBoostPredictKernel; +template class DAAL_EXPORT AdaBoostPredictKernel; +template class DAAL_EXPORT AdaBoostPredictKernel; } // namespace internal } // namespace prediction } // namespace adaboost From 59930dd0c7bf1762d858b054521ef9ab9dc9b198 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 07:28:45 +0100 Subject: [PATCH 061/126] Update adaboost_predict_dense_default_batch_fpt_cpu.cpp --- .../adaboost_predict_dense_default_batch_fpt_cpu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp index 89dc88900c0..30d04f1ef3d 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp @@ -35,13 +35,13 @@ namespace prediction { namespace interface2 { -template class BatchContainer; -template class BatchContainer; +template class DAAL_EXPORT BatchContainer; +template class DAAL_EXPORT BatchContainer; } // namespace interface2 namespace internal { -template class DAAL_EXPORT AdaBoostPredictKernel; -template class DAAL_EXPORT AdaBoostPredictKernel; +template class AdaBoostPredictKernel; +template class AdaBoostPredictKernel; } // namespace internal } // namespace prediction } // namespace adaboost From 37cfa57be65cf89b201f1aedcac6905d5664cb53 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 07:30:03 +0100 Subject: [PATCH 062/126] Update adaboost_train_dense_default_batch_fpt_cpu.cpp --- .../adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp index 9b8c423384d..1c0b324e5f2 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp @@ -35,8 +35,8 @@ namespace training { namespace interface2 { -template class BatchContainer; -template class BatchContainer; +template class DAAL_EXPORT BatchContainer; +template class DAAL_EXPORT BatchContainer; } // namespace interface2 namespace internal { From 37501b303233b1669a28d333789aeec6db206ab4 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 07:32:07 +0100 Subject: [PATCH 063/126] Update adaboost_predict_dense_default_batch_fpt_cpu.cpp --- .../adaboost_predict_dense_default_batch_fpt_cpu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp index 30d04f1ef3d..89dc88900c0 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_cpu.cpp @@ -35,13 +35,13 @@ namespace prediction { namespace interface2 { -template class DAAL_EXPORT BatchContainer; -template class DAAL_EXPORT BatchContainer; +template class BatchContainer; +template class BatchContainer; } // namespace interface2 namespace internal { -template class AdaBoostPredictKernel; -template class AdaBoostPredictKernel; +template class DAAL_EXPORT AdaBoostPredictKernel; +template class DAAL_EXPORT AdaBoostPredictKernel; } // namespace internal } // namespace prediction } // namespace adaboost From eb503d5668653e6629530f9386d16072ea97b5a7 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 07:32:59 +0100 Subject: [PATCH 064/126] Update adaboost_train_dense_default_batch_fpt_cpu.cpp --- .../adaboost_train_dense_default_batch_fpt_cpu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp index 1c0b324e5f2..31012ecafb8 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_cpu.cpp @@ -35,13 +35,13 @@ namespace training { namespace interface2 { -template class DAAL_EXPORT BatchContainer; -template class DAAL_EXPORT BatchContainer; +template class BatchContainer; +template class BatchContainer; } // namespace interface2 namespace internal { -template class AdaBoostTrainKernel; -template class AdaBoostTrainKernel; +template class DAAL_EXPORT AdaBoostTrainKernel; +template class DAAL_EXPORT AdaBoostTrainKernel; } // namespace internal } // namespace training } // namespace adaboost From e2ad1ec60090dec0a008f94298c65968c46db1fe Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 08:56:55 +0100 Subject: [PATCH 065/126] Update adaboost_train_dense_default_batch_fpt_dispatcher.cpp --- .../adaboost_train_dense_default_batch_fpt_dispatcher.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index a7250e3a24c..e4cd266bc79 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -52,9 +52,9 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -#define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ - template Batch::Batch(size_t); \ - template Batch::Batch(const Batch &); +#define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ + template Batch::Batch(size_t); \ + template Batch::Batch(const Batch &); \ INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::defaultDense); INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::sammeR); From 8049b4b8577631c51d8594726a7f185504cadea8 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 10:07:01 +0100 Subject: [PATCH 066/126] Update compute_types.hpp --- cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp b/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp index a07e3e6c482..769fb2713e6 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp +++ b/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp @@ -43,7 +43,7 @@ namespace v1 { /// @tparam Task Tag-type that specifies the type of the problem to solve. Can /// be :expr:`task::compute`. template -class compute_input : public base { +class ONEDAL_EXPORT compute_input : public base { static_assert(detail::is_valid_task_v); public: @@ -82,7 +82,7 @@ class compute_input : public base { /// @tparam Task Tag-type that specifies the type of the problem to solve. Can /// be :expr:`task::compute`. template -class compute_result : public base { +class ONEDAL_EXPORT compute_result : public base { static_assert(detail::is_valid_task_v); public: @@ -218,7 +218,7 @@ class compute_result : public base { }; template -class partial_compute_result : public base { +class ONEDAL_EXPORT partial_compute_result : public base { static_assert(detail::is_valid_task_v); public: @@ -293,7 +293,7 @@ class partial_compute_result : public base { }; template -class partial_compute_input : protected compute_input { +class ONEDAL_EXPORT partial_compute_input : protected compute_input { public: using task_t = Task; From 5abc73d89fb4552d30ee410f5b4186ef304032d4 Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 02:35:29 -0800 Subject: [PATCH 067/126] fix issues with partial, still leaves decision_tree nodes --- cpp/oneapi/dal/algo/basic_statistics/common.cpp | 2 +- cpp/oneapi/dal/algo/basic_statistics/common.hpp | 2 +- cpp/oneapi/dal/algo/basic_statistics/compute_types.cpp | 2 +- cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp | 9 ++++----- cpp/oneapi/dal/algo/covariance/compute_types.cpp | 2 +- cpp/oneapi/dal/algo/linear_regression/train_types.cpp | 2 +- cpp/oneapi/dal/algo/pca/train_types.cpp | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cpp/oneapi/dal/algo/basic_statistics/common.cpp b/cpp/oneapi/dal/algo/basic_statistics/common.cpp index b34020d15dc..46c5a0f33e6 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/common.cpp +++ b/cpp/oneapi/dal/algo/basic_statistics/common.cpp @@ -92,7 +92,7 @@ void descriptor_base::set_result_options_impl(const result_option_id& valu impl_->result_options = value; } -template class ONEDAL_EXPORT descriptor_base; +template class descriptor_base; } // namespace v1 } // namespace oneapi::dal::basic_statistics::detail diff --git a/cpp/oneapi/dal/algo/basic_statistics/common.hpp b/cpp/oneapi/dal/algo/basic_statistics/common.hpp index a0fb211e8a4..e9f91a05eeb 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/common.hpp +++ b/cpp/oneapi/dal/algo/basic_statistics/common.hpp @@ -126,7 +126,7 @@ template constexpr bool is_valid_task_v = dal::detail::is_one_of_v; template -class descriptor_base : public base { +class ONEDAL_EXPORT descriptor_base : public base { static_assert(is_valid_task_v); public: diff --git a/cpp/oneapi/dal/algo/basic_statistics/compute_types.cpp b/cpp/oneapi/dal/algo/basic_statistics/compute_types.cpp index ef40d48f239..543dee75027 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/compute_types.cpp +++ b/cpp/oneapi/dal/algo/basic_statistics/compute_types.cpp @@ -355,8 +355,8 @@ const table& partial_compute_result::get_partial_sum_squares_centered() co } template class ONEDAL_EXPORT compute_input; template class ONEDAL_EXPORT compute_result; -template class ONEDAL_EXPORT partial_compute_input; template class ONEDAL_EXPORT partial_compute_result; +template class ONEDAL_EXPORT partial_compute_input; } // namespace v1 } // namespace oneapi::dal::basic_statistics diff --git a/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp b/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp index 769fb2713e6..663a6b3e4ae 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp +++ b/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp @@ -43,7 +43,7 @@ namespace v1 { /// @tparam Task Tag-type that specifies the type of the problem to solve. Can /// be :expr:`task::compute`. template -class ONEDAL_EXPORT compute_input : public base { +class compute_input : public base { static_assert(detail::is_valid_task_v); public: @@ -82,7 +82,7 @@ class ONEDAL_EXPORT compute_input : public base { /// @tparam Task Tag-type that specifies the type of the problem to solve. Can /// be :expr:`task::compute`. template -class ONEDAL_EXPORT compute_result : public base { +class compute_result : public base { static_assert(detail::is_valid_task_v); public: @@ -218,7 +218,7 @@ class ONEDAL_EXPORT compute_result : public base { }; template -class ONEDAL_EXPORT partial_compute_result : public base { +class partial_compute_result : public base { static_assert(detail::is_valid_task_v); public: @@ -293,9 +293,8 @@ class ONEDAL_EXPORT partial_compute_result : public base { }; template -class ONEDAL_EXPORT partial_compute_input : protected compute_input { +class partial_compute_input : protected compute_input { public: - using task_t = Task; partial_compute_input(); diff --git a/cpp/oneapi/dal/algo/covariance/compute_types.cpp b/cpp/oneapi/dal/algo/covariance/compute_types.cpp index 58cf70661f1..f0f37560031 100644 --- a/cpp/oneapi/dal/algo/covariance/compute_types.cpp +++ b/cpp/oneapi/dal/algo/covariance/compute_types.cpp @@ -219,8 +219,8 @@ void partial_compute_result::set_partial_sum_impl(const table& value) { template class ONEDAL_EXPORT compute_input; template class ONEDAL_EXPORT compute_result; -template class ONEDAL_EXPORT partial_compute_input; template class ONEDAL_EXPORT partial_compute_result; +template class ONEDAL_EXPORT partial_compute_input; } // namespace v1 } // namespace oneapi::dal::covariance diff --git a/cpp/oneapi/dal/algo/linear_regression/train_types.cpp b/cpp/oneapi/dal/algo/linear_regression/train_types.cpp index 925ffe526b1..2e33229240f 100644 --- a/cpp/oneapi/dal/algo/linear_regression/train_types.cpp +++ b/cpp/oneapi/dal/algo/linear_regression/train_types.cpp @@ -252,8 +252,8 @@ void partial_train_result::set_partial_xty_impl(const table& value) { template class ONEDAL_EXPORT train_result; template class ONEDAL_EXPORT train_input; -template class ONEDAL_EXPORT partial_train_input; template class ONEDAL_EXPORT partial_train_result; +template class ONEDAL_EXPORT partial_train_input; } // namespace v1 } // namespace oneapi::dal::linear_regression diff --git a/cpp/oneapi/dal/algo/pca/train_types.cpp b/cpp/oneapi/dal/algo/pca/train_types.cpp index 52bcb8b1e15..fb5c79267e9 100644 --- a/cpp/oneapi/dal/algo/pca/train_types.cpp +++ b/cpp/oneapi/dal/algo/pca/train_types.cpp @@ -258,8 +258,8 @@ void partial_train_result::set_auxiliary_table_impl(const table& value) { template class ONEDAL_EXPORT train_input; template class ONEDAL_EXPORT train_result; -template class ONEDAL_EXPORT partial_train_input; template class ONEDAL_EXPORT partial_train_result; +template class ONEDAL_EXPORT partial_train_input; } // namespace v1 } // namespace oneapi::dal::pca From fb1fd8054cb4f2cc75c57b0ec6b9a405040c3d89 Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 02:37:07 -0800 Subject: [PATCH 068/126] remove ONEDAL_EXPORT --- cpp/oneapi/dal/algo/basic_statistics/common.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/oneapi/dal/algo/basic_statistics/common.hpp b/cpp/oneapi/dal/algo/basic_statistics/common.hpp index e9f91a05eeb..a0fb211e8a4 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/common.hpp +++ b/cpp/oneapi/dal/algo/basic_statistics/common.hpp @@ -126,7 +126,7 @@ template constexpr bool is_valid_task_v = dal::detail::is_one_of_v; template -class ONEDAL_EXPORT descriptor_base : public base { +class descriptor_base : public base { static_assert(is_valid_task_v); public: From a8a5eec52327d1424283bd4600acfba39018e0b7 Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 02:37:52 -0800 Subject: [PATCH 069/126] return change --- cpp/oneapi/dal/algo/basic_statistics/common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/oneapi/dal/algo/basic_statistics/common.cpp b/cpp/oneapi/dal/algo/basic_statistics/common.cpp index 46c5a0f33e6..b34020d15dc 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/common.cpp +++ b/cpp/oneapi/dal/algo/basic_statistics/common.cpp @@ -92,7 +92,7 @@ void descriptor_base::set_result_options_impl(const result_option_id& valu impl_->result_options = value; } -template class descriptor_base; +template class ONEDAL_EXPORT descriptor_base; } // namespace v1 } // namespace oneapi::dal::basic_statistics::detail From b615d3d8b619d9679b73150258c6617728bd021e Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 02:40:38 -0800 Subject: [PATCH 070/126] further return --- cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp b/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp index 663a6b3e4ae..a07e3e6c482 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp +++ b/cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp @@ -295,6 +295,7 @@ class partial_compute_result : public base { template class partial_compute_input : protected compute_input { public: + using task_t = Task; partial_compute_input(); From 526c80b719921164fe69c2520d395b58dd9a9f3d Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 02:55:34 -0800 Subject: [PATCH 071/126] fix another implicit instantiation --- cpp/oneapi/dal/algo/basic_statistics/common.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/oneapi/dal/algo/basic_statistics/common.hpp b/cpp/oneapi/dal/algo/basic_statistics/common.hpp index a0fb211e8a4..c104195e498 100644 --- a/cpp/oneapi/dal/algo/basic_statistics/common.hpp +++ b/cpp/oneapi/dal/algo/basic_statistics/common.hpp @@ -167,9 +167,9 @@ namespace v1 { /// be :expr:`method::dense`. /// @tparam Task Tag-type that specifies the type of the problem to solve. Can /// be :expr:`task::compute`. -template ::float_t, - typename Method = detail::descriptor_base<>::method_t, - typename Task = detail::descriptor_base<>::task_t> +template class descriptor : public detail::descriptor_base { static_assert(detail::is_valid_float_v); static_assert(detail::is_valid_method_v); From fc156915dd78eaa8f515bd675c60598c6204ca45 Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 03:13:29 -0800 Subject: [PATCH 072/126] fix node_info instantiation --- cpp/oneapi/dal/algo/decision_tree/common.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/cpp/oneapi/dal/algo/decision_tree/common.cpp b/cpp/oneapi/dal/algo/decision_tree/common.cpp index f0c9ef12ea0..61414b662f4 100644 --- a/cpp/oneapi/dal/algo/decision_tree/common.cpp +++ b/cpp/oneapi/dal/algo/decision_tree/common.cpp @@ -210,8 +210,6 @@ double leaf_node_info::get_response() const { return de::cast_impl(*this).response; } -template class ONEDAL_EXPORT node_info; -template class ONEDAL_EXPORT node_info; template class ONEDAL_EXPORT split_node_info; template class ONEDAL_EXPORT split_node_info; From 93d11f6ea1ed527df1f3edd4f30f4fe3312b3e0f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 19:03:19 +0100 Subject: [PATCH 073/126] Update adaboost_train_dense_default_batch_fpt_dispatcher.cpp --- ...adaboost_train_dense_default_batch_fpt_dispatcher.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index e4cd266bc79..e1677b0a657 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -52,12 +52,9 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -#define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ - template Batch::Batch(size_t); \ - template Batch::Batch(const Batch &); \ - -INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::defaultDense); -INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::sammeR); +#define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ + template Batch::Batch(size_t); \ + template Batch::Batch(const Batch &) } // namespace interface2 } // namespace training From 55c5fbfd0560cb5bcd09468c320fe189c3b59998 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 19:06:26 +0100 Subject: [PATCH 074/126] Update adaboost_train_dense_default_batch_fpt_dispatcher.cpp --- .../adaboost_train_dense_default_batch_fpt_dispatcher.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index e1677b0a657..f5a45d149b5 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -55,7 +55,10 @@ Batch::Batch(const Batch & other) : classifier::trainin #define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ template Batch::Batch(size_t); \ template Batch::Batch(const Batch &) +template Batch::Batch(const Batch &); +INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::defaultDense); +INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::sammeR); } // namespace interface2 } // namespace training } // namespace adaboost From b8acd230ae069a8023f68f1abd50e7023a3ccc24 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 19:08:01 +0100 Subject: [PATCH 075/126] Update adaboost_train_dense_default_batch_fpt_dispatcher.cpp --- .../adaboost_train_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index f5a45d149b5..a7250e3a24c 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -54,11 +54,11 @@ Batch::Batch(const Batch & other) : classifier::trainin #define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ template Batch::Batch(size_t); \ - template Batch::Batch(const Batch &) -template Batch::Batch(const Batch &); + template Batch::Batch(const Batch &); INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::defaultDense); INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::sammeR); + } // namespace interface2 } // namespace training } // namespace adaboost From f8f8bc5633f5d2124850237b5cc3cb65497d3cb9 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Fri, 21 Feb 2025 23:59:48 +0100 Subject: [PATCH 076/126] Update adaboost_train_dense_default_batch_fpt_dispatcher.cpp --- .../adaboost_train_dense_default_batch_fpt_dispatcher.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index a7250e3a24c..00bc6dba4e4 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -52,12 +52,8 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -#define INSTANTIATE_CONSTRUCTORS(algorithmFPType, method) \ - template Batch::Batch(size_t); \ - template Batch::Batch(const Batch &); - -INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::defaultDense); -INSTANTIATE_CONSTRUCTORS(DAAL_FPTYPE, adaboost::training::sammeR); +template class Batch; +template class Batch; } // namespace interface2 } // namespace training From c4a27cfd0c871f2b128906fafb8455218faf8ac7 Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 15:07:29 -0800 Subject: [PATCH 077/126] fix stump too --- ...ump_regression_train_dense_default_batch_fpt_dispatcher.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp index 82b938cbd20..5e6d6c60810 100644 --- a/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -52,8 +52,7 @@ Batch::Batch(const Batch & other) : algorithms::regress initialize(); } -template Batch::Batch(); -template Batch::Batch(const Batch &); +template class Batch; } // namespace interface1 } // namespace training From bd1219ea1f2873dd0dcfbfa81c633b5018daeb9c Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 15:34:07 -0800 Subject: [PATCH 078/126] attempt to define some missing things --- .../assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp | 3 +++ .../covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp | 3 +++ .../covariance/covariance_csr_fast_online_fpt_dispatcher.cpp | 3 +++ .../covariance_csr_singlepass_batch_fpt_dispatcher.cpp | 3 +++ .../covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp | 3 +++ .../covariance_dense_default_batch_fpt_dispatcher.cpp | 3 +++ .../covariance_dense_singlepass_batch_fpt_dispatcher.cpp | 3 +++ .../covariance_dense_singlepass_online_fpt_dispatcher.cpp | 3 +++ .../covariance/covariance_dense_sum_online_fpt_dispatcher.cpp | 3 +++ 9 files changed, 27 insertions(+) diff --git a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp index caceeec46b9..0ee2589e824 100644 --- a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp @@ -29,5 +29,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(association_rules::BatchContainer, batch, DAAL_FPTYPE, association_rules::apriori) + +template class Batch; + } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp index f2a26018648..4dd7a22e2f6 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::fastCSR) + +template class Batch; + } } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp index ea759a47fb5..7a46f289c7e 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::fastCSR) + +template class Online; + } } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp index 2729bf4bb19..57d00e57fb9 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::singlePassCSR) + +template class Batch; + } } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp index dec03ca3674..3390d32ce5b 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::sumCSR) + +template class Batch; + } } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp index 37fc7632532..811d446e54e 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::defaultDense) + +template class Batch; + } } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp index cdeaa1592dd..f5fac1f52a8 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::singlePassDense) + +template class Online; + } } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp index 936413ee1bf..f5cd288e606 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp @@ -28,5 +28,8 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::sumDense) + +template class Online; + } } // namespace daal From 2f0d4b274a6928377b8763cf392c6c6de679b22a Mon Sep 17 00:00:00 2001 From: icfaust Date: Fri, 21 Feb 2025 15:50:11 -0800 Subject: [PATCH 079/126] move namespaces --- .../assoc_rules_apriori_batch_fpt_dispatcher.cpp | 7 ++++++- .../covariance_csr_fast_batch_fpt_dispatcher.cpp | 9 +++++++-- .../covariance_csr_fast_online_fpt_dispatcher.cpp | 10 +++++++--- ...covariance_csr_singlepass_batch_fpt_dispatcher.cpp | 10 +++++++--- .../covariance_csr_sum_batch_fpt_dispatcher.cpp | 10 +++++++--- .../covariance_csr_sum_online_fpt_dispatcher.cpp | 10 +++++++++- .../covariance_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++++--- ...covariance_dense_default_online_fpt_dispatcher.cpp | 9 ++++++++- ...variance_dense_singlepass_batch_fpt_dispatcher.cpp | 10 +++++++--- ...ariance_dense_singlepass_online_fpt_dispatcher.cpp | 10 +++++++--- .../covariance_dense_sum_online_fpt_dispatcher.cpp | 9 +++++++-- 11 files changed, 80 insertions(+), 25 deletions(-) diff --git a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp index 0ee2589e824..cf8723241d3 100644 --- a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp @@ -30,7 +30,12 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(association_rules::BatchContainer, batch, DAAL_FPTYPE, association_rules::apriori) +namespace association_rules +{ +namespace interface1 +{ template class Batch; - +} // namespace interface1 +} // namespace association_rules } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp index 4dd7a22e2f6..c5ead00ecbe 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp @@ -29,7 +29,12 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::fastCSR) +namespace covariance +{ +namespace interface1 +{ template class Batch; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp index 7a46f289c7e..02aa89380f0 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp @@ -28,8 +28,12 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::fastCSR) - +namespace covariance +{ +namespace interface1 +{ template class Online; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp index 57d00e57fb9..9e127f6c857 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp @@ -28,8 +28,12 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::singlePassCSR) - +namespace covariance +{ +namespace interface1 +{ template class Batch; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp index 3390d32ce5b..3682d7f58d5 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp @@ -28,8 +28,12 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::sumCSR) - +namespace covariance +{ +namespace interface1 +{ template class Batch; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp index 1cef7b799e2..6ae082bcc4e 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp @@ -28,5 +28,13 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::sumCSR) -} + +namespace covariance +{ +namespace interface1 +{ +template class Online; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp index 811d446e54e..b414389a03e 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp @@ -29,7 +29,12 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::defaultDense) -template class Batch; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp index 06752e02b2d..f50222dcfd4 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp @@ -28,5 +28,12 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::defaultDense) -} +namespace covariance +{ +namespace interface1 +{ +template class Online; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp index d1aa2feafcd..1af0785ba16 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp @@ -28,8 +28,12 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::singlePassDense) - +namespace covariance +{ +namespace interface1 +{ template class Batch; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp index f5fac1f52a8..45dd51dc064 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp @@ -28,8 +28,12 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::singlePassDense) - +namespace covariance +{ +namespace interface1 +{ template class Online; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp index f5cd288e606..2226c9a9dea 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp @@ -29,7 +29,12 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::sumDense) +namespace covariance +{ +namespace interface1 +{ template class Online; - -} +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal From af406e7ed3ac05f72725931903f4752f5badd392 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 07:41:57 +0100 Subject: [PATCH 080/126] Update algorithm_container_base_batch.h --- .../include/algorithms/algorithm_container_base_batch.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/algorithm_container_base_batch.h b/cpp/daal/include/algorithms/algorithm_container_base_batch.h index d513ef49a57..37ea31fca3d 100644 --- a/cpp/daal/include/algorithms/algorithm_container_base_batch.h +++ b/cpp/daal/include/algorithms/algorithm_container_base_batch.h @@ -27,6 +27,7 @@ #include "services/daal_memory.h" #include "services/internal/daal_kernel_defines.h" +#include "services/daal_defines.h namespace daal { @@ -154,14 +155,14 @@ class AlgorithmContainerImpl : public AlgorithmContainer #if defined(TARGET_X86_64) template -class AlgorithmDispatchContainer : public AlgorithmContainerImpl #elif defined(TARGET_ARM) template -class AlgorithmDispatchContainer : public AlgorithmContainerImpl +class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl #elif defined(TARGET_RISCV64) template -class AlgorithmDispatchContainer : public AlgorithmContainerImpl +class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl #endif { public: From 913eca0c7966fc2dd36dbbc56b6515635b967e24 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 08:29:28 +0100 Subject: [PATCH 081/126] Update algorithm_container_base_batch.h --- cpp/daal/include/algorithms/algorithm_container_base_batch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/algorithm_container_base_batch.h b/cpp/daal/include/algorithms/algorithm_container_base_batch.h index 37ea31fca3d..89f82762403 100644 --- a/cpp/daal/include/algorithms/algorithm_container_base_batch.h +++ b/cpp/daal/include/algorithms/algorithm_container_base_batch.h @@ -27,7 +27,7 @@ #include "services/daal_memory.h" #include "services/internal/daal_kernel_defines.h" -#include "services/daal_defines.h +#include "services/daal_defines.h" namespace daal { From 7896fb29dbf097371bd7d2469e817c4324165986 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 08:33:29 +0100 Subject: [PATCH 082/126] Update ci.yml --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c8fc3401e8..37016229361 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,23 @@ jobs: with: name: oneDAL_env path: .ci/env - + - name: daal/cpp examples + run: | + source /opt/intel/oneapi/setvars.sh + .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface daal/cpp --build-system cmake + - name: oneapi/cpp examples + run: | + source /opt/intel/oneapi/setvars.sh + .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/cpp --build-system cmake + - name: oneapi/dpc examples + run: | + source /opt/intel/oneapi/setvars.sh + .ci/scripts/test.sh --test-kind examples --build-dir __release_lnx --compiler icx --interface oneapi/dpc --build-system cmake + - name: daal/cpp/mpi examples + run: | + source /opt/intel/oneapi/setvars.sh + .ci/scripts/test.sh --test-kind samples --build-dir __release_lnx --compiler gnu --interface daal/cpp/mpi --conda-env ci-env --build-system cmake + LinuxABICheck: name: ABI Conformance needs: LinuxMakeDPCPP From 75cfc7d709c8fe7e9248da7b0a52b22c80aa0779 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 09:24:56 +0100 Subject: [PATCH 083/126] Update uniform_dense_default_batch_fpt_dispatcher.cpp --- .../uniform_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp index 1361383046a..1b4ff4f28f8 100644 --- a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(distributions::uniform::BatchContainer, batch, DAAL_FPTYPE, distributions::uniform::defaultDense) +namespace distributions +{ +namespace uniform +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace uniform +} // namespace distributions } // namespace algorithms } // namespace daal From 1822cfdbe99dc91f66a197d9da6c163e974c066a Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 09:26:09 +0100 Subject: [PATCH 084/126] Update normal_dense_default_batch_fpt_dispatcher.cpp --- .../normal_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp index e646f30b72d..086a3a75045 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(distributions::normal::BatchContainer, batch, DAAL_FPTYPE, distributions::normal::defaultDense) +namespace distributions +{ +namespace normal +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace uniform +} // namespace distributions } // namespace algorithms } // namespace daal From 81a1cd87f900594fc122d2a111a89f2d0b9a8283 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 09:27:38 +0100 Subject: [PATCH 085/126] Update bernoulli_dense_default_batch_fpt_dispatcher.cpp --- .../bernoulli_dense_default_batch_fpt_dispatcher.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp index cb773e6a467..4df395dec39 100644 --- a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,16 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(distributions::bernoulli::BatchContainer, batch, DAAL_FPTYPE, distributions::bernoulli::defaultDense) +} +namespace distributions +{ +namespace bernoulli +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace bernoulli +} // namespace distributions } // namespace algorithms } // namespace daal From c05190631747a2539878cc0e94fbe761cbacb69b Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Sat, 22 Feb 2025 12:36:47 +0100 Subject: [PATCH 086/126] Update bernoulli_dense_default_batch_fpt_dispatcher.cpp --- .../bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp index 4df395dec39..2f4eb833626 100644 --- a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp @@ -26,7 +26,7 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(distributions::bernoulli::BatchContainer, batch, DAAL_FPTYPE, distributions::bernoulli::defaultDense) -} + namespace distributions { namespace bernoulli From 1e19229914f365a02f307f567a5ce6a7f2a04a81 Mon Sep 17 00:00:00 2001 From: "Faust, Ian" Date: Sat, 22 Feb 2025 23:27:32 +0100 Subject: [PATCH 087/126] fix engines --- .../mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ .../mrg32k3a_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ .../mt19937_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ .../mt2203_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ ...hilox4x32x10_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++++++ 5 files changed, 50 insertions(+) diff --git a/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp index 36fc320a158..a814f4a54bf 100644 --- a/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(engines::mcg59::BatchContainer, batch, DAAL_FPTYPE, engines::mcg59::defaultDense) +namespace engines +{ +namespace mcg59 +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace mcg59 +} // namespace engines } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp index fd78108df73..fa65f95258c 100644 --- a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(engines::mrg32k3a::BatchContainer, batch, DAAL_FPTYPE, engines::mrg32k3a::defaultDense) +namespace engines +{ +namespace mrg32k3a +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace mrg32k3a +} // namespace engines } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp index 45f9972f92d..53d42b40582 100644 --- a/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(engines::mt19937::BatchContainer, batch, DAAL_FPTYPE, engines::mt19937::defaultDense) +namespace engines +{ +namespace mt19937 +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace mt19937 +} // namespace engines } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp index 285e7f386b9..47d21422d35 100644 --- a/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(engines::mt2203::BatchContainer, batch, DAAL_FPTYPE, engines::mt2203::defaultDense) +namespace engines +{ +namespace mt2203 +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace mt2203 +} // namespace engines } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp index 1640fc4ec12..8ee403673a6 100644 --- a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(engines::philox4x32x10::BatchContainer, batch, DAAL_FPTYPE, engines::philox4x32x10::defaultDense) +namespace engines +{ +namespace philox4x32x10 +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace philox4x32x10 +} // namespace engines } // namespace algorithms } // namespace daal From 584b9b5ada029cd2f9ab6ceb70fb27098da11067 Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 13:51:54 -0800 Subject: [PATCH 088/126] intermediate save --- .../algorithms/association_rules/apriori.h | 13 ++++------ .../include/algorithms/cholesky/cholesky.h | 4 ++-- .../binary_confusion_matrix_batch.h | 4 ++-- .../multiclass_confusion_matrix_batch.h | 4 ++-- .../algorithms/covariance/covariance_batch.h | 4 ++-- .../decision_tree_classification_predict.h | 7 ++---- ...ision_tree_classification_training_batch.h | 7 ++---- .../decision_tree_regression_predict.h | 8 ++----- .../decision_tree_regression_training_batch.h | 8 ++----- .../distance/correlation_distance.h | 4 ++-- .../algorithms/distance/cosine_distance.h | 4 ++-- .../distributions/bernoulli/bernoulli.h | 5 ++-- .../algorithms/distributions/normal/normal.h | 4 ++-- .../distributions/uniform/uniform.h | 4 ++-- ...ain_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...soc_rules_apriori_batch_fpt_dispatcher.cpp | 6 +++++ ...sky_dense_default_batch_fpt_dispatcher.cpp | 18 ++++++++++++-- ...rix_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++- ...rix_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++- ...nce_dense_default_batch_fpt_dispatcher.cpp | 13 ++++++++++ ...nce_dense_default_batch_fpt_dispatcher.cpp | 14 +++++++++++ ...variance_csr_fast_batch_fpt_dispatcher.cpp | 6 +++++ ...ce_csr_singlepass_batch_fpt_dispatcher.cpp | 6 +++++ ...ovariance_csr_sum_batch_fpt_dispatcher.cpp | 6 +++++ ...nce_dense_default_batch_fpt_dispatcher.cpp | 6 +++++ ..._dense_singlepass_batch_fpt_dispatcher.cpp | 6 +++++ ...ariance_dense_sum_batch_fpt_dispatcher.cpp | 15 +++++++++++- ...ict_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++- ...ain_dense_default_batch_fpt_dispatcher.cpp | 21 ++++++++++++++++ ...ict_dense_default_batch_fpt_dispatcher.cpp | 24 ++++++++++++++++++- ...ain_dense_default_batch_fpt_dispatcher.cpp | 22 +++++++++++++++++ ...lli_dense_default_batch_fpt_dispatcher.cpp | 6 +++++ ...mal_dense_default_batch_fpt_dispatcher.cpp | 6 +++++ ...orm_dense_default_batch_fpt_dispatcher.cpp | 6 +++++ ...ict_dense_default_batch_fpt_dispatcher.cpp | 6 ++--- ...ain_dense_default_batch_fpt_dispatcher.cpp | 6 ++--- makefile | 2 +- 37 files changed, 279 insertions(+), 66 deletions(-) diff --git a/cpp/daal/include/algorithms/association_rules/apriori.h b/cpp/daal/include/algorithms/association_rules/apriori.h index ce4d727f5c4..e4ec702e886 100644 --- a/cpp/daal/include/algorithms/association_rules/apriori.h +++ b/cpp/daal/include/algorithms/association_rules/apriori.h @@ -90,7 +90,8 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::association_rules::Result ResultType; /** Default constructor */ - Batch() { initialize(); } + // defined elsewhere in order to prevent implicit instantation of AlgorithmBatchContainer + Batch(); /** * Constructs an association rules algorithm by copying input objects and parameters @@ -98,7 +99,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm @@ -141,13 +142,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis return s; } - void initialize() - { - Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env); - _in = &input; - _par = ¶meter; - _result.reset(new ResultType()); - } + void initialize(); public: InputType input; /*!< %Input data structure */ diff --git a/cpp/daal/include/algorithms/cholesky/cholesky.h b/cpp/daal/include/algorithms/cholesky/cholesky.h index be86d11c740..a579ebe9e37 100644 --- a/cpp/daal/include/algorithms/cholesky/cholesky.h +++ b/cpp/daal/include/algorithms/cholesky/cholesky.h @@ -89,7 +89,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::cholesky::Result ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a Cholesky decomposition algorithm by copying input objects @@ -97,7 +97,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input) { initialize(); } + Batch(const Batch & other); /** Destructor */ virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/classifier/binary_confusion_matrix_batch.h b/cpp/daal/include/algorithms/classifier/binary_confusion_matrix_batch.h index 3608f08fabe..0cdaac20c2e 100644 --- a/cpp/daal/include/algorithms/classifier/binary_confusion_matrix_batch.h +++ b/cpp/daal/include/algorithms/classifier/binary_confusion_matrix_batch.h @@ -94,7 +94,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch ParameterType parameter; /*!< Parameters of the algorithm */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a confusion matrix algorithm by copying input objects and parameters @@ -102,7 +102,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/classifier/multiclass_confusion_matrix_batch.h b/cpp/daal/include/algorithms/classifier/multiclass_confusion_matrix_batch.h index 1feee88b334..9260b166398 100644 --- a/cpp/daal/include/algorithms/classifier/multiclass_confusion_matrix_batch.h +++ b/cpp/daal/include/algorithms/classifier/multiclass_confusion_matrix_batch.h @@ -97,7 +97,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch * Default constructor * \param[in] nClasses Number of classes */ - Batch(size_t nClasses = 2) : parameter(nClasses) { initialize(); } + Batch(size_t nClasses = 2); /** * Constructs a confusion matrix algorithm by copying input objects and parameters @@ -105,7 +105,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/covariance/covariance_batch.h b/cpp/daal/include/algorithms/covariance/covariance_batch.h index abec1e12ae4..399916bee86 100644 --- a/cpp/daal/include/algorithms/covariance/covariance_batch.h +++ b/cpp/daal/include/algorithms/covariance/covariance_batch.h @@ -358,7 +358,7 @@ class DAAL_EXPORT Batch : public BatchImpl typedef typename super::ResultType ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm for correlation or variance-covariance matrix computation @@ -367,7 +367,7 @@ class DAAL_EXPORT Batch : public BatchImpl * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : BatchImpl(other) { initialize(); } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h b/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h index 7af7abd03a4..d64c1169102 100644 --- a/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h +++ b/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h @@ -100,7 +100,7 @@ class Batch : public classifier::prediction::Batch ParameterType parameter; /*!< \ref interface1::Parameter "Parameters" of prediction */ /** Default constructor */ - Batch(size_t nClasses = 2) : classifier::prediction::Batch(), input(), parameter(nClasses) { initialize(); } + Batch(size_t nClasses = 2); /** * Constructs a Decision tree prediction algorithm by copying input objects and parameters @@ -108,10 +108,7 @@ class Batch : public classifier::prediction::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); /** * Get input objects for the Decision tree prediction algorithm diff --git a/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_training_batch.h b/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_training_batch.h index c93a74ad598..3c393a4a836 100644 --- a/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_training_batch.h +++ b/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_training_batch.h @@ -99,17 +99,14 @@ class DAAL_EXPORT Batch : public classifier::training::Batch ParameterType parameter; /*!< \ref interface1::Parameter "Parameters" of the algorithm */ /** Default constructor */ - Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + Batch(size_t nClasses); /** * Constructs a Decision tree training algorithm by copying input objects * and parameters of another Decision tree training algorithm in the batch processing mode * \param[in] other Algorithm to use as the source to initialize the input objects and parameters of the algorithm */ - Batch(const Batch & other) : classifier::training::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); /** * Get input objects for the Decision tree training algorithm diff --git a/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h b/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h index e3c1368da89..efdd6854669 100644 --- a/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h +++ b/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h @@ -98,7 +98,7 @@ class Batch : public algorithms::regression::prediction::Batch ParameterType parameter; /*!< \ref interface1::Parameter "Parameters" of prediction */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a Decision tree prediction algorithm by copying input objects and parameters @@ -106,11 +106,7 @@ class Batch : public algorithms::regression::prediction::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) - : algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); virtual algorithms::regression::prediction::Input * getInput() DAAL_C11_OVERRIDE { return &input; } diff --git a/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_training_batch.h b/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_training_batch.h index d8a4899ed70..4cf9f1f81d9 100644 --- a/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_training_batch.h +++ b/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_training_batch.h @@ -99,18 +99,14 @@ class DAAL_EXPORT Batch : public algorithms::regression::training::Batch ParameterType parameter; /*!< \ref interface1::Parameter "Parameters" of the algorithm */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a Decision tree training algorithm by copying input objects * and parameters of another Decision tree training algorithm in the batch processing mode * \param[in] other Algorithm to use as the source to initialize the input objects and parameters of the algorithm */ - Batch(const Batch & other) - : algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); virtual algorithms::regression::training::Input * getInput() DAAL_C11_OVERRIDE { return &input; } diff --git a/cpp/daal/include/algorithms/distance/correlation_distance.h b/cpp/daal/include/algorithms/distance/correlation_distance.h index 9ea7a3c8ba4..680ef56a0cc 100644 --- a/cpp/daal/include/algorithms/distance/correlation_distance.h +++ b/cpp/daal/include/algorithms/distance/correlation_distance.h @@ -93,7 +93,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::correlation_distance::Input InputType; typedef algorithms::correlation_distance::Result ResultType; - Batch() { initialize(); } + Batch(); /** * Constructs a correlation distance algorithm by copying input objects @@ -101,7 +101,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/distance/cosine_distance.h b/cpp/daal/include/algorithms/distance/cosine_distance.h index 165e9f3ed50..369d01770f6 100644 --- a/cpp/daal/include/algorithms/distance/cosine_distance.h +++ b/cpp/daal/include/algorithms/distance/cosine_distance.h @@ -93,7 +93,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::cosine_distance::Input InputType; typedef algorithms::cosine_distance::Result ResultType; - Batch() { initialize(); } + Batch(); /** * Constructs a cosine distance algorithm by copying input objects @@ -101,7 +101,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h b/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h index 54a8e196b1d..43aab1b1590 100644 --- a/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h +++ b/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h @@ -99,14 +99,13 @@ class DAAL_EXPORT Batch : public distributions::BatchBase * Constructs bernoulli distribution * \param[in] p Success probability of a trial, value from [0.0; 1.0] */ - Batch(algorithmFPType p) : parameter(p) { initialize(); } + Batch(algorithmFPType p); /** * Constructs bernoulli distribution by copying input objects and parameters of another bernoulli distribution * \param[in] other Bernoulli distribution */ - Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } - + Batch(const Batch & other); /** * Returns method of the distribution * \return Method of the distribution diff --git a/cpp/daal/include/algorithms/distributions/normal/normal.h b/cpp/daal/include/algorithms/distributions/normal/normal.h index 162a272c4f9..698a604ad2a 100644 --- a/cpp/daal/include/algorithms/distributions/normal/normal.h +++ b/cpp/daal/include/algorithms/distributions/normal/normal.h @@ -100,13 +100,13 @@ class DAAL_EXPORT Batch : public distributions::BatchBase * \param[in] a Mean * \param[in] sigma standard deviation */ - Batch(algorithmFPType a = 0.0, algorithmFPType sigma = 1.0) : parameter(a, sigma) { initialize(); } + Batch(algorithmFPType a = 0.0, algorithmFPType sigma = 1.0); /** * Constructs normal distribution by copying input objects and parameters of another normal distribution * \param[in] other Normal distribution */ - Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the distribution diff --git a/cpp/daal/include/algorithms/distributions/uniform/uniform.h b/cpp/daal/include/algorithms/distributions/uniform/uniform.h index 0cf9fc474c4..71eeca8ad30 100644 --- a/cpp/daal/include/algorithms/distributions/uniform/uniform.h +++ b/cpp/daal/include/algorithms/distributions/uniform/uniform.h @@ -100,13 +100,13 @@ class DAAL_EXPORT Batch : public distributions::BatchBase * \param[in] a Left bound a * \param[in] b Right bound b */ - Batch(algorithmFPType a = 0.0, algorithmFPType b = 1.0) : parameter(a, b) { initialize(); } + Batch(algorithmFPType a = 0.0, algorithmFPType b = 1.0); /** * Constructs uniform distribution by copying input objects and parameters of another uniform distribution * \param[in] other Uniform distribution */ - Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the distribution diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index 00bc6dba4e4..417676c3c89 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -39,14 +39,14 @@ namespace training namespace interface2 { template -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); } template -Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) +DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp index cf8723241d3..5692a8fab00 100644 --- a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp @@ -34,6 +34,12 @@ namespace association_rules { namespace interface1 { +template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + template class Batch; } // namespace interface1 } // namespace association_rules diff --git a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp index 0edd9bae723..6f02464bd9e 100644 --- a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,19 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(cholesky::BatchContainer, batch, DAAL_FPTYPE, cholesky::defaultDense) -} -} // namespace daal + +namespace cholesky +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) { initialize(); } + +template class Batch; +} // namespace interface1 +} // namespace cholesky +} // namespace algorithms +} // namespace daal \ No newline at end of file diff --git a/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp index 72bcefbf7dc..7925edf009f 100644 --- a/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,25 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(classifier::quality_metric::binary_confusion_matrix::BatchContainer, batch, DAAL_FPTYPE, classifier::quality_metric::binary_confusion_matrix::defaultDense) -} +namespace classifier +{ +namespace quality_metric +{ +namespace binary_confusion_matrix +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + +template class Batch; +} // namespace interface1 +} // namespace binary_confusion_matrix +} // namespace quality_metric +} // namespace classifier +} // namespace algorithms } // namespace daal + diff --git a/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp index dc19984c62f..17e9cb98a5b 100644 --- a/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,25 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(classifier::quality_metric::multiclass_confusion_matrix::BatchContainer, batch, DAAL_FPTYPE, classifier::quality_metric::multiclass_confusion_matrix::defaultDense) -} +namespace classifier +{ +namespace quality_metric +{ +namespace multiclass_confusion_matrix +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + +template class Batch; +} // namespace interface1 +} // namespace multiclass_confusion_matrix +} // namespace quality_metric +} // namespace classifier +} // namespace algorithms } // namespace daal + diff --git a/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp index 5e92b19cd16..27c78e6e855 100644 --- a/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,18 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(correlation_distance::BatchContainer, batch, DAAL_FPTYPE, correlation_distance::defaultDense) +namespace correlation_distance +{ +namespace interface1 +{ + template + DAAL_EXPORT Batch::Batch() { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) { initialize(); } + + template class Batch; +}// interface1 +} // correlation_distance } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp index 4633b0fcbbb..9300a6deb76 100644 --- a/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,19 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(cosine_distance::BatchContainer, batch, DAAL_FPTYPE, cosine_distance::defaultDense) +namespace cosine_distance +{ +namespace interface1 +{ + + template + DAAL_EXPORT Batch::Batch() { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) { initialize(); } + + template class Batch; +} // namespace interface1 +} // namespace cosine_distance } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp index c5ead00ecbe..3548c4467a9 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp @@ -33,6 +33,12 @@ namespace covariance { namespace interface1 { + template + DAAL_EXPORT Batch::Batch() { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } + template class Batch; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp index 9e127f6c857..4c449473bb5 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp @@ -32,6 +32,12 @@ namespace covariance { namespace interface1 { + template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } + template class Batch; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp index 3682d7f58d5..90ababd22a9 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp @@ -32,6 +32,12 @@ namespace covariance { namespace interface1 { + template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } + template class Batch; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp index b414389a03e..46f4c92e821 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp @@ -33,6 +33,12 @@ namespace covariance { namespace interface1 { + template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } + template class Batch; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp index 1af0785ba16..e527878426a 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp @@ -32,6 +32,12 @@ namespace covariance { namespace interface1 { + template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } + template class Batch; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp index 197c7db7fe9..232f29dde1b 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp @@ -28,5 +28,18 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::BatchContainer, batch, DAAL_FPTYPE, covariance::sumDense) -} +namespace covariance +{ +namespace interface1 +{ + template +DAAL_EXPORT Batch::Batch() { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } + +template class Batch; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp index 2e6245a66bd..4a6a30c1dda 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -30,6 +30,26 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(decision_tree::classification::prediction::BatchContainer, batch, DAAL_FPTYPE, decision_tree::classification::prediction::defaultDense) - +namespace decision_tree +{ +namespace classification +{ +namespace prediction +{ +namespace interface2 +{ + template + DAAL_EXPORT Batch::Batch(size_t nClasses) : classifier::prediction::Batch(), input(), parameter(nClasses) { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) + { + initialize(); + } + template class Batch; +} // namespace interface2 +} // namespace prediction } // namespace algorithms +} // namespace classification +} // namespace decision_tree } // namespace daal diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp index 91be7088512..3b777024ff8 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -29,6 +29,27 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(decision_tree::classification::training::BatchContainer, batch, DAAL_FPTYPE, decision_tree::classification::training::defaultDense) +namespace decision_tree +{ +namespace classification +{ +namespace training +{ +namespace interface2 +{ + template + DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input), parameter(other.parameter) + { + initialize(); + } + template class Batch; +} // namespace interface2 +} // namespace training +} // namespace classification +} // namespace decision_tree } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp index ded4f9fe3f1..5cc720252fb 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -30,6 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(decision_tree::regression::prediction::BatchContainer, batch, DAAL_FPTYPE, decision_tree::regression::prediction::defaultDense) +namespace decision_tree +{ +namespace regression +{ +namespace prediction +{ +namespace interface2 +{ + template + DAAL_EXPORT Batch::Batch() { initialize(); } + + template + DAAL_EXPORT Batch:: Batch(const Batch & other) + : algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + template class Batch; +} // namespace interface2 +} // namespace prediction +} // namespace regression +} // namespace decision_tree } // namespace algorithms -} // namespace daal +} // namespace daal \ No newline at end of file diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp index 189ab5cab5a..0b85a2d4db0 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -29,6 +29,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(decision_tree::regression::training::BatchContainer, batch, DAAL_FPTYPE, decision_tree::regression::training::defaultDense) +namespace decision_tree +{ +namespace regression +{ +namespace training +{ +namespace interface2 +{ + template + DAAL_EXPORT Batch::Batch() { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) + : algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + template class Batch; +} // namespace interface2 +} // namespace training +} // namespace regression +} // namespace decision_tree } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp index 2f4eb833626..2a327a5f022 100644 --- a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp @@ -33,6 +33,12 @@ namespace bernoulli { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(algorithmFPType p) : parameter(p) { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } + template class Batch; } // namespace interface1 } // namespace bernoulli diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp index 086a3a75045..25b2ce1ce65 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,12 @@ namespace normal { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType sigma) : parameter(a, sigma) { initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } + template class Batch; } // namespace interface1 } // namespace uniform diff --git a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp index 1b4ff4f28f8..220a1ab86a5 100644 --- a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,12 @@ namespace uniform { namespace interface1 { + template + DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType b) : parameter(a, b) { initialize(); } + + template + DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } + template class Batch; } // namespace interface1 } // namespace uniform diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp index fe4644ac4f3..1603a768c5a 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -32,21 +32,21 @@ namespace prediction namespace interface1 { template -Batch::Batch() : classifier::prediction::Batch() +DAAL_EXPORT Batch::Batch() : classifier::prediction::Batch() { _par = new ParameterType(); initialize(); } template -Batch::Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input) +DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } template -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp index 919607d081e..e83e68bf38c 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -30,21 +30,21 @@ namespace training namespace interface1 { template -Batch::Batch() : classifier::training::Batch() +DAAL_EXPORT Batch::Batch() : classifier::training::Batch() { _par = new ParameterType(); initialize(); } template -Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) +DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } template -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); diff --git a/makefile b/makefile index f73bdefb85c..af7b8ccff73 100644 --- a/makefile +++ b/makefile @@ -1003,7 +1003,7 @@ endif endif _release_c: ./deploy/pkg-config/pkg-config.tpl - python ./deploy/pkg-config/generate_pkgconfig.py --output_dir $(RELEASEDIR.pkgconfig) --template_name ./deploy/pkg-config/pkg-config.tpl + python3 ./deploy/pkg-config/generate_pkgconfig.py --output_dir $(RELEASEDIR.pkgconfig) --template_name ./deploy/pkg-config/pkg-config.tpl #----- releasing examples define .release.x From 8aeb10d5ffce0a4ae2938ebb93ee193e64aaeb8a Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 14:05:44 -0800 Subject: [PATCH 089/126] formatting --- .../algorithm_container_base_batch.h | 2 +- .../algorithms/association_rules/apriori.h | 10 ++++++-- .../distributions/bernoulli/bernoulli.h | 1 + ...soc_rules_apriori_batch_fpt_dispatcher.cpp | 14 +++++++---- ...sky_dense_default_batch_fpt_dispatcher.cpp | 14 +++++++---- ...rix_dense_default_batch_fpt_dispatcher.cpp | 15 ++++++++---- ...rix_dense_default_batch_fpt_dispatcher.cpp | 15 ++++++++---- ...nce_dense_default_batch_fpt_dispatcher.cpp | 24 ++++++++++++------- ...nce_dense_default_batch_fpt_dispatcher.cpp | 20 ++++++++++------ ...variance_csr_fast_batch_fpt_dispatcher.cpp | 18 +++++++++----- ...ce_csr_singlepass_batch_fpt_dispatcher.cpp | 14 +++++++---- ...ovariance_csr_sum_batch_fpt_dispatcher.cpp | 14 +++++++---- ...nce_dense_default_batch_fpt_dispatcher.cpp | 14 +++++++---- ..._dense_singlepass_batch_fpt_dispatcher.cpp | 14 +++++++---- ...ariance_dense_sum_batch_fpt_dispatcher.cpp | 14 +++++++---- ...ict_dense_default_batch_fpt_dispatcher.cpp | 24 +++++++++++-------- ...ain_dense_default_batch_fpt_dispatcher.cpp | 20 +++++++++------- ...ict_dense_default_batch_fpt_dispatcher.cpp | 13 ++++++---- ...ain_dense_default_batch_fpt_dispatcher.cpp | 13 ++++++---- ...lli_dense_default_batch_fpt_dispatcher.cpp | 14 +++++++---- ...mal_dense_default_batch_fpt_dispatcher.cpp | 16 +++++++++---- ...orm_dense_default_batch_fpt_dispatcher.cpp | 16 +++++++++---- 22 files changed, 214 insertions(+), 105 deletions(-) diff --git a/cpp/daal/include/algorithms/algorithm_container_base_batch.h b/cpp/daal/include/algorithms/algorithm_container_base_batch.h index 89f82762403..f080486c88e 100644 --- a/cpp/daal/include/algorithms/algorithm_container_base_batch.h +++ b/cpp/daal/include/algorithms/algorithm_container_base_batch.h @@ -156,7 +156,7 @@ class AlgorithmContainerImpl : public AlgorithmContainer template class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl + DAAL_KERNEL_AVX512_ONLY(avx512Container)> : public AlgorithmContainerImpl #elif defined(TARGET_ARM) template class DAAL_EXPORT AlgorithmDispatchContainer : public AlgorithmContainerImpl diff --git a/cpp/daal/include/algorithms/association_rules/apriori.h b/cpp/daal/include/algorithms/association_rules/apriori.h index e4ec702e886..d869320661f 100644 --- a/cpp/daal/include/algorithms/association_rules/apriori.h +++ b/cpp/daal/include/algorithms/association_rules/apriori.h @@ -99,7 +99,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other); + Batch(const Batch & other); /** * Returns method of the algorithm @@ -142,7 +142,13 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis return s; } - void initialize(); + void initialize() + { + _ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env); + _in = &input; + _par = ¶meter; + _result.reset(new ResultType()); + } public: InputType input; /*!< %Input data structure */ diff --git a/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h b/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h index 43aab1b1590..46e0e65ea24 100644 --- a/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h +++ b/cpp/daal/include/algorithms/distributions/bernoulli/bernoulli.h @@ -106,6 +106,7 @@ class DAAL_EXPORT Batch : public distributions::BatchBase * \param[in] other Bernoulli distribution */ Batch(const Batch & other); + /** * Returns method of the distribution * \return Method of the distribution diff --git a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp index 5692a8fab00..03a58ec5e6b 100644 --- a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp @@ -34,11 +34,17 @@ namespace association_rules { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp index 6f02464bd9e..df66e380445 100644 --- a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp @@ -31,11 +31,17 @@ namespace cholesky { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp index 7925edf009f..a83d7a6f7cd 100644 --- a/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp @@ -37,11 +37,17 @@ namespace binary_confusion_matrix { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} template class Batch; } // namespace interface1 @@ -50,4 +56,3 @@ template class Batch -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} template class Batch; } // namespace interface1 @@ -50,4 +56,3 @@ template class Batch - DAAL_EXPORT Batch::Batch() { initialize(); } - - template - DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) { initialize(); } - - template class Batch; -}// interface1 -} // correlation_distance +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace correlation_distance } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp index 9300a6deb76..65b2586014a 100644 --- a/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp @@ -33,13 +33,19 @@ namespace cosine_distance namespace interface1 { - template - DAAL_EXPORT Batch::Batch() { initialize(); } - - template - DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) { initialize(); } - - template class Batch; +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +{ + initialize(); +} + +template class Batch; } // namespace interface1 } // namespace cosine_distance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp index 3548c4467a9..c1ed75ff194 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp @@ -33,12 +33,18 @@ namespace covariance { namespace interface1 { - template - DAAL_EXPORT Batch::Batch() { initialize(); } - - template - DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } - +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + template class Batch; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp index 4c449473bb5..19e6e846015 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp @@ -32,11 +32,17 @@ namespace covariance { namespace interface1 { - template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp index 90ababd22a9..38500b98f6a 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp @@ -32,11 +32,17 @@ namespace covariance { namespace interface1 { - template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp index 46f4c92e821..3420b031abb 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp @@ -33,11 +33,17 @@ namespace covariance { namespace interface1 { - template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp index e527878426a..6ad35da2371 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp @@ -32,11 +32,17 @@ namespace covariance { namespace interface1 { - template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp index 232f29dde1b..414f35c6bb2 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp @@ -32,11 +32,17 @@ namespace covariance { namespace interface1 { - template -DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp index 4a6a30c1dda..d7f5127ada9 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -38,18 +38,22 @@ namespace prediction { namespace interface2 { - template - DAAL_EXPORT Batch::Batch(size_t nClasses) : classifier::prediction::Batch(), input(), parameter(nClasses) { initialize(); } - - template - DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } - template class Batch; +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : classifier::prediction::Batch(), input(), parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Batch; } // namespace interface2 } // namespace prediction -} // namespace algorithms } // namespace classification } // namespace decision_tree +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp index 3b777024ff8..ab642d04909 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -37,15 +37,19 @@ namespace training { namespace interface2 { - template - DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} - template - DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } - template class Batch; +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Batch; } // namespace interface2 } // namespace training diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp index 5cc720252fb..746affc68ad 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -38,16 +38,19 @@ namespace prediction { namespace interface2 { - template - DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} - template - DAAL_EXPORT Batch:: Batch(const Batch & other) +template +DAAL_EXPORT Batch::Batch(const Batch & other) : algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } - template class Batch; +template class Batch; } // namespace interface2 } // namespace prediction diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp index 0b85a2d4db0..e878016c303 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -37,16 +37,19 @@ namespace training { namespace interface2 { - template - DAAL_EXPORT Batch::Batch() { initialize(); } +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} - template - DAAL_EXPORT Batch::Batch(const Batch & other) +template +DAAL_EXPORT Batch::Batch(const Batch & other) : algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } - template class Batch; +template class Batch; } // namespace interface2 } // namespace training diff --git a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp index 2a327a5f022..4664f7d6468 100644 --- a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp @@ -33,11 +33,17 @@ namespace bernoulli { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(algorithmFPType p) : parameter(p) { initialize(); } +template +DAAL_EXPORT Batch::Batch(algorithmFPType p) : parameter(p) +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) +{ + initialize(); +} template class Batch; } // namespace interface1 diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp index 25b2ce1ce65..f7c94123f0f 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp @@ -32,15 +32,21 @@ namespace normal { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType sigma) : parameter(a, sigma) { initialize(); } +template +DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType sigma) : parameter(a, sigma) +{ + initialize(); +} -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) +{ + initialize(); +} template class Batch; } // namespace interface1 -} // namespace uniform +} // namespace normal } // namespace distributions } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp index 220a1ab86a5..46d5c7b7613 100644 --- a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp @@ -32,11 +32,17 @@ namespace uniform { namespace interface1 { - template - DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType b) : parameter(a, b) { initialize(); } - - template - DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) { initialize(); } +template +DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType b) : parameter(a, b) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) +{ + initialize(); +} template class Batch; } // namespace interface1 From 76097c28a7aceccc7cf6163818603ca0b5b1d85b Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 14:08:11 -0800 Subject: [PATCH 090/126] small fix --- .../cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp index df66e380445..2737decd6e6 100644 --- a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp @@ -47,4 +47,4 @@ template class Batch; } // namespace interface1 } // namespace cholesky } // namespace algorithms -} // namespace daal \ No newline at end of file +} // namespace daal From a5951404a0ffeed855b251285d4c6831cb4b63b5 Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 14:43:17 -0800 Subject: [PATCH 091/126] next batch --- cpp/daal/include/algorithms/em/em_gmm.h | 2 +- .../include/algorithms/em/em_gmm_init_batch.h | 5 ++-- .../include/algorithms/engines/mcg59/mcg59.h | 4 +-- .../algorithms/engines/mrg32k3a/mrg32k3a.h | 4 +-- .../algorithms/engines/mt19937/mt19937.h | 4 +-- .../algorithms/engines/mt2203/mt2203.h | 4 +-- .../engines/philox4x32x10/philox4x32x10.h | 4 +-- .../implicit_als_predict_ratings_batch.h | 4 +-- .../implicit_als_training_batch.h | 4 +-- .../implicit_als_training_init_batch.h | 5 ++-- ...gmm_dense_default_batch_fpt_dispatcher.cpp | 14 ++++++++++ ...nit_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++ ...g59_dense_default_batch_fpt_dispatcher.cpp | 12 +++++++++ ...k3a_dense_default_batch_fpt_dispatcher.cpp | 12 +++++++++ ...937_dense_default_batch_fpt_dispatcher.cpp | 12 +++++++++ ...203_dense_default_batch_fpt_dispatcher.cpp | 12 +++++++++ ...x10_dense_default_batch_fpt_dispatcher.cpp | 12 +++++++++ ...ngs_dense_default_batch_fpt_dispatcher.cpp | 26 +++++++++++++++++++ ...train_csr_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++ ...ain_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++ ..._init_csr_default_batch_fpt_dispatcher.cpp | 26 +++++++++++++++++++ ...nit_dense_default_batch_fpt_dispatcher.cpp | 26 +++++++++++++++++++ 22 files changed, 237 insertions(+), 21 deletions(-) diff --git a/cpp/daal/include/algorithms/em/em_gmm.h b/cpp/daal/include/algorithms/em/em_gmm.h index 734b0f6ffb9..37a3e49bb99 100644 --- a/cpp/daal/include/algorithms/em/em_gmm.h +++ b/cpp/daal/include/algorithms/em/em_gmm.h @@ -97,7 +97,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/em/em_gmm_init_batch.h b/cpp/daal/include/algorithms/em/em_gmm_init_batch.h index bdfe766c50e..b74dfa5eeae 100644 --- a/cpp/daal/include/algorithms/em/em_gmm_init_batch.h +++ b/cpp/daal/include/algorithms/em/em_gmm_init_batch.h @@ -85,7 +85,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::em_gmm::init::Parameter ParameterType; typedef algorithms::em_gmm::init::Result ResultType; - Batch(const size_t nComponents) : parameter(nComponents) { initialize(); } + Batch(const size_t nComponents); /** * Constructs an algorithm that computes initial values for the EM for GMM algorithm by copying input objects @@ -93,8 +93,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } - + Batch(const Batch & other); /** * Returns the method of the algorithm * \return Method of the algorithm diff --git a/cpp/daal/include/algorithms/engines/mcg59/mcg59.h b/cpp/daal/include/algorithms/engines/mcg59/mcg59.h index 11a63ac64a4..2150eb8d5f7 100644 --- a/cpp/daal/include/algorithms/engines/mcg59/mcg59.h +++ b/cpp/daal/include/algorithms/engines/mcg59/mcg59.h @@ -148,9 +148,9 @@ class DAAL_EXPORT Batch : public engines::BatchBase } protected: - Batch(size_t seed = 777) { initialize(); } + Batch(size_t seed = 777); - Batch(const Batch & other) : super(other) { initialize(); } + Batch(const Batch & other); virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE { return new Batch(*this); } diff --git a/cpp/daal/include/algorithms/engines/mrg32k3a/mrg32k3a.h b/cpp/daal/include/algorithms/engines/mrg32k3a/mrg32k3a.h index a70c1853e1a..9808adf6106 100644 --- a/cpp/daal/include/algorithms/engines/mrg32k3a/mrg32k3a.h +++ b/cpp/daal/include/algorithms/engines/mrg32k3a/mrg32k3a.h @@ -149,9 +149,9 @@ class DAAL_EXPORT Batch : public engines::BatchBase } protected: - Batch(size_t seed = 777) { initialize(); } + Batch(size_t seed = 777); - Batch(const Batch & other) : super(other) { initialize(); } + Batch(const Batch & other); virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE { return new Batch(*this); } diff --git a/cpp/daal/include/algorithms/engines/mt19937/mt19937.h b/cpp/daal/include/algorithms/engines/mt19937/mt19937.h index 04c2e87387e..adbb15cdd0b 100644 --- a/cpp/daal/include/algorithms/engines/mt19937/mt19937.h +++ b/cpp/daal/include/algorithms/engines/mt19937/mt19937.h @@ -148,9 +148,9 @@ class DAAL_EXPORT Batch : public engines::BatchBase } protected: - Batch(size_t seed = 777) { initialize(); } + Batch(size_t seed = 777); - Batch(const Batch & other) : super(other) { initialize(); } + Batch(const Batch & other); virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE { return new Batch(*this); } diff --git a/cpp/daal/include/algorithms/engines/mt2203/mt2203.h b/cpp/daal/include/algorithms/engines/mt2203/mt2203.h index 41dc77ee519..cee304b7418 100644 --- a/cpp/daal/include/algorithms/engines/mt2203/mt2203.h +++ b/cpp/daal/include/algorithms/engines/mt2203/mt2203.h @@ -149,9 +149,9 @@ class DAAL_EXPORT Batch : public engines::FamilyBatchBase } protected: - Batch(size_t seed = 777) : super() { initialize(); } + Batch(size_t seed = 777); - Batch(const Batch & other) : super(other) { initialize(); } + Batch(const Batch & other); virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE { return new Batch(*this); } diff --git a/cpp/daal/include/algorithms/engines/philox4x32x10/philox4x32x10.h b/cpp/daal/include/algorithms/engines/philox4x32x10/philox4x32x10.h index 3a5d0e33180..78d51012d67 100644 --- a/cpp/daal/include/algorithms/engines/philox4x32x10/philox4x32x10.h +++ b/cpp/daal/include/algorithms/engines/philox4x32x10/philox4x32x10.h @@ -149,9 +149,9 @@ class DAAL_EXPORT Batch : public engines::BatchBase } protected: - Batch(size_t seed = 777) { initialize(); } + Batch(size_t seed = 777); - Batch(const Batch & other) : super(other) { initialize(); } + Batch(const Batch & other); virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE { return new Batch(*this); } diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h index 13a8f8fc27d..298b9ab7d63 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h @@ -96,7 +96,7 @@ class Batch : public daal::algorithms::Prediction /** * Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an implicit ALS ratings prediction algorithm by copying input objects and parameters @@ -104,7 +104,7 @@ class Batch : public daal::algorithms::Prediction * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_batch.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_batch.h index af370c53f15..405dd7167f7 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_batch.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_batch.h @@ -89,7 +89,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Training ParameterType parameter; /*!< %Algorithm \ref implicit_als::interface1::Parameter "parameter" */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an implicit ALS training algorithm by copying input objects and parameters @@ -97,7 +97,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Training * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_batch.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_batch.h index ef4374d9f95..be387c9e102 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_batch.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_training_init_batch.h @@ -91,7 +91,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Training ParameterType parameter; /*!< %Algorithm parameter */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm for initializing the implicit ALS model by copying input objects and parameters @@ -99,8 +99,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Training * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } - + Batch(const Batch & other); /** * Returns the method of the algorithm * \return Method of the algorithm diff --git a/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp index 35c77ec196a..8c7bcb55910 100644 --- a/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,19 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(em_gmm::BatchContainer, batch, DAAL_FPTYPE, em_gmm::defaultDense) +namespace em_gmm +{ +namespace interface1 +{ + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace em_gmm } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp index 873f2cf43b8..f76ecf12ae0 100644 --- a/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(em_gmm::init::BatchContainer, batch, DAAL_FPTYPE, em_gmm::init::defaultDense) +namespace em_gmm +{ +namespace init +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch(const size_t nComponents) : parameter(nComponents) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace init +} // namespace em_gmm } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp index a814f4a54bf..5596db836a8 100644 --- a/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace mcg59 { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(size_t seed) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +{ + initialize(); +} + template class Batch; } // namespace interface1 } // namespace mcg59 diff --git a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp index fa65f95258c..4c624804103 100644 --- a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace mrg32k3a { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(size_t seed) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +{ + initialize(); +} + template class Batch; } // namespace interface1 } // namespace mrg32k3a diff --git a/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp index 53d42b40582..ca3ae66b654 100644 --- a/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace mt19937 { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(size_t seed) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +{ + initialize(); +} + template class Batch; } // namespace interface1 } // namespace mt19937 diff --git a/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp index 47d21422d35..a51360af4a5 100644 --- a/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace mt2203 { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(size_t seed) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +{ + initialize(); +} + template class Batch; } // namespace interface1 } // namespace mt2203 diff --git a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp index 8ee403673a6..4d390ac063b 100644 --- a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace philox4x32x10 { namespace interface1 { +template +DAAL_EXPORT Batch::Batch(size_t seed = 777) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +{ + initialize(); +} + template class Batch; } // namespace interface1 } // namespace philox4x32x10 diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp index 1fc84366c08..5ab5cc04f3c 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp @@ -30,5 +30,31 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::prediction::ratings::BatchContainer, batch, DAAL_FPTYPE, implicit_als::prediction::ratings::defaultDense) + +namespace implicit_als +{ +namespace prediction +{ +namespace ratings +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace ratings +} // namespace prediction +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp index 64e9397c073..1f0c2ed7489 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::BatchContainer, batch, DAAL_FPTYPE, implicit_als::training::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp index 0b710ba2251..37e5c105c63 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::BatchContainer, batch, DAAL_FPTYPE, implicit_als::training::defaultDense) +namespace implicit_als +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp index 18a4be02c4f..2ab1d6b91be 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,31 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::init::BatchContainer, batch, DAAL_FPTYPE, implicit_als::training::init::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace init +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; + +} // namespace interface1 +} // namespace init +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp index 6eaa0dda7a8..e21e74cfe9f 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,31 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::init::BatchContainer, batch, DAAL_FPTYPE, implicit_als::training::init::defaultDense) +namespace implicit_als +{ +namespace training +{ +namespace init +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; + +} // namespace interface1 +} // namespace init +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal From cdda24338f1aa67016a04fa87105fdb032c1f208 Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 14:46:00 -0800 Subject: [PATCH 092/126] missing newline --- ...ee_regression_predict_dense_default_batch_fpt_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp index 746affc68ad..76334371733 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -57,4 +57,4 @@ template class Batch Date: Sun, 23 Feb 2025 15:24:58 -0800 Subject: [PATCH 093/126] fix philox --- .../kdtree_knn_classification_predict.h | 13 ++------ ...kdtree_knn_classification_training_batch.h | 13 ++------ ...x10_dense_default_batch_fpt_dispatcher.cpp | 2 +- ...ict_dense_default_batch_fpt_dispatcher.cpp | 30 ++++++++++++++++++ ...ain_dense_default_batch_fpt_dispatcher.cpp | 31 +++++++++++++++++++ 5 files changed, 68 insertions(+), 21 deletions(-) diff --git a/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h b/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h index df6b9c53b58..279993d8bbc 100644 --- a/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h +++ b/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h @@ -98,7 +98,7 @@ class Batch : public classifier::prediction::Batch ParameterType parameter; /*!< \ref kdtree_knn_classification::interface3::Parameter "Parameters" of prediction */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a KD-tree based kNN prediction algorithm by copying input objects and parameters @@ -106,20 +106,13 @@ class Batch : public classifier::prediction::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); /** * Constructs a KD-tree based kNN prediction algorithm with nClasses parameter * \param[in] nClasses number of classes */ - Batch(size_t nClasses) - { - parameter.nClasses = nClasses; - initialize(); - } + Batch(size_t nClasses); /** * Get input objects for the KD-tree based kNN prediction algorithm diff --git a/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_training_batch.h b/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_training_batch.h index 7b91f93ef26..b4298f7d663 100644 --- a/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_training_batch.h +++ b/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_training_batch.h @@ -97,7 +97,7 @@ class DAAL_EXPORT Batch : public classifier::training::Batch InputType input; /*!< %Input objects of the algorithm */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a KD-tree based kNN training algorithm by copying input objects @@ -105,20 +105,13 @@ class DAAL_EXPORT Batch : public classifier::training::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::training::Batch(other), parameter(other.parameter), input(other.input) - { - initialize(); - } + Batch(const Batch & other); /** * Constructs a KD-tree based kNN training algorithm with nClasses parameter * \param[in] nClasses number of classes */ - Batch(size_t nClasses) - { - parameter.nClasses = nClasses; - initialize(); - } + Batch(size_t nClasses); /** * Get input objects for KD-tree based kNN model-based training algorithm diff --git a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp index 4d390ac063b..d3d73376bfb 100644 --- a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp @@ -33,7 +33,7 @@ namespace philox4x32x10 namespace interface1 { template -DAAL_EXPORT Batch::Batch(size_t seed = 777) +DAAL_EXPORT Batch::Batch(size_t seed) { initialize(); } diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp index 5c2778e2632..dbbdc38bb35 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -31,5 +31,35 @@ namespace algorithms __DAAL_INSTANTIATE_DISPATCH_CONTAINER(kdtree_knn_classification::prediction::BatchContainer, batch, DAAL_FPTYPE, kdtree_knn_classification::prediction::defaultDense) +namespace kdtree_knn_classification +{ +namespace prediction +{ +namespace interface3 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) +{ + parameter.nClasses = nClasses; + initialize(); +} + +template class Batch; + +} // namespace interface3 +} // namespace prediction +} // namespace kdtree_knn_classification } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp index 167ecd6ce38..00983ecbfd9 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,36 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(kdtree_knn_classification::training::BatchContainer, batch, DAAL_FPTYPE, kdtree_knn_classification::training::defaultDense) +namespace kdtree_knn_classification +{ +namespace training +{ +namespace interface3 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) +{ + parameter.nClasses = nClasses; + initialize(); +} + +template class Batch; + +} // namespace interface3 +} // namespace training +} // namespace kdtree_knn_classification } // namespace algorithms } // namespace daal From 4ecaf7fbc4fe96d59dfe1c2eab1c827366e81908 Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 15:58:58 -0800 Subject: [PATCH 094/126] full covariance fixes --- .../covariance/covariance_distributed.h | 4 ++-- .../algorithms/covariance/covariance_online.h | 4 ++-- ...ce_csr_fast_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++ ...ariance_csr_fast_online_fpt_dispatcher.cpp | 14 +++++++++++- ..._singlepass_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++ ...e_csr_singlepass_online_fpt_dispatcher.cpp | 19 ++++++++++++++++ ...nce_csr_sum_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++ ...variance_csr_sum_online_fpt_dispatcher.cpp | 12 ++++++++++ ...nse_default_distr_step2_fpt_dispatcher.cpp | 22 ++++++++++++++++++- ...ce_dense_default_online_fpt_dispatcher.cpp | 12 ++++++++++ ..._singlepass_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++ ...dense_singlepass_online_fpt_dispatcher.cpp | 12 ++++++++++ ...e_dense_sum_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++ ...riance_dense_sum_online_fpt_dispatcher.cpp | 12 ++++++++++ 14 files changed, 205 insertions(+), 6 deletions(-) diff --git a/cpp/daal/include/algorithms/covariance/covariance_distributed.h b/cpp/daal/include/algorithms/covariance/covariance_distributed.h index 718b7cac6bc..8ed207a5df5 100644 --- a/cpp/daal/include/algorithms/covariance/covariance_distributed.h +++ b/cpp/daal/include/algorithms/covariance/covariance_distributed.h @@ -626,7 +626,7 @@ class Distributed : public DistributedIfac typedef typename super::PartialResultType PartialResultType; /** Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs an algorithm for correlation or variance-covariance matrix computation @@ -635,7 +635,7 @@ class Distributed : public DistributedIfac * \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) : DistributedIface(other) { initialize(); } + Distributed(const Distributed & other); virtual ~Distributed() {} diff --git a/cpp/daal/include/algorithms/covariance/covariance_online.h b/cpp/daal/include/algorithms/covariance/covariance_online.h index 0936c8b8f26..42b57414a08 100644 --- a/cpp/daal/include/algorithms/covariance/covariance_online.h +++ b/cpp/daal/include/algorithms/covariance/covariance_online.h @@ -410,7 +410,7 @@ class DAAL_EXPORT Online : public OnlineImpl typedef typename super::PartialResultType PartialResultType; /** Default constructor */ - Online() { initialize(); } + Online(); /** * Constructs an algorithm for correlation or variance-covariance matrix computation @@ -419,7 +419,7 @@ class DAAL_EXPORT Online : public OnlineImpl * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : OnlineImpl(other) { initialize(); } + Online(const Online & other); virtual ~Online() {} diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp index 2d63ea6e446..ce3008af5dd 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, covariance::fastCSR) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Distributed::Distributed() +{ + initialize(); } + +template +DAAL_EXPORT Distributed::Distributed(const Distributed & other) + : DistributedIface(other) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp index 02aa89380f0..00c8c200a38 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp @@ -17,7 +17,7 @@ /* //++ -// Instantiation of batch covariance calculation algorithm container. +// Instantiation of online covariance calculation algorithm container. //-- */ @@ -32,6 +32,18 @@ namespace covariance { namespace interface1 { +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +{ + initialize(); +} + template class Online; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp index 7ec6c05a1a9..5005232368f 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, covariance::singlePassCSR) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Distributed::Distributed() +{ + initialize(); } + +template +DAAL_EXPORT Distributed::Distributed(const Distributed & other) + : DistributedIface(other) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp index d658e5ec75c..01f73032980 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::OnlineContainer, online, DAAL_FPTYPE, covariance::singlePassCSR) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp index cf0b99f0916..ac5dd62c639 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, covariance::sumCSR) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Distributed::Distributed() +{ + initialize(); } + +template +DAAL_EXPORT Distributed::Distributed(const Distributed & other) + : DistributedIface(other) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp index 6ae082bcc4e..a52149376cf 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp @@ -33,6 +33,18 @@ namespace covariance { namespace interface1 { +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +{ + initialize(); +} + template class Online; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp index 2bf7979d4d6..1bda0067781 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, covariance::defaultDense) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Distributed::Distributed() +{ + initialize(); } -} // namespace daal + +template +DAAL_EXPORT Distributed::Distributed(const Distributed & other) + : DistributedIface(other) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms +} // namespace daal \ No newline at end of file diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp index f50222dcfd4..738330abe61 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace covariance { namespace interface1 { +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +{ + initialize(); +} + template class Online; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp index 50170405c69..85fa3196d42 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, covariance::singlePassDense) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Distributed::Distributed() +{ + initialize(); } + +template +DAAL_EXPORT Distributed::Distributed(const Distributed & other) + : DistributedIface(other) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp index 45dd51dc064..5e39dedee43 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp @@ -32,6 +32,18 @@ namespace covariance { namespace interface1 { +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +{ + initialize(); +} + template class Online; } // namespace interface1 } // namespace covariance diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp index 1ac99c8227b..97bf63e936b 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(covariance::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, covariance::sumDense) +namespace covariance +{ +namespace interface1 +{ +template +DAAL_EXPORT Distributed::Distributed() +{ + initialize(); } + +template +DAAL_EXPORT Distributed::Distributed(const Distributed & other) + : DistributedIface(other) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace covariance +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp index 2226c9a9dea..0919e7f8f38 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp @@ -33,6 +33,18 @@ namespace covariance { namespace interface1 { +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +{ + initialize(); +} + template class Online; } // namespace interface1 } // namespace covariance From 738f65babd724c10e6d45b8d29a7aecf5d6d0a19 Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 16:28:16 -0800 Subject: [PATCH 095/126] first attempt at linear --- .../decision_forest_regression_predict.h | 4 +-- .../linear_model/linear_model_predict.h | 2 +- ...ict_dense_default_batch_fpt_dispatcher.cpp | 25 +++++++++++++++++++ ...ict_dense_default_batch_fpt_dispatcher.cpp | 12 ++++++++- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h b/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h index af90b447c8b..b36ab637c18 100644 --- a/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h +++ b/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h @@ -96,7 +96,7 @@ class Batch : public algorithms::regression::prediction::Batch ParameterType parameter; /*!< \ref algorithms::interface1::Parameter "Parameters" of prediction */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a decision forest prediction algorithm by copying input objects and parameters @@ -104,7 +104,7 @@ class Batch : public algorithms::regression::prediction::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); virtual InputType * getInput() DAAL_C11_OVERRIDE { return &input; } diff --git a/cpp/daal/include/algorithms/linear_model/linear_model_predict.h b/cpp/daal/include/algorithms/linear_model/linear_model_predict.h index b8f104cf8b1..bcee468b1a2 100644 --- a/cpp/daal/include/algorithms/linear_model/linear_model_predict.h +++ b/cpp/daal/include/algorithms/linear_model/linear_model_predict.h @@ -80,7 +80,7 @@ class BatchContainer : public PredictionContainerIface * - \ref training::interface1::Batch "training::Batch" class */ template -class Batch : public regression::prediction::Batch +class DAAL_EXPORT Batch : public regression::prediction::Batch { public: typedef algorithms::linear_model::prediction::Input InputType; diff --git a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp index 3cdae850423..d95da747a42 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -31,5 +31,30 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(decision_forest::regression::prediction::BatchContainer, batch, DAAL_FPTYPE, decision_forest::regression::prediction::defaultDense) +namespace decision_forest +{ +namespace regression +{ +namespace prediction +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace prediction +} // namespace regression +} // namespace decision_forest +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp index eede44d34d1..37286f706db 100644 --- a/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp @@ -30,5 +30,15 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_model::prediction::BatchContainer, batch, DAAL_FPTYPE, linear_model::prediction::defaultDense) -} +namespace linear_model +{ +namespace prediction +{ +namespace interface1 +{ +template class Batch; +} // namespace interface1 +} // namespace prediction +} // namespace linear_model +} // namespace algorithms } // namespace daal From 9367ccd178c35d37e78855ed4e5f341e6ea7e56f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Mon, 24 Feb 2025 07:28:25 +0100 Subject: [PATCH 096/126] Update covariance_distributed.h --- .../include/algorithms/covariance/covariance_distributed.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/daal/include/algorithms/covariance/covariance_distributed.h b/cpp/daal/include/algorithms/covariance/covariance_distributed.h index 8ed207a5df5..ad2155d09b1 100644 --- a/cpp/daal/include/algorithms/covariance/covariance_distributed.h +++ b/cpp/daal/include/algorithms/covariance/covariance_distributed.h @@ -554,7 +554,7 @@ class Distributed : public DistributedIface * - Result class */ template -class Distributed : public Online +class DAAL_EXPORT Distributed : public Online { public: typedef Online super; @@ -615,7 +615,7 @@ class Distributed : public Online -class Distributed : public DistributedIface +class DAAL_EXPORT Distributed : public DistributedIface { public: typedef DistributedIface super; From a687c997fe26698539633557eedf09eee4f4441a Mon Sep 17 00:00:00 2001 From: icfaust Date: Sun, 23 Feb 2025 23:39:58 -0800 Subject: [PATCH 097/126] attempt to fix windows --- .../covariance_csr_fast_distr_step2_fpt_dispatcher.cpp | 4 ++-- .../covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp | 4 ++-- .../covariance_csr_sum_distr_step2_fpt_dispatcher.cpp | 4 ++-- .../covariance_dense_default_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp | 4 ++-- .../covariance_dense_sum_distr_step2_fpt_dispatcher.cpp | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp index ce3008af5dd..aa120177b35 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -33,13 +33,13 @@ namespace covariance namespace interface1 { template -DAAL_EXPORT Distributed::Distributed() +Distributed::Distributed() { initialize(); } template -DAAL_EXPORT Distributed::Distributed(const Distributed & other) +Distributed::Distributed(const Distributed & other) : DistributedIface(other) { initialize(); diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp index 5005232368f..0ba339e9d34 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp @@ -33,13 +33,13 @@ namespace covariance namespace interface1 { template -DAAL_EXPORT Distributed::Distributed() +Distributed::Distributed() { initialize(); } template -DAAL_EXPORT Distributed::Distributed(const Distributed & other) +Distributed::Distributed(const Distributed & other) : DistributedIface(other) { initialize(); diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp index ac5dd62c639..eb610930e40 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp @@ -33,13 +33,13 @@ namespace covariance namespace interface1 { template -DAAL_EXPORT Distributed::Distributed() +Distributed::Distributed() { initialize(); } template -DAAL_EXPORT Distributed::Distributed(const Distributed & other) +Distributed::Distributed(const Distributed & other) : DistributedIface(other) { initialize(); diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp index 1bda0067781..34d2e798d85 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp @@ -33,13 +33,13 @@ namespace covariance namespace interface1 { template -DAAL_EXPORT Distributed::Distributed() +Distributed::Distributed() { initialize(); } template -DAAL_EXPORT Distributed::Distributed(const Distributed & other) +Distributed::Distributed(const Distributed & other) : DistributedIface(other) { initialize(); diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp index 85fa3196d42..79c2f430b75 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp @@ -33,13 +33,13 @@ namespace covariance namespace interface1 { template -DAAL_EXPORT Distributed::Distributed() +Distributed::Distributed() { initialize(); } template -DAAL_EXPORT Distributed::Distributed(const Distributed & other) +Distributed::Distributed(const Distributed & other) : DistributedIface(other) { initialize(); diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp index 97bf63e936b..da346bd63e5 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp @@ -33,13 +33,13 @@ namespace covariance namespace interface1 { template -DAAL_EXPORT Distributed::Distributed() +Distributed::Distributed() { initialize(); } template -DAAL_EXPORT Distributed::Distributed(const Distributed & other) +Distributed::Distributed(const Distributed & other) : DistributedIface(other) { initialize(); From 727ab0faef2511821e78c2095adaeab5bd9bb0fc Mon Sep 17 00:00:00 2001 From: icfaust Date: Mon, 24 Feb 2025 00:44:12 -0800 Subject: [PATCH 098/126] fixes for windows and elastic net --- .../decision_tree/decision_tree_classification_predict.h | 2 +- .../decision_tree/decision_tree_regression_predict.h | 2 +- .../include/algorithms/elastic_net/elastic_net_predict.h | 6 ++---- .../include/algorithms/linear_model/linear_model_predict.h | 3 +++ ...ar_model_predict_dense_default_batch_fpt_dispatcher.cpp | 7 +++++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h b/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h index d64c1169102..43577408e14 100644 --- a/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h +++ b/cpp/daal/include/algorithms/decision_tree/decision_tree_classification_predict.h @@ -87,7 +87,7 @@ class BatchContainer : public PredictionContainerIface * - \ref training::interface2::Batch "training::Batch" class */ template -class Batch : public classifier::prediction::Batch +class DAAL_EXPORT Batch : public classifier::prediction::Batch { public: typedef classifier::prediction::Batch super; diff --git a/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h b/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h index efdd6854669..236f4462b63 100644 --- a/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h +++ b/cpp/daal/include/algorithms/decision_tree/decision_tree_regression_predict.h @@ -85,7 +85,7 @@ class BatchContainer : public PredictionContainerIface * - \ref training::interface2::Batch "training::Batch" class */ template -class Batch : public algorithms::regression::prediction::Batch +class DAAL_EXPORT Batch : public algorithms::regression::prediction::Batch { public: typedef algorithms::regression::prediction::Batch super; diff --git a/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h b/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h index b79e6e12ac0..02a25f2558a 100644 --- a/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h +++ b/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h @@ -116,10 +116,8 @@ class Batch : public linear_model::prediction::Batch_ac = new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, - linear_model::prediction::defaultDense)(&(this->_env)); - this->_in = &input; - this->_par = NULL; + super::initialize(); + this->_in = &input; this->_result.reset(new ResultType()); } diff --git a/cpp/daal/include/algorithms/linear_model/linear_model_predict.h b/cpp/daal/include/algorithms/linear_model/linear_model_predict.h index bcee468b1a2..632d7ad8730 100644 --- a/cpp/daal/include/algorithms/linear_model/linear_model_predict.h +++ b/cpp/daal/include/algorithms/linear_model/linear_model_predict.h @@ -98,6 +98,9 @@ class DAAL_EXPORT Batch : public regression::prediction::Batch * \return Structure that contains the result of the regression model-based prediction */ ResultPtr getResult() { return ResultType::cast(_result); } + +protected: + void initialize(); }; /** @} */ } // namespace interface1 diff --git a/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp index 37286f706db..1bb53042c24 100644 --- a/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp @@ -36,6 +36,13 @@ namespace prediction { namespace interface1 { +template +DAAL_EXPORT void Batch::initialize() +{ + this->_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, defaultDense)(&(this->_env)); + this->_par = NULL; +} + template class Batch; } // namespace interface1 } // namespace prediction From 7426bd3dd670d69cc92221546adfa948e75a4f78 Mon Sep 17 00:00:00 2001 From: icfaust Date: Mon, 24 Feb 2025 01:36:34 -0800 Subject: [PATCH 099/126] fix windows issues again --- .../decision_forest/decision_forest_regression_predict.h | 2 +- .../algorithms/lasso_regression/lasso_regression_predict.h | 6 ++---- .../linear_regression/linear_regression_predict.h | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h b/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h index b36ab637c18..9294b8b88c0 100644 --- a/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h +++ b/cpp/daal/include/algorithms/decision_forest/decision_forest_regression_predict.h @@ -83,7 +83,7 @@ class BatchContainer : public PredictionContainerIface * - \ref training::interface2::Batch "training::Batch" class */ template -class Batch : public algorithms::regression::prediction::Batch +class DAAL_EXPORT Batch : public algorithms::regression::prediction::Batch { public: typedef algorithms::regression::prediction::Batch super; diff --git a/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h b/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h index 892f50cef1b..eb8a23c8e2e 100644 --- a/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h +++ b/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h @@ -116,10 +116,8 @@ class Batch : public linear_model::prediction::Batch_ac = new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, - linear_model::prediction::defaultDense)(&(this->_env)); - this->_in = &input; - this->_par = NULL; + super::initialize(); + this->_in = &input; this->_result.reset(new ResultType()); } diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h index 0d321c491ea..9fc5405c454 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h @@ -141,10 +141,8 @@ class Batch : public linear_model::prediction::Ba void initialize() { - this->_ac = new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, - linear_model::prediction::defaultDense)(&(this->_env)); - this->_in = &input; - this->_par = NULL; + super::initialize(); + this->_in = &input; this->_result.reset(new ResultType()); } From 4e798204832032bb0951b4a1d9d663bcf85c90b7 Mon Sep 17 00:00:00 2001 From: icfaust Date: Mon, 24 Feb 2025 01:41:50 -0800 Subject: [PATCH 100/126] further windows fixes --- .../include/algorithms/elastic_net/elastic_net_predict.h | 2 +- .../algorithms/lasso_regression/lasso_regression_predict.h | 2 +- .../algorithms/linear_regression/linear_regression_predict.h | 5 +++-- .../algorithms/ridge_regression/ridge_regression_predict.h | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h b/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h index 02a25f2558a..1f58de2ec25 100644 --- a/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h +++ b/cpp/daal/include/algorithms/elastic_net/elastic_net_predict.h @@ -58,7 +58,7 @@ namespace interface1 * - \ref training::interface1::Batch "training::Batch" class */ template -class Batch : public linear_model::prediction::Batch +class DAAL_EXPORT Batch : public linear_model::prediction::Batch { public: typedef linear_model::prediction::Batch super; diff --git a/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h b/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h index eb8a23c8e2e..33e19df5206 100644 --- a/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h +++ b/cpp/daal/include/algorithms/lasso_regression/lasso_regression_predict.h @@ -58,7 +58,7 @@ namespace interface1 * - \ref training::interface1::Batch "training::Batch" class */ template -class Batch : public linear_model::prediction::Batch +class DAAL_EXPORT Batch : public linear_model::prediction::Batch { public: typedef linear_model::prediction::Batch super; diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h index 9fc5405c454..77c7c65dc3b 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_predict.h @@ -85,7 +85,8 @@ class Batch * - \ref training::interface1::Distributed "training::Distributed" class */ template -class Batch : public linear_model::prediction::Batch +class DAAL_EXPORT Batch + : public linear_model::prediction::Batch { public: typedef algorithms::linear_regression::prediction::Input InputType; @@ -141,7 +142,7 @@ class Batch : public linear_model::prediction::Ba void initialize() { - super::initialize(); + linear_model::prediction::Batch::initialize(); this->_in = &input; this->_result.reset(new ResultType()); } diff --git a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h index 4f0d396b194..2eecda79131 100644 --- a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h +++ b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h @@ -84,7 +84,8 @@ class Batch * - \ref training::interface1::Distributed "training::Distributed" class */ template -class Batch : public linear_model::prediction::Batch +class DAAL_EXPORT Batch + : public linear_model::prediction::Batch { public: typedef linear_model::prediction::Batch super; From b9ad87d78dd45de6a429f89317d0057ca74ac229 Mon Sep 17 00:00:00 2001 From: icfaust Date: Mon, 24 Feb 2025 02:11:38 -0800 Subject: [PATCH 101/126] svm + svd --- cpp/daal/include/algorithms/svd/svd_batch.h | 4 +-- .../include/algorithms/svd/svd_distributed.h | 9 +++--- cpp/daal/include/algorithms/svd/svd_online.h | 6 ++-- cpp/daal/include/algorithms/svm/svm_predict.h | 9 ++---- cpp/daal/include/algorithms/svm/svm_train.h | 13 ++------ ...svd_dense_default_batch_fpt_dispatcher.cpp | 19 ++++++++++++ ...nse_default_distr_step2_fpt_dispatcher.cpp | 20 ++++++++++++ ...nse_default_distr_step3_fpt_dispatcher.cpp | 20 ++++++++++++ ...vd_dense_default_online_fpt_dispatcher.cpp | 19 ++++++++++++ ...ict_dense_default_batch_fpt_dispatcher.cpp | 23 ++++++++++++++ .../svm_train_boser_batch_fpt_dispatcher.cpp | 31 ++++++++++++++++++- ...svm_train_thunder_batch_fpt_dispatcher.cpp | 31 ++++++++++++++++++- 12 files changed, 176 insertions(+), 28 deletions(-) mode change 100755 => 100644 cpp/daal/src/algorithms/svm/svm_train_thunder_batch_fpt_dispatcher.cpp diff --git a/cpp/daal/include/algorithms/svd/svd_batch.h b/cpp/daal/include/algorithms/svd/svd_batch.h index b9c78ff4669..9886d13d816 100644 --- a/cpp/daal/include/algorithms/svd/svd_batch.h +++ b/cpp/daal/include/algorithms/svd/svd_batch.h @@ -90,7 +90,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis InputType input; /*!< %Input data structure */ ParameterType parameter; /*!< SVD parameters structure */ - Batch() { initialize(); } + Batch(); /** * Constructs an SVD algorithm by copying input objects and parameters @@ -98,7 +98,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/svd/svd_distributed.h b/cpp/daal/include/algorithms/svd/svd_distributed.h index e2e63a53e4b..bf60fb9c0ea 100644 --- a/cpp/daal/include/algorithms/svd/svd_distributed.h +++ b/cpp/daal/include/algorithms/svd/svd_distributed.h @@ -229,7 +229,7 @@ class Distributed : public daal::algorithm InputType input; /*!< %DistributedStep2Input data structure */ ParameterType parameter; /*!< SVD parameters structure */ - Distributed() { initialize(); } + Distributed(); /** * Constructs a QR decomposition algorithm by copying input objects and parameters @@ -237,8 +237,7 @@ class Distributed : public daal::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) : input(other.input), parameter(other.parameter) { initialize(); } - + Distributed(const Distributed & other); /** * Returns method of the algorithm * \return Method of the algorithm @@ -346,7 +345,7 @@ class Distributed : public daal::algorithms InputType input; /*!< %DistributedStep3Input data structure */ ParameterType parameter; /*!< SVD parameters structure */ - Distributed() { initialize(); } + Distributed(); /** * Constructs an SVD algorithm by copying input objects and parameters @@ -354,7 +353,7 @@ class Distributed : public daal::algorithms * \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) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/svd/svd_online.h b/cpp/daal/include/algorithms/svd/svd_online.h index 1e72a9cba1b..b708f493c57 100644 --- a/cpp/daal/include/algorithms/svd/svd_online.h +++ b/cpp/daal/include/algorithms/svd/svd_online.h @@ -86,7 +86,7 @@ class OnlineContainer : public daal::algorithms::AnalysisContainerIface * - \ref Method SVD computation methods */ template -class Online : public daal::algorithms::Analysis +class DAAL_EXPORT Online : public daal::algorithms::Analysis { public: typedef OnlinePartialResult PartialResult; @@ -100,7 +100,7 @@ class Online : public daal::algorithms::Analysis InputType input; /*!< %Input data structure */ ParameterType parameter; /*!< SVD parameters structure */ - Online() { initialize(); } + Online(); /** * Constructs an SVD algorithm by copying input objects and parameters @@ -108,7 +108,7 @@ class Online : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : input(other.input), parameter(other.parameter) { initialize(); } + Online(const Online & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/svm/svm_predict.h b/cpp/daal/include/algorithms/svm/svm_predict.h index 28d0bd41694..c454928c59f 100644 --- a/cpp/daal/include/algorithms/svm/svm_predict.h +++ b/cpp/daal/include/algorithms/svm/svm_predict.h @@ -93,7 +93,7 @@ class BatchContainer : public PredictionContainerIface * - \ref interface1::Result "Result" class */ template -class Batch : public classifier::prediction::Batch +class DAAL_EXPORT Batch : public classifier::prediction::Batch { public: typedef classifier::prediction::Batch super; @@ -106,7 +106,7 @@ class Batch : public classifier::prediction::Batch ParameterType parameter; /*!< \ref interface1::Parameter "Parameter" of the algorithm */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an SVM prediction algorithm by copying input objects and parameters @@ -114,10 +114,7 @@ class Batch : public classifier::prediction::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/svm/svm_train.h b/cpp/daal/include/algorithms/svm/svm_train.h index ad024affe70..75d0aabdee0 100644 --- a/cpp/daal/include/algorithms/svm/svm_train.h +++ b/cpp/daal/include/algorithms/svm/svm_train.h @@ -103,17 +103,13 @@ class DAAL_EXPORT Batch : public classifier::training::Batch InputType input; /*!< %Input objects of the algorithm */ /** Default constructor */ - Batch() { initialize(); }; + Batch(); /** * Constructs an SVM training algorithm with nClasses parameter * \param[in] nClasses number of classes */ - Batch(size_t nClasses) - { - parameter.nClasses = nClasses; - initialize(); - } + Batch(size_t nClasses); /** * Constructs an SVM training algorithm by copying input objects and parameters @@ -121,10 +117,7 @@ class DAAL_EXPORT Batch : public classifier::training::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::training::Batch(other), parameter(other.parameter), input(other.input) - { - initialize(); - } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt_dispatcher.cpp index ac5500ae46d..b3ba38cee05 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(svd::BatchContainer, batch, DAAL_FPTYPE, svd::defaultDense) +namespace svd +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace svd +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt_dispatcher.cpp index e41fd6ec5df..ec81edc4360 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(svd::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, svd::defaultDense) +namespace svd +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace svd +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt_dispatcher.cpp index 9077af1f3a1..7e27ff40669 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_distr_step3_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(svd::DistributedContainer, distributed, step3Local, DAAL_FPTYPE, svd::defaultDense) +namespace svd +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace svd +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt_dispatcher.cpp index 07f7cffabd0..b152943d70c 100644 --- a/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svd/svd_dense_default_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(svd::OnlineContainer, online, DAAL_FPTYPE, svd::defaultDense) +namespace svd +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace svd +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/svm/svm_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svm/svm_predict_dense_default_batch_fpt_dispatcher.cpp index f27be69b003..a2f0e980386 100644 --- a/cpp/daal/src/algorithms/svm/svm_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svm/svm_predict_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,28 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(svm::prediction::BatchContainer, batch, DAAL_FPTYPE, svm::prediction::defaultDense) +namespace svm +{ +namespace prediction +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace prediction +} // namespace svm } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/svm/svm_train_boser_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svm/svm_train_boser_batch_fpt_dispatcher.cpp index e14fe4a3486..2e6cff422f7 100644 --- a/cpp/daal/src/algorithms/svm/svm_train_boser_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svm/svm_train_boser_batch_fpt_dispatcher.cpp @@ -28,6 +28,35 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(svm::training::BatchContainer, batch, DAAL_FPTYPE, svm::training::boser) -__DAAL_INSTANTIATE_DISPATCH_CONTAINER(svm::training::internal::BatchContainer, batch, DAAL_FPTYPE, svm::training::boser) +namespace svm +{ +namespace training +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) +{ + parameter.nClasses = nClasses; + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace training +} // namespace svm } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/svm/svm_train_thunder_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/svm/svm_train_thunder_batch_fpt_dispatcher.cpp old mode 100755 new mode 100644 index 522c1730cd0..f6029be2bb9 --- a/cpp/daal/src/algorithms/svm/svm_train_thunder_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/svm/svm_train_thunder_batch_fpt_dispatcher.cpp @@ -28,6 +28,35 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER_SAFE(svm::training::BatchContainer, batch, DAAL_FPTYPE, svm::training::thunder) -__DAAL_INSTANTIATE_DISPATCH_CONTAINER_SAFE(svm::training::internal::BatchContainer, batch, DAAL_FPTYPE, svm::training::thunder) +namespace svm +{ +namespace training +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) +{ + parameter.nClasses = nClasses; + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace training +} // namespace svm } // namespace algorithms } // namespace daal From eccc6b27712357ca8899212b9ece2e564b8af43e Mon Sep 17 00:00:00 2001 From: icfaust Date: Mon, 24 Feb 2025 02:14:07 -0800 Subject: [PATCH 102/126] further windows fixes --- .../implicit_als/implicit_als_predict_ratings_batch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h index 298b9ab7d63..1c4fbc983ea 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_batch.h @@ -83,7 +83,7 @@ class BatchContainer : public PredictionContainerIface * - \ref Method Implicit ALS prediction methods */ template -class Batch : public daal::algorithms::Prediction +class DAAL_EXPORT Batch : public daal::algorithms::Prediction { public: typedef algorithms::implicit_als::prediction::ratings::Input InputType; From 5d780e712d1faf1f5721bf9e06542e879700ab85 Mon Sep 17 00:00:00 2001 From: icfaust Date: Mon, 24 Feb 2025 02:44:28 -0800 Subject: [PATCH 103/126] more fixes --- .../kdtree_knn_classification_predict.h | 2 +- .../algorithms/quantiles/quantiles_batch.h | 4 ++-- .../ridge_regression_training_batch.h | 4 ++-- .../ridge_regression_training_distributed.h | 6 ++--- .../ridge_regression_training_online.h | 8 ++----- .../algorithms/sorting/sorting_batch.h | 4 ++-- ...nse_default_distr_step2_fpt_dispatcher.cpp | 2 +- ...les_dense_default_batch_fpt_dispatcher.cpp | 18 ++++++++++++++ ...rain_dense_normeq_batch_fpt_dispatcher.cpp | 23 +++++++++++++++++- ...ense_normeq_distr_step2_fpt_dispatcher.cpp | 24 +++++++++++++++++++ ...ain_dense_normeq_online_fpt_dispatcher.cpp | 22 +++++++++++++++++ ...ing_dense_default_batch_fpt_dispatcher.cpp | 18 +++++++++++++- ...ict_dense_default_batch_fpt_dispatcher.cpp | 4 +--- ...ain_dense_default_batch_fpt_dispatcher.cpp | 4 +--- ...ict_dense_default_batch_fpt_dispatcher.cpp | 4 +--- ...ain_dense_default_batch_fpt_dispatcher.cpp | 1 - 16 files changed, 119 insertions(+), 29 deletions(-) diff --git a/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h b/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h index 279993d8bbc..e5be73ad047 100644 --- a/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h +++ b/cpp/daal/include/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict.h @@ -85,7 +85,7 @@ class BatchContainer : public PredictionContainerIface * - \ref training::interface3::Batch "training::Batch" class */ template -class Batch : public classifier::prediction::Batch +class DAAL_EXPORT Batch : public classifier::prediction::Batch { public: typedef classifier::prediction::Batch super; diff --git a/cpp/daal/include/algorithms/quantiles/quantiles_batch.h b/cpp/daal/include/algorithms/quantiles/quantiles_batch.h index eb668f08d98..198b04db901 100644 --- a/cpp/daal/include/algorithms/quantiles/quantiles_batch.h +++ b/cpp/daal/include/algorithms/quantiles/quantiles_batch.h @@ -94,7 +94,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis ParameterType parameter; /*!< Quantiles parameters structure */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs algorithm that computes quantiles by copying input objects and parameters @@ -102,7 +102,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_batch.h b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_batch.h index 291e6005a2e..6c4ed7cb4f6 100644 --- a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_batch.h +++ b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_batch.h @@ -99,7 +99,7 @@ class DAAL_EXPORT Batch : public linear_model::training::Batch ParameterType parameter; /*!< %Training \ref interface1::Parameter "parameters" */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a ridge regression training algorithm by copying input objects @@ -107,7 +107,7 @@ class DAAL_EXPORT Batch : public linear_model::training::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); ~Batch() {} 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 bdd0f5887a8..b237251f11b 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 Distributed : public Training +class DAAL_EXPORT Distributed : public Training {}; /** @@ -195,14 +195,14 @@ class Distributed : public Training & other) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); ~Distributed() {} diff --git a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_online.h b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_online.h index 91906597f5d..d624f6818d0 100644 --- a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_online.h +++ b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_training_online.h @@ -106,17 +106,13 @@ class DAAL_EXPORT Online : public linear_model::training::Online ParameterType parameter; /*!< %Training parameters */ /** Default constructor */ - Online() { initialize(); } - + Online(); /** * Constructs a ridge regression training algorithm by copying input objects and parameters of another ridge regression training algorithm in the * online processing mode * \param[in] other Algorithm to use as the source to initialize the input objects and parameters of the algorithm */ - Online(const Online & other) : linear_model::training::Online(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Online(const Online & other); ~Online() {} diff --git a/cpp/daal/include/algorithms/sorting/sorting_batch.h b/cpp/daal/include/algorithms/sorting/sorting_batch.h index fa630755740..28935b6e4ad 100644 --- a/cpp/daal/include/algorithms/sorting/sorting_batch.h +++ b/cpp/daal/include/algorithms/sorting/sorting_batch.h @@ -93,7 +93,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis InputType input; /*!< %input data structure */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs sorting algorithm by copying input objects and parameters @@ -101,7 +101,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input) { initialize(); } + Batch(const Batch & other); ~Batch() DAAL_C11_OVERRIDE {} diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp index 34d2e798d85..80a1f15fba1 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp @@ -49,4 +49,4 @@ template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms -} // namespace daal \ No newline at end of file +} // namespace daal diff --git a/cpp/daal/src/algorithms/quantiles/quantiles_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/quantiles/quantiles_dense_default_batch_fpt_dispatcher.cpp index 76311285bb8..69f00ec94c0 100644 --- a/cpp/daal/src/algorithms/quantiles/quantiles_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/quantiles/quantiles_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,23 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(quantiles::BatchContainer, batch, DAAL_FPTYPE, quantiles::defaultDense) +namespace quantiles +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace quantiles } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_batch_fpt_dispatcher.cpp index 8f46e2a398e..c9384c2129d 100644 --- a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_batch_fpt_dispatcher.cpp @@ -28,5 +28,26 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(ridge_regression::training::BatchContainer, batch, DAAL_FPTYPE, ridge_regression::training::normEqDense) +namespace ridge_regression +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace training +} // namespace ridge_regression } // namespace algorithms -} // namespace daal +} // namespace daal \ No newline at end of file diff --git a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp index e68957c8f3b..652dd509bf7 100644 --- a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp @@ -29,5 +29,29 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(ridge_regression::training::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, ridge_regression::training::normEqDense) +namespace ridge_regression +{ +namespace training +{ +namespace interface1 +{ + +template +Distributed::Distributed() +{ + initialize(); +} + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace ridge_regression } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_online_fpt_dispatcher.cpp index 4b30e56b598..3a294571675 100644 --- a/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/ridge_regression/ridge_regression_train_dense_normeq_online_fpt_dispatcher.cpp @@ -28,5 +28,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(ridge_regression::training::OnlineContainer, online, DAAL_FPTYPE, ridge_regression::training::normEqDense) +namespace ridge_regression +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) + : linear_model::training::Online(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Online; +} // namespace interface1 +} // namespace training +} // namespace ridge_regression } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/sorting/sorting_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/sorting/sorting_dense_default_batch_fpt_dispatcher.cpp index 8749c7c06e2..3a27d10bac0 100644 --- a/cpp/daal/src/algorithms/sorting/sorting_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/sorting/sorting_dense_default_batch_fpt_dispatcher.cpp @@ -28,7 +28,23 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(sorting::BatchContainer, batch, DAAL_FPTYPE, sorting::defaultDense) +namespace sorting +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace sorting } // namespace algorithms - } // namespace daal diff --git a/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp index 652fca0f041..f861f47e214 100644 --- a/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -53,13 +53,11 @@ Batch::Batch(const Batch & other) : classifier::predict initialize(); } -template Batch::Batch(size_t); -template Batch::Batch(const Batch &); +template class Batch; } // namespace interface1 } // namespace prediction } // namespace classification } // namespace stump - } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp index cf8086a4f37..5870eabd870 100644 --- a/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -53,13 +53,11 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -template Batch::Batch(size_t); -template Batch::Batch(const Batch &); +template class Batch; } // namespace interface1 } // namespace training } // namespace classification } // namespace stump - } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/stump/stump_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_regression_predict_dense_default_batch_fpt_dispatcher.cpp index 377f2feeffe..eb5c4d3e0d7 100644 --- a/cpp/daal/src/algorithms/stump/stump_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -52,13 +52,11 @@ Batch::Batch(const Batch & other) : algorithms::regress initialize(); } -template Batch::Batch(); -template Batch::Batch(const Batch &); +template class Batch; } // namespace interface1 } // namespace prediction } // namespace regression } // namespace stump - } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp index 5e6d6c60810..ae5d0da151c 100644 --- a/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -58,6 +58,5 @@ template class Batch; } // namespace training } // namespace regression } // namespace stump - } // namespace algorithms } // namespace daal From 4a3b37b485be46fc15932b6c28db7c581b3d1986 Mon Sep 17 00:00:00 2001 From: icfaust Date: Tue, 25 Feb 2025 22:22:04 -0800 Subject: [PATCH 104/126] kernel function solution --- .../kernel_function/kernel_function_linear.h | 4 ++-- .../kernel_function/kernel_function_rbf.h | 4 ++-- ...n_linear_csr_fast_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++++ ...ear_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++++ ...tion_rbf_csr_fast_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++++ ...rbf_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++++ .../polynomial/kernel_function_polynomial.h | 4 ++-- ...lynomial_csr_fast_batch_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...ial_dense_default_batch_fpt_dispatcher.cpp | 23 +++++++++++++++++++ 9 files changed, 140 insertions(+), 6 deletions(-) diff --git a/cpp/daal/include/algorithms/kernel_function/kernel_function_linear.h b/cpp/daal/include/algorithms/kernel_function/kernel_function_linear.h index e2914d62e3e..c1b3d8fa1e4 100644 --- a/cpp/daal/include/algorithms/kernel_function/kernel_function_linear.h +++ b/cpp/daal/include/algorithms/kernel_function/kernel_function_linear.h @@ -102,7 +102,7 @@ class DAAL_EXPORT Batch : public KernelIface InputType input; /*!< %Input data structure */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs linear kernel function algorithm by copying input objects and parameters @@ -110,7 +110,7 @@ class DAAL_EXPORT Batch : public KernelIface * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h b/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h index 82c23446116..ba047f5fe78 100644 --- a/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h +++ b/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h @@ -101,7 +101,7 @@ class DAAL_EXPORT Batch : public KernelIface InputType input; /*!< %Input data structure */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs RBF kernel function algorithm by copying input objects and parameters @@ -109,7 +109,7 @@ class DAAL_EXPORT Batch : public KernelIface * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp index d471f32c472..271d683f28f 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp @@ -29,5 +29,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(kernel_function::linear::BatchContainer, batch, DAAL_FPTYPE, kernel_function::linear::fastCSR) +namespace kernel_function +{ +namespace linear +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : KernelIface(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace linear +} // namespace kernel_function } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp index b46abf581c6..be1f5c961e0 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(kernel_function::linear::BatchContainer, batch, DAAL_FPTYPE, kernel_function::linear::defaultDense) +namespace kernel_function +{ +namespace linear +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : KernelIface(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace linear +} // namespace kernel_function } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp index 11e426ab21e..284bda52a2f 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp @@ -30,5 +30,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(kernel_function::rbf::BatchContainer, batch, DAAL_FPTYPE, kernel_function::rbf::fastCSR) +namespace kernel_function +{ +namespace rbf +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : KernelIface(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace rbf +} // namespace kernel_function } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp index 5e054e5a162..50d0c00db0b 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp @@ -30,5 +30,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(kernel_function::rbf::BatchContainer, batch, DAAL_FPTYPE, kernel_function::rbf::defaultDense) +namespace kernel_function +{ +namespace rbf +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : KernelIface(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace rbf +} // namespace kernel_function } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial.h b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial.h index f6bfd4a467c..9f18ea1d766 100644 --- a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial.h +++ b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial.h @@ -57,9 +57,9 @@ class DAAL_EXPORT Batch : public KernelIface ParameterType parameter; /*!< Parameter of the kernel function*/ InputType input; /*!< %Input data structure */ - Batch() { initialize(); } + Batch(); - Batch(const Batch & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } + Batch(const Batch & other); virtual int getMethod() const DAAL_C11_OVERRIDE { return (int)method; } diff --git a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp index 125c55f453d..04a877c3df1 100644 --- a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp @@ -25,5 +25,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER_SAFE(kernel_function::polynomial::internal::BatchContainer, batch, DAAL_FPTYPE, kernel_function::polynomial::internal::fastCSR) +namespace kernel_function +{ +namespace polynomial +{ +namespace internal +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : KernelIface(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} +template class Batch; + +} // namespace internal +} // namespace polynomial +} // namespace kernel_function } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp index 5f8d69374f4..898eac34697 100644 --- a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp @@ -25,5 +25,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER_SAFE(kernel_function::polynomial::internal::BatchContainer, batch, DAAL_FPTYPE, kernel_function::polynomial::internal::defaultDense) +namespace kernel_function +{ +namespace polynomial +{ +namespace internal +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : KernelIface(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} +template class Batch; + +} // namespace internal +} // namespace polynomial +} // namespace kernel_function } // namespace algorithms } // namespace daal From b0974c5d2ef74da177c5f16bbf543b08ebdc2efe Mon Sep 17 00:00:00 2001 From: icfaust Date: Tue, 25 Feb 2025 23:33:05 -0800 Subject: [PATCH 105/126] fix implicit_als --- .../covariance/covariance_distributed.h | 6 ++--- ...implicit_als_predict_ratings_distributed.h | 6 ++--- .../implicit_als_training_distributed.h | 18 ++++++------- .../implicit_als_training_init_distributed.h | 14 ++++------ ...csr_default_distr_step1_fpt_dispatcher.cpp | 26 +++++++++++++++++++ ...csr_default_distr_step1_fpt_dispatcher.cpp | 23 ++++++++++++++++ ...csr_default_distr_step2_fpt_dispatcher.cpp | 23 ++++++++++++++++ ...csr_default_distr_step3_fpt_dispatcher.cpp | 23 ++++++++++++++++ ...csr_default_distr_step4_fpt_dispatcher.cpp | 23 ++++++++++++++++ ...csr_default_distr_step1_fpt_dispatcher.cpp | 26 +++++++++++++++++++ ...csr_default_distr_step2_fpt_dispatcher.cpp | 26 +++++++++++++++++++ 11 files changed, 190 insertions(+), 24 deletions(-) diff --git a/cpp/daal/include/algorithms/covariance/covariance_distributed.h b/cpp/daal/include/algorithms/covariance/covariance_distributed.h index ad2155d09b1..ce82af845ae 100644 --- a/cpp/daal/include/algorithms/covariance/covariance_distributed.h +++ b/cpp/daal/include/algorithms/covariance/covariance_distributed.h @@ -529,7 +529,7 @@ class DistributedIface : public daal::algorithms::Analysis -class Distributed : public DistributedIface +class DAAL_EXPORT Distributed : public DistributedIface {}; /** @@ -554,7 +554,7 @@ class 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; diff --git a/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_distributed.h b/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_distributed.h index c3783f04796..711cec415ae 100644 --- a/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_distributed.h +++ b/cpp/daal/include/algorithms/implicit_als/implicit_als_predict_ratings_distributed.h @@ -100,7 +100,7 @@ class DistributedContainer : public Di * - \ref Distributed class */ template -class Distributed : public daal::algorithms::DistributedPrediction +class DAAL_EXPORT Distributed : public daal::algorithms::DistributedPrediction {}; /** @@ -132,7 +132,7 @@ class Distributed : public daal::algorithms /** * Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs an implicit ALS ratings prediction algorithm by copying input objects and parameters @@ -140,7 +140,7 @@ class Distributed : public daal::algorithms * \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) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); virtual ~Distributed() {} 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 582929de2db..df46222cbcd 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 Distributed : public Training +class DAAL_EXPORT Distributed : public Training {}; /** @@ -212,7 +212,7 @@ class Distributed : public Training : public Training & other) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns the method of the algorithm @@ -319,7 +319,7 @@ class Distributed : public Training : public Training & other) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns the method of the algorithm @@ -426,7 +426,7 @@ class Distributed : public Training : public Training & other) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns the method of the algorithm @@ -533,7 +533,7 @@ class Distributed : public Training : public Training & other) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns the method of the algorithm 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 ee8c15f5bf3..90024f6c627 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 Distributed +class DAAL_EXPORT Distributed {}; /** @@ -150,7 +150,7 @@ class Distributed : public Training : public Training & other) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns the method of the algorithm @@ -247,7 +247,7 @@ class Distributed : public Training input; /*!< %Input data structure */ /** Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs an algorithm for initializing the implicit ALS model by copying input objects @@ -255,11 +255,7 @@ class Distributed : public Training & other) - { - initialize(); - input.set(inputOfStep2FromStep1, other.input.get(inputOfStep2FromStep1)); - } + Distributed(const Distributed & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp index b75d041c8c0..94bea5e706b 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp @@ -30,5 +30,31 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::prediction::ratings::DistributedContainer, distributed, step1Local, DAAL_FPTYPE, implicit_als::prediction::ratings::defaultDense) +namespace implicit_als +{ +namespace prediction +{ +namespace ratings +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace ratings +} // namespace prediction +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp index f858d7acd0e..c428939bc92 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::DistributedContainer, distributed, step1Local, DAAL_FPTYPE, implicit_als::training::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp index 94660751f4e..3fcc699e9b6 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, implicit_als::training::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp index 11c3f04724a..6b24f5b25e2 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::DistributedContainer, distributed, step3Local, DAAL_FPTYPE, implicit_als::training::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp index 20e00e52f02..f23e24f9dcf 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::DistributedContainer, distributed, step4Local, DAAL_FPTYPE, implicit_als::training::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp index 37ccb521730..f5529590365 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp @@ -30,5 +30,31 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::init::DistributedContainer, distributed, step1Local, DAAL_FPTYPE, implicit_als::training::init::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace init +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace init +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp index d245c95cce6..db5a61f76da 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp @@ -30,5 +30,31 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(implicit_als::training::init::DistributedContainer, distributed, step2Local, DAAL_FPTYPE, implicit_als::training::init::fastCSR) +namespace implicit_als +{ +namespace training +{ +namespace init +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) +{ + initialize(); + input.set(inputOfStep2FromStep1, other.input.get(inputOfStep2FromStep1)); +} + +template class Distributed; +} // namespace interface1 +} // namespace init +} // namespace training +} // namespace implicit_als +} // namespace algorithms } // namespace daal From 70d7bdaa56e6071961e0d1bac3bd20afae91591e Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 00:19:36 -0800 Subject: [PATCH 106/126] linear regression changes --- .../linear_regression_group_of_betas_batch.h | 10 ++----- .../linear_regression_single_beta_batch.h | 10 ++----- .../linear_regression_training_batch.h | 4 +-- .../linear_regression_training_distributed.h | 11 ++------ .../linear_regression_training_online.h | 7 ++--- ...tas_dense_default_batch_fpt_dispatcher.cpp | 27 ++++++++++++++++++ ...eta_dense_default_batch_fpt_dispatcher.cpp | 28 +++++++++++++++++++ ...rain_dense_normeq_batch_fpt_dispatcher.cpp | 21 ++++++++++++++ ...ense_normeq_distr_step2_fpt_dispatcher.cpp | 24 ++++++++++++++++ ...ain_dense_normeq_online_fpt_dispatcher.cpp | 23 +++++++++++++++ ...on_train_dense_qr_batch_fpt_dispatcher.cpp | 23 +++++++++++++++ ...in_dense_qr_distr_step2_fpt_dispatcher.cpp | 24 ++++++++++++++++ ...n_train_dense_qr_online_fpt_dispatcher.cpp | 23 +++++++++++++++ 13 files changed, 204 insertions(+), 31 deletions(-) diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_group_of_betas_batch.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_group_of_betas_batch.h index 6e2e7129f97..6b5c97f6989 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_group_of_betas_batch.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_group_of_betas_batch.h @@ -98,7 +98,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch ParameterType parameter; /*!< Parameters of the algorithm */ /** Default constructor */ - Batch(size_t nBeta, size_t nBetaReducedModel) : parameter(nBeta, nBetaReducedModel) { initialize(); } + Batch(size_t nBeta, size_t nBetaReducedModel); /** * Constructs an algorithm by copying input objects and parameters @@ -106,13 +106,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : parameter(other.parameter) - { - initialize(); - input.set(expectedResponses, other.input.get(expectedResponses)); - input.set(predictedResponses, other.input.get(predictedResponses)); - input.set(predictedReducedModelResponses, other.input.get(predictedReducedModelResponses)); - } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_single_beta_batch.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_single_beta_batch.h index 734802aeffc..b91f73c7ba5 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_single_beta_batch.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_single_beta_batch.h @@ -95,7 +95,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch ParameterType parameter; /*!< Parameters of the algorithm */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm by copying input objects and parameters @@ -103,13 +103,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : parameter(other.parameter) - { - initialize(); - input.set(expectedResponses, other.input.get(expectedResponses)); - input.set(predictedResponses, other.input.get(predictedResponses)); - input.set(model, other.input.get(model)); - } + Batch(const Batch & other); /** * Returns the method of the algorithm diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_training_batch.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_training_batch.h index 472af4475bb..9773d53b869 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_training_batch.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_training_batch.h @@ -101,7 +101,7 @@ class DAAL_EXPORT Batch : public linear_model::training::Batch ParameterType parameter; /*!< %Training \ref interface1::Parameter "parameters" */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a linear regression training algorithm by copying input objects @@ -109,7 +109,7 @@ class DAAL_EXPORT Batch : public linear_model::training::Batch * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); ~Batch() {} 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 9023d6047b2..8789e6500a5 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 Distributed : public Training +class DAAL_EXPORT Distributed : public Training {}; /** @@ -203,7 +203,7 @@ class Distributed : public Training : public Training & other) : parameter(other.parameter) - { - initialize(); - input.set(partialModels, other.input.get(partialModels)); - } - + Distributed(const Distributed & other); ~Distributed() {} /** diff --git a/cpp/daal/include/algorithms/linear_regression/linear_regression_training_online.h b/cpp/daal/include/algorithms/linear_regression/linear_regression_training_online.h index cf1ce464abc..302c3095d33 100644 --- a/cpp/daal/include/algorithms/linear_regression/linear_regression_training_online.h +++ b/cpp/daal/include/algorithms/linear_regression/linear_regression_training_online.h @@ -109,7 +109,7 @@ class DAAL_EXPORT Online : public linear_model::training::Online ParameterType parameter; /*!< %Training \ref interface1::Parameter "parameters" */ /** Default constructor */ - Online() { initialize(); } + Online(); /** * Constructs a linear regression training algorithm by copying input objects and parameters @@ -117,10 +117,7 @@ class DAAL_EXPORT Online : public linear_model::training::Online * \param[in] other Algorithm to use as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : linear_model::training::Online(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Online(const Online & other); ~Online() {} diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp index f6336bd9df2..b838ea97140 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,32 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::quality_metric::group_of_betas::BatchContainer, batch, DAAL_FPTYPE, linear_regression::quality_metric::group_of_betas::defaultDense) +namespace linear_regression +{ +namespace quality_metric +{ +namespace group_of_betas +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch(size_t nBeta, size_t nBetaReducedModel) : parameter(nBeta, nBetaReducedModel) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : parameter(other.parameter) +{ + initialize(); + input.set(expectedResponses, other.input.get(expectedResponses)); + input.set(predictedResponses, other.input.get(predictedResponses)); + input.set(predictedReducedModelResponses, other.input.get(predictedReducedModelResponses)); } +template class Batch; +} // namespace interface1 +} // namespace group_of_betas +} // namespace quality_metric +} // namespace linear_regression +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp index 94c38a626ea..52c260f4024 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,33 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::quality_metric::single_beta::BatchContainer, batch, DAAL_FPTYPE, linear_regression::quality_metric::single_beta::defaultDense) +namespace linear_regression +{ +namespace quality_metric +{ +namespace single_beta +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : parameter(other.parameter) +{ + initialize(); + input.set(expectedResponses, other.input.get(expectedResponses)); + input.set(predictedResponses, other.input.get(predictedResponses)); + input.set(model, other.input.get(model)); +} + +template class Batch; +} // namespace interface1 +} // namespace single_beta +} // namespace quality_metric +} // namespace linear_regression +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp index 2a66ba0cddb..ff224bf38f8 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp @@ -28,6 +28,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::training::BatchContainer, batch, DAAL_FPTYPE, linear_regression::training::normEqDense) +namespace linear_regression +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Batch; +} // namespace interface1 +} // namespace training +} // namespace linear_regression } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp index c0b84373466..e327f5c9b04 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp @@ -29,5 +29,29 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::training::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, linear_regression::training::normEqDense) +namespace linear_regression +{ +namespace training +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : parameter(other.parameter) +{ + initialize(); + input.set(partialModels, other.input.get(partialModels)); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace linear_regression +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp index 6062d9497b8..ee2fb1bd44e 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp @@ -28,5 +28,28 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::training::OnlineContainer, online, DAAL_FPTYPE, linear_regression::training::normEqDense) +namespace linear_regression +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) + : linear_model::training::Online(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace training +} // namespace linear_regression } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp index ffe84c3afa1..6226735ef36 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp @@ -28,5 +28,28 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::training::BatchContainer, batch, DAAL_FPTYPE, linear_regression::training::qrDense) + +namespace linear_regression +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace training +} // namespace linear_regression +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp index 9bbcdb8182c..e7eba4505ad 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp @@ -29,5 +29,29 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::training::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, linear_regression::training::qrDense) +namespace linear_regression +{ +namespace training +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : parameter(other.parameter) +{ + initialize(); + input.set(partialModels, other.input.get(partialModels)); +} + +template class Distributed; +} // namespace interface1 +} // namespace training +} // namespace linear_regression +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp index 59254846555..af20bfbf964 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp @@ -28,5 +28,28 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(linear_regression::training::OnlineContainer, online, DAAL_FPTYPE, linear_regression::training::qrDense) +namespace linear_regression +{ +namespace training +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) + : linear_model::training::Online(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace training +} // namespace linear_regression +} // namespace algorithms } // namespace daal From 788d089aaa3148b3e2dfc4815ee4e2134220d9a8 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 03:50:12 -0800 Subject: [PATCH 107/126] low_order_moments --- .../moments/low_order_moments_batch.h | 4 ++-- .../moments/low_order_moments_distributed.h | 6 +++--- .../moments/low_order_moments_online.h | 4 ++-- ..._moments_csr_fast_batch_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...ts_csr_fast_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++++ ...moments_csr_fast_online_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...ts_csr_singlepass_batch_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ..._singlepass_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++++ ...s_csr_singlepass_online_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...r_moments_csr_sum_batch_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...nts_csr_sum_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++++ ..._moments_csr_sum_online_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...nts_dense_default_batch_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...nse_default_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++++ ...ts_dense_default_online_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ..._dense_singlepass_batch_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ..._singlepass_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++++ ...dense_singlepass_online_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...moments_dense_sum_batch_fpt_dispatcher.cpp | 19 ++++++++++++++++++ ...s_dense_sum_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++++++++ ...oments_dense_sum_online_fpt_dispatcher.cpp | 19 ++++++++++++++++++ 21 files changed, 355 insertions(+), 7 deletions(-) diff --git a/cpp/daal/include/algorithms/moments/low_order_moments_batch.h b/cpp/daal/include/algorithms/moments/low_order_moments_batch.h index 0da0ab40674..e1510c1e77c 100644 --- a/cpp/daal/include/algorithms/moments/low_order_moments_batch.h +++ b/cpp/daal/include/algorithms/moments/low_order_moments_batch.h @@ -181,7 +181,7 @@ class DAAL_EXPORT Batch : public BatchImpl typedef typename super::ResultType ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm that computes moments of low order by copying input objects @@ -189,7 +189,7 @@ class DAAL_EXPORT Batch : public BatchImpl * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : BatchImpl(other) { initialize(); } + Batch(const Batch & other); virtual ~Batch() {} 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 156d45e3197..b4e2bfe6e46 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 Distributed +class DAAL_EXPORT Distributed {}; /** @@ -197,7 +197,7 @@ class Distributed : public daal::algorithm ParameterType parameter; /*!< %Parameters structure */ /** Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs an algorithm that computes moments of low order by copying input objects @@ -205,7 +205,7 @@ class Distributed : public daal::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) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/moments/low_order_moments_online.h b/cpp/daal/include/algorithms/moments/low_order_moments_online.h index 212ce37ed3c..151ccdaf087 100644 --- a/cpp/daal/include/algorithms/moments/low_order_moments_online.h +++ b/cpp/daal/include/algorithms/moments/low_order_moments_online.h @@ -102,7 +102,7 @@ class DAAL_EXPORT Online : public daal::algorithms::Analysis ParameterType parameter; /*!< %Parameters structure */ /** Default constructor */ - Online() { initialize(); } + Online(); /** * Constructs and algorithm that computes moments of low order by copying input objects and parameters @@ -110,7 +110,7 @@ class DAAL_EXPORT Online : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : input(other.input), parameter(other.parameter) { initialize(); } + Online(const Online & other); /** * Returns method of the algorithm diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp index a3a13631d35..e9aa93f7df7 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::BatchContainer, batch, DAAL_FPTYPE, low_order_moments::fastCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp index 484504900da..7b0ff30a382 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, low_order_moments::fastCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp index 1dc2bcb3413..e9625769707 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::OnlineContainer, online, DAAL_FPTYPE, low_order_moments::fastCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp index 3df611eb317..b32c307a464 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::BatchContainer, batch, DAAL_FPTYPE, low_order_moments::singlePassCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp index 7def69874e4..3d0cd4cbe05 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp @@ -29,5 +29,25 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, low_order_moments::singlePassCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp index 91cf8a4570f..eefe377f28c 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::OnlineContainer, online, DAAL_FPTYPE, low_order_moments::singlePassCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp index 7b96fc9d0c8..f9b7a62abf3 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::BatchContainer, batch, DAAL_FPTYPE, low_order_moments::sumCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp index bbca3af3a8b..ccbaac075db 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, low_order_moments::sumCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp index 01b86963d5a..9d5e9f250a8 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::OnlineContainer, online, DAAL_FPTYPE, low_order_moments::sumCSR) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp index 2843069ad1a..0ea277f3f67 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::BatchContainer, batch, DAAL_FPTYPE, low_order_moments::defaultDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp index 8a6b22fa03a..c482751fb60 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, low_order_moments::defaultDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp index adbc37d600f..43a207a8985 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::OnlineContainer, online, DAAL_FPTYPE, low_order_moments::defaultDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp index cc810e202dc..4efe12d8719 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::BatchContainer, batch, DAAL_FPTYPE, low_order_moments::singlePassDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp index a4c939e6ba4..052028bb843 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp @@ -29,5 +29,25 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, low_order_moments::singlePassDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp index 3762ce11414..dd5796a7491 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::OnlineContainer, online, DAAL_FPTYPE, low_order_moments::singlePassDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp index 8e64cd74449..9b687e813f5 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::BatchContainer, batch, DAAL_FPTYPE, low_order_moments::sumDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp index b8231eb52e8..1e4ff7f2f3f 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, low_order_moments::sumDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp index 4e9adf5d660..bc9ec02dabe 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(low_order_moments::OnlineContainer, online, DAAL_FPTYPE, low_order_moments::sumDense) +namespace low_order_moments +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace low_order_moments +} // namespace algorithms } // namespace daal From bbbb7d6971fdb3b941906bf06a198366c25e2678 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 04:28:44 -0800 Subject: [PATCH 108/126] interim save point --- .../multinomial_naive_bayes_predict.h | 9 +++----- .../multinomial_naive_bayes_training_batch.h | 7 ++---- ...inomial_naive_bayes_training_distributed.h | 11 +++------ .../multinomial_naive_bayes_training_online.h | 4 ++-- ...t_predict_dense_default_fpt_dispatcher.cpp | 1 - ...gitboost_train_friedman_fpt_dispatcher.cpp | 4 +--- ...ebayes_predict_csr_fast_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...s_predict_dense_default_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...es_train_csr_fast_batch_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...in_csr_fast_distr_step2_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...s_train_csr_fast_online_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...ain_dense_default_batch_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...nse_default_distr_step2_fpt_dispatcher.cpp | 23 +++++++++++++++++++ ...in_dense_default_online_fpt_dispatcher.cpp | 23 +++++++++++++++++++ 14 files changed, 195 insertions(+), 25 deletions(-) diff --git a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_predict.h b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_predict.h index 07a88c0c347..049f24caaf5 100644 --- a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_predict.h +++ b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_predict.h @@ -88,7 +88,7 @@ class BatchContainer : public PredictionContainerIface * - \ref Method Multinomial naive Bayes prediction methods */ template -class Batch : public classifier::prediction::Batch +class DAAL_EXPORT Batch : public classifier::prediction::Batch { public: typedef classifier::prediction::Batch super; @@ -103,7 +103,7 @@ class Batch : public classifier::prediction::Batch * Default constructor * \param nClasses Number of classes */ - Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + Batch(size_t nClasses); /** * Constructs multinomial naive Bayes prediction algorithm by copying input objects and parameters @@ -111,10 +111,7 @@ class Batch : public classifier::prediction::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_batch.h b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_batch.h index 06908756fcc..ca54b853496 100644 --- a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_batch.h +++ b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_batch.h @@ -105,7 +105,7 @@ class DAAL_EXPORT Batch : public classifier::training::Batch * Default constructor * \param nClasses Number of classes */ - Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + Batch(size_t nClasses); /** * Constructs multinomial naive Bayes training algorithm by copying input objects and parameters @@ -113,10 +113,7 @@ class DAAL_EXPORT Batch : public classifier::training::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::training::Batch(other), parameter(other.parameter), input(other.input) - { - initialize(); - } + Batch(const Batch & other); virtual ~Batch() {} 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 3e2f106b388..acc9dde0f94 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 Distributed +class DAAL_EXPORT Distributed {}; /** @@ -190,7 +190,7 @@ class Distributed : public Training : public Training & other) - : Training(other), parameter(other.parameter), input(other.input) - { - initialize(); - } - + Distributed(const Distributed & other); virtual ~Distributed() {} /** diff --git a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_online.h b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_online.h index de62bbab10e..1201e34a42d 100644 --- a/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_online.h +++ b/cpp/daal/include/algorithms/naive_bayes/multinomial_naive_bayes_training_online.h @@ -109,7 +109,7 @@ class DAAL_EXPORT Online : public classifier::training::Online * Default constructor * \param nClasses Number of classes */ - Online(size_t nClasses) : input(), parameter(nClasses) { initialize(); } + Online(size_t nClasses); /** * Constructs multinomial naive Bayes training algorithm by copying input objects and parameters @@ -117,7 +117,7 @@ class DAAL_EXPORT Online : public classifier::training::Online * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : super(other), input(other.input), parameter(other.parameter) { initialize(); } + Online(const Online & other); virtual ~Online() {} diff --git a/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp index c5b52fb4954..df837a95ca3 100644 --- a/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp @@ -56,6 +56,5 @@ Batch::Batch(const BatchType } // namespace interface2 } // namespace prediction } // namespace logitboost - } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp index 29ce254894d..c58ff0c70f6 100644 --- a/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp @@ -50,9 +50,7 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -template Batch::Batch(size_t); -template Batch::Batch(const Batch &); - +template class Batch; } // namespace interface2 } // namespace training } // namespace logitboost diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp index 91d8de474a5..b1454f436f8 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::prediction::BatchContainer, batch, DAAL_FPTYPE, multinomial_naive_bayes::prediction::fastCSR) +namespace multinomial_naive_bayes +{ +namespace prediction +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace prediction +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp index fe4767de746..e9355ff38a0 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::prediction::BatchContainer, batch, DAAL_FPTYPE, multinomial_naive_bayes::prediction::defaultDense) +namespace multinomial_naive_bayes +{ +namespace prediction +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace prediction +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp index e2ee5f732ec..ce337fe4313 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::training::BatchContainer, batch, DAAL_FPTYPE, multinomial_naive_bayes::training::fastCSR) +namespace multinomial_naive_bayes +{ +namespace training +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace training +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp index 3674fa78997..5b43f06ff11 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::training::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, multinomial_naive_bayes::training::fastCSR) +namespace multinomial_naive_bayes +{ +namespace training +{ +namespace interface2 +{ +template +Distributed::Distributed(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +Distributed::Distributed(const Distributed & other) + : Training(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} + +template class Distributed; +} // namespace interface2 +} // namespace training +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp index afbc960f730..f2513b83346 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::training::OnlineContainer, online, DAAL_FPTYPE, multinomial_naive_bayes::training::fastCSR) +namespace multinomial_naive_bayes +{ +namespace training +{ +namespace interface2 +{ +template +DAAL_EXPORT Online::Online(size_t nClasses) : input(), parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) + : classifier::training::Online(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface2 +} // namespace training +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp index e1145513745..ada40afd8d1 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::training::BatchContainer, batch, DAAL_FPTYPE, multinomial_naive_bayes::training::defaultDense) +namespace multinomial_naive_bayes +{ +namespace training +{ +namespace interface2 +{ +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace training +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp index 8696e3ef2ec..26e4fdbfd38 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::training::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, multinomial_naive_bayes::training::defaultDense) +namespace multinomial_naive_bayes +{ +namespace training +{ +namespace interface2 +{ +template +Distributed::Distributed(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +Distributed::Distributed(const Distributed & other) + : Training(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} + +template class Distributed; +} // namespace interface2 +} // namespace training +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp index 3dcf0f67ad0..b7f8d44cf0b 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp @@ -30,5 +30,28 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multinomial_naive_bayes::training::OnlineContainer, online, DAAL_FPTYPE, multinomial_naive_bayes::training::defaultDense) +namespace multinomial_naive_bayes +{ +namespace training +{ +namespace interface2 +{ +template +DAAL_EXPORT Online::Online(size_t nClasses) : input(), parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) + : classifier::training::Online(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface2 +} // namespace training +} // namespace multinomial_naive_bayes } // namespace algorithms } // namespace daal From 6c1acf01faa65b43001d69dc5d999a0b1a4f8bfc Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 04:57:13 -0800 Subject: [PATCH 109/126] further updates --- .../include/algorithms/normalization/minmax.h | 4 ++-- .../include/algorithms/normalization/zscore.h | 2 +- .../adagrad/adagrad_batch.h | 7 ++---- .../optimization_solver/lbfgs/lbfgs_batch.h | 10 ++------ .../optimization_solver/sgd/sgd_batch.h | 10 ++------ ...max_dense_default_batch_fpt_dispatcher.cpp | 22 ++++++++++++++++++ ...ore_dense_default_batch_fpt_dispatcher.cpp | 23 +++++++++++++++++++ .../zscore_dense_sum_batch_fpt_dispatcher.cpp | 5 +--- ...rad_dense_default_batch_fpt_dispatcher.cpp | 13 +++++++++++ ...fgs_dense_default_batch_fpt_dispatcher.cpp | 13 +++++++++++ ...sgd_dense_default_batch_fpt_dispatcher.cpp | 13 +++++++++++ 11 files changed, 94 insertions(+), 28 deletions(-) diff --git a/cpp/daal/include/algorithms/normalization/minmax.h b/cpp/daal/include/algorithms/normalization/minmax.h index 95a2efed918..3af65b1cb7c 100644 --- a/cpp/daal/include/algorithms/normalization/minmax.h +++ b/cpp/daal/include/algorithms/normalization/minmax.h @@ -99,14 +99,14 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis Parameter parameter; /*!< Parameters */ /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs min-max normalization algorithm by copying input objects * of another min-max normalization algorithm * \param[in] other An algorithm to be used as the source to initialize the input objects of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/normalization/zscore.h b/cpp/daal/include/algorithms/normalization/zscore.h index 1347e814f31..5a808e17426 100644 --- a/cpp/daal/include/algorithms/normalization/zscore.h +++ b/cpp/daal/include/algorithms/normalization/zscore.h @@ -183,7 +183,7 @@ class DAAL_EXPORT Batch : public BatchImpl typedef algorithms::normalization::zscore::Parameter ParameterType; typedef typename super::ResultType ResultType; - /** Default constructor */ + /** Default constructor */ Batch(); /** diff --git a/cpp/daal/include/algorithms/optimization_solver/adagrad/adagrad_batch.h b/cpp/daal/include/algorithms/optimization_solver/adagrad/adagrad_batch.h index cc228036462..ac269354498 100644 --- a/cpp/daal/include/algorithms/optimization_solver/adagrad/adagrad_batch.h +++ b/cpp/daal/include/algorithms/optimization_solver/adagrad/adagrad_batch.h @@ -100,7 +100,7 @@ class DAAL_EXPORT Batch : public iterative_solver::Batch ParameterType parameter; /*!< %Parameter data structure */ /** Default constructor */ - Batch(sum_of_functions::BatchPtr objectiveFunction = sum_of_functions::BatchPtr()) : parameter(objectiveFunction) { initialize(); } + Batch(sum_of_functions::BatchPtr objectiveFunction = sum_of_functions::BatchPtr()); /** * Constructs a Adaptive gradient descent algorithm by copying input objects @@ -108,10 +108,7 @@ class DAAL_EXPORT Batch : public iterative_solver::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/optimization_solver/lbfgs/lbfgs_batch.h b/cpp/daal/include/algorithms/optimization_solver/lbfgs/lbfgs_batch.h index 27ed1f67bf5..8f7124d2f4f 100644 --- a/cpp/daal/include/algorithms/optimization_solver/lbfgs/lbfgs_batch.h +++ b/cpp/daal/include/algorithms/optimization_solver/lbfgs/lbfgs_batch.h @@ -106,20 +106,14 @@ class DAAL_EXPORT Batch : public iterative_solver::Batch * Constructs the LBFGS algorithm with the input objective function * \param[in] objectiveFunction Objective function that can be represented as a sum of functions */ - Batch(const sum_of_functions::BatchPtr & objectiveFunction = sum_of_functions::BatchPtr()) : input(), parameter(objectiveFunction) - { - initialize(); - } + Batch(const sum_of_functions::BatchPtr & objectiveFunction = sum_of_functions::BatchPtr()); /** * Constructs an LBFGS algorithm by copying input objects of another LBFGS algorithm * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h b/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h index bfa49310158..5085e882dee 100644 --- a/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h +++ b/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h @@ -106,10 +106,7 @@ class DAAL_EXPORT Batch : public iterative_solver::Batch * Constructs the SGD algorithm with the input objective function * \param[in] objectiveFunction Objective function that can be represented as a sum of functions */ - Batch(const sum_of_functions::BatchPtr & objectiveFunction = sum_of_functions::BatchPtr()) : input(), parameter(objectiveFunction) - { - initialize(); - } + Batch(const sum_of_functions::BatchPtr & objectiveFunction = sum_of_functions::BatchPtr()); /** * Constructs a Stochastic gradient descent algorithm by copying input objects @@ -117,10 +114,7 @@ class DAAL_EXPORT Batch : public iterative_solver::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/src/algorithms/normalization/minmax/minmax_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/normalization/minmax/minmax_dense_default_batch_fpt_dispatcher.cpp index ec1467f65c3..cab7a453a8c 100644 --- a/cpp/daal/src/algorithms/normalization/minmax/minmax_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/normalization/minmax/minmax_dense_default_batch_fpt_dispatcher.cpp @@ -26,5 +26,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(normalization::minmax::BatchContainer, batch, DAAL_FPTYPE, normalization::minmax::defaultDense) +namespace normalization +{ +namespace minmax +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace minmax +} // namespace normalization +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_default_batch_fpt_dispatcher.cpp index be29edb9f41..a35f4f55773 100644 --- a/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_default_batch_fpt_dispatcher.cpp @@ -27,5 +27,28 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(normalization::zscore::interface3::BatchContainer, batch, DAAL_FPTYPE, normalization::zscore::defaultDense) +namespace normalization +{ +namespace zscore +{ +namespace interface3 +{ +template +Batch::Batch() +{ + _par = new ParameterType(); + initialize(); +} + +template +Batch::Batch(const Batch & other) : BatchImpl(other) +{ + _par = new ParameterType(other.parameter()); + initialize(); } +template class Batch; +} // namespace interface3 +} // namespace zscore +} // namespace normalization +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_sum_batch_fpt_dispatcher.cpp index 3d97846f76d..34a67f8cbc3 100644 --- a/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/normalization/zscore/zscore_dense_sum_batch_fpt_dispatcher.cpp @@ -53,10 +53,7 @@ Batch::Batch(const Batch & other) : BatchImpl(other) _par = new ParameterType(other.parameter()); initialize(); } -template Batch::Batch(); -template Batch::Batch(); -template Batch::Batch(const Batch &); -template Batch::Batch(const Batch &); +template class Batch; } // namespace interface3 } // namespace zscore } // namespace normalization diff --git a/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp index 864a48bac9d..e0c4cfc449a 100644 --- a/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp @@ -33,6 +33,19 @@ namespace adagrad { namespace interface2 { +template +DAAL_EXPORT Batch::Batch(sum_of_functions::BatchPtr objectiveFunction) : parameter(objectiveFunction) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + using BatchType = Batch; template <> diff --git a/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp index ccf756db9de..690fb94aaa7 100644 --- a/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp @@ -33,6 +33,19 @@ namespace lbfgs { namespace interface2 { +template +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : parameter(objectiveFunction) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + using BatchType = Batch; template <> diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp index ec9166cee0e..976a61945d6 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp @@ -33,6 +33,19 @@ namespace sgd { namespace interface2 { +template +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : parameter(objectiveFunction) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + using BatchType = Batch; template <> From bd2287af5579928208882ccf9e99fd273675f876 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 26 Feb 2025 16:44:42 +0100 Subject: [PATCH 110/126] Update sgd_dense_default_batch_fpt_dispatcher.cpp --- .../sgd/sgd_dense_default_batch_fpt_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp index 976a61945d6..248c28a83c0 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp @@ -34,7 +34,7 @@ namespace sgd namespace interface2 { template -DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : parameter(objectiveFunction) +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : input(), parameter(objectiveFunction) { initialize(); } From 6d7fd344fa514f433fe7bf3c683d6ad3f3b5d1ac Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 14:47:26 -0800 Subject: [PATCH 111/126] pca + fixes --- .../optimization_solver/sgd/sgd_batch.h | 10 +++---- .../outlier_detection_bacon.h | 4 +-- .../outlier_detection_multivariate.h | 4 +-- .../outlier_detection_univariate.h | 4 +-- cpp/daal/include/algorithms/pca/pca_batch.h | 6 ++--- .../include/algorithms/pca/pca_distributed.h | 13 ++++------ .../pca/pca_explained_variance_batch.h | 10 +++---- cpp/daal/include/algorithms/pca/pca_online.h | 10 +++---- .../pca/transform/pca_transform_batch.h | 6 ++--- ...d_dense_minibatch_batch_fpt_dispatcher.cpp | 13 ++++++++++ ...gd_dense_momentum_batch_fpt_dispatcher.cpp | 13 ++++++++++ ...ction_bacon_dense_batch_fpt_dispatcher.cpp | 19 ++++++++++++++ ...ate_dense_default_batch_fpt_dispatcher.cpp | 19 ++++++++++++++ ...ate_dense_default_batch_fpt_dispatcher.cpp | 20 +++++++++++++- ..._variance_default_batch_fpt_dispatcher.cpp | 26 +++++++++++++++++++ ...dense_correlation_batch_fpt_dispatcher.cpp | 19 ++++++++++++++ ...correlation_distr_step2_fpt_dispatcher.cpp | 21 +++++++++++++++ ...ense_correlation_online_fpt_dispatcher.cpp | 21 +++++++++++++++ .../pca_dense_svd_batch_fpt_dispatcher.cpp | 19 ++++++++++++++ ...a_dense_svd_distr_step2_fpt_dispatcher.cpp | 20 ++++++++++++++ .../pca_dense_svd_online_fpt_dispatcher.cpp | 20 ++++++++++++++ ...orm_dense_default_batch_fpt_dispatcher.cpp | 24 ++++++++++++++++- 22 files changed, 282 insertions(+), 39 deletions(-) diff --git a/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h b/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h index 5085e882dee..73d30527123 100644 --- a/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h +++ b/cpp/daal/include/algorithms/optimization_solver/sgd/sgd_batch.h @@ -109,11 +109,11 @@ class DAAL_EXPORT Batch : public iterative_solver::Batch Batch(const sum_of_functions::BatchPtr & objectiveFunction = sum_of_functions::BatchPtr()); /** - * Constructs a Stochastic gradient descent algorithm by copying input objects - * of another Stochastic gradient descent algorithm - * \param[in] other An algorithm to be used as the source to initialize the input objects - * and parameters of the algorithm - */ + * Constructs a Stochastic gradient descent algorithm by copying input objects + * of another Stochastic gradient descent algorithm + * \param[in] other An algorithm to be used as the source to initialize the input objects + * and parameters of the algorithm + */ Batch(const Batch & other); /** diff --git a/cpp/daal/include/algorithms/outlier_detection/outlier_detection_bacon.h b/cpp/daal/include/algorithms/outlier_detection/outlier_detection_bacon.h index 551f82ef435..29bf7ae29e1 100644 --- a/cpp/daal/include/algorithms/outlier_detection/outlier_detection_bacon.h +++ b/cpp/daal/include/algorithms/outlier_detection/outlier_detection_bacon.h @@ -99,7 +99,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::bacon_outlier_detection::Result ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm for computing BACON outlier detection by copying input objects and parameters @@ -107,7 +107,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/outlier_detection/outlier_detection_multivariate.h b/cpp/daal/include/algorithms/outlier_detection/outlier_detection_multivariate.h index d9ddc397004..613cfe091d4 100644 --- a/cpp/daal/include/algorithms/outlier_detection/outlier_detection_multivariate.h +++ b/cpp/daal/include/algorithms/outlier_detection/outlier_detection_multivariate.h @@ -98,7 +98,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::multivariate_outlier_detection::Result ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm for computing multivariate outlier detection by copying input objects and parameters @@ -106,7 +106,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/outlier_detection/outlier_detection_univariate.h b/cpp/daal/include/algorithms/outlier_detection/outlier_detection_univariate.h index 628a1c9d475..339f7bdf564 100644 --- a/cpp/daal/include/algorithms/outlier_detection/outlier_detection_univariate.h +++ b/cpp/daal/include/algorithms/outlier_detection/outlier_detection_univariate.h @@ -93,7 +93,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis typedef algorithms::univariate_outlier_detection::Result ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs an algorithm for computing univariate outlier detection by copying input objects and parameters @@ -101,7 +101,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/pca/pca_batch.h b/cpp/daal/include/algorithms/pca/pca_batch.h index 63e80ca6dea..1c553bfbd34 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 Batch : public Analysis +class DAAL_EXPORT Batch : public Analysis { public: typedef algorithms::pca::Input InputType; @@ -113,14 +113,14 @@ class Batch : public Analysis typedef algorithms::pca::Result ResultType; /** Default constructor */ - Batch() { initialize(); } + Batch(); /** * Constructs a PCA algorithm by copying input objects and parameters of another PCA algorithm * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); ~Batch() {} diff --git a/cpp/daal/include/algorithms/pca/pca_distributed.h b/cpp/daal/include/algorithms/pca/pca_distributed.h index 3a80ed2a40a..b9a513cd1b2 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 Distributed : public Analysis +class DAAL_EXPORT Distributed : public Analysis {}; /** @@ -227,17 +227,14 @@ class Distributed : public Analy typedef algorithms::pca::PartialResult PartialResultType; /** Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs a PCA algorithm by copying input objects and parameters of another PCA 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) : input(other.input), parameter(other.parameter) - { - initialize(); - } + Distributed(const Distributed & other); ~Distributed() {} @@ -357,14 +354,14 @@ class Distributed : public Analysis PartialResultType; /** Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs a PCA algorithm by copying input objects and parameters of another PCA 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) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); ~Distributed() {} 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 30f01c150a5..edf0444867f 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 Batch : public daal::algorithms::quality_metric::Batch +class DAAL_EXPORT Batch : public daal::algorithms::quality_metric::Batch { public: typedef algorithms::pca::quality_metric::explained_variance::Input InputType; @@ -95,7 +95,7 @@ class Batch : public daal::algorithms::quality_metric::Batch ParameterType parameter; /*!< Parameters of the algorithm */ /** Default constructor */ - Batch(size_t nFeatures = 0, size_t nComponents = 0) : parameter(nFeatures, nComponents) { initialize(); } + Batch(size_t nFeatures = 0, size_t nComponents = 0); /** * Constructs an algorithm by copying input objects and parameters @@ -103,11 +103,7 @@ class Batch : public daal::algorithms::quality_metric::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : parameter(other.parameter) - { - initialize(); - input.set(eigenvalues, other.input.get(eigenvalues)); - } + Batch(const Batch & other); ~Batch() = default; diff --git a/cpp/daal/include/algorithms/pca/pca_online.h b/cpp/daal/include/algorithms/pca/pca_online.h index 7ad7bf9e06a..b08ce7cadb5 100644 --- a/cpp/daal/include/algorithms/pca/pca_online.h +++ b/cpp/daal/include/algorithms/pca/pca_online.h @@ -133,14 +133,14 @@ class Online : public Analysis typedef algorithms::pca::PartialResult PartialResultType; /** Default constructor */ - Online() { initialize(); } + Online(); /** * Constructs a PCA algorithm by copying input objects and parameters of another PCA algorithm * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : input(other.input), parameter(other.parameter) { initialize(); } + Online(const Online & other); ~Online() {} @@ -250,7 +250,7 @@ class Online : public Analysis * \tparam algorithmFPType Data type to use in intermediate computations of the PCA algorithm, double or float */ template -class Online : public Analysis +class DAAL_EXPORT Online : public Analysis { public: typedef algorithms::pca::Input InputType; @@ -259,14 +259,14 @@ class Online : public Analysis typedef algorithms::pca::PartialResult PartialResultType; /** Default constructor */ - Online() { initialize(); } + Online(); /** * Constructs a PCA algorithm by copying input objects and parameters of another PCA algorithm * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : input(other.input), parameter(other.parameter) { initialize(); } + Online(const Online & other); ~Online() {} 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 6bc71acd04d..3e56fc9c5c8 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 Batch : public daal::algorithms::Analysis +class DAAL_EXPORT Batch : public daal::algorithms::Analysis { public: typedef algorithms::pca::transform::Input InputType; @@ -96,7 +96,7 @@ class Batch : public daal::algorithms::Analysis * Constructs a PCA transformation algorithm * \param[in] nComponents Number of principal components */ - Batch(size_t nComponents = 0) : parameter(nComponents) { initialize(); } + Batch(size_t nComponents = 0); /** * Constructs a PCA transformation algorithm by copying input objects and parameters @@ -104,7 +104,7 @@ class Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp index 5b1bc6fe660..796053ce169 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp @@ -33,6 +33,19 @@ namespace sgd { namespace interface2 { +template +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : input(), parameter(objectiveFunction) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + using BatchType = Batch; template <> diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp index 9ac2ea6b793..6927ce9ce7d 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp @@ -33,6 +33,19 @@ namespace sgd { namespace interface2 { +template +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : input(), parameter(objectiveFunction) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + using BatchType = Batch; template <> diff --git a/cpp/daal/src/algorithms/outlierdetection_bacon/outlierdetection_bacon_dense_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/outlierdetection_bacon/outlierdetection_bacon_dense_batch_fpt_dispatcher.cpp index 4870a0bf844..d6031f2d47f 100644 --- a/cpp/daal/src/algorithms/outlierdetection_bacon/outlierdetection_bacon_dense_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/outlierdetection_bacon/outlierdetection_bacon_dense_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(bacon_outlier_detection::BatchContainer, batch, DAAL_FPTYPE, bacon_outlier_detection::defaultDense) +namespace bacon_outlier_detection +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace bacon_outlier_detection } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp index a299e092c27..2459f9fb4c9 100644 --- a/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp @@ -33,5 +33,24 @@ __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multivariate_outlier_detection::BatchConta * Added to support deprecated baconDense value */ __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multivariate_outlier_detection::BatchContainer, batch, DAAL_FPTYPE, multivariate_outlier_detection::baconDense); +namespace multivariate_outlier_detection +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace multivariate_outlier_detection } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/outlierdetection_univariate/outlierdetection_univariate_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/outlierdetection_univariate/outlierdetection_univariate_dense_default_batch_fpt_dispatcher.cpp index 74fff676970..325fcf9d4b4 100644 --- a/cpp/daal/src/algorithms/outlierdetection_univariate/outlierdetection_univariate_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/outlierdetection_univariate/outlierdetection_univariate_dense_default_batch_fpt_dispatcher.cpp @@ -30,6 +30,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(univariate_outlier_detection::BatchContainer, batch, DAAL_FPTYPE, univariate_outlier_detection::defaultDense) -} // namespace algorithms +namespace univariate_outlier_detection +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace univariate_outlier_detection +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/metrics/pca_explained_variance_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/metrics/pca_explained_variance_default_batch_fpt_dispatcher.cpp index 41828a0a28e..7761f9eae73 100644 --- a/cpp/daal/src/algorithms/pca/metrics/pca_explained_variance_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/metrics/pca_explained_variance_default_batch_fpt_dispatcher.cpp @@ -29,5 +29,31 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::quality_metric::explained_variance::BatchContainer, batch, DAAL_FPTYPE, pca::quality_metric::explained_variance::defaultDense) +namespace pca +{ +namespace quality_metric +{ +namespace explained_variance +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch(size_t nFeatures, size_t nComponents) : parameter(nFeatures, nComponents) +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : parameter(other.parameter) +{ + initialize(); + input.set(eigenvalues, other.input.get(eigenvalues)); +} + +template class Batch; +} // namespace interface1 +} // namespace explained_variance +} // namespace quality_metric +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/pca_dense_correlation_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/pca_dense_correlation_batch_fpt_dispatcher.cpp index 94570afc07c..d12e9dcb3fd 100644 --- a/cpp/daal/src/algorithms/pca/pca_dense_correlation_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/pca_dense_correlation_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::interface3::BatchContainer, batch, DAAL_FPTYPE, pca::correlationDense) +namespace pca +{ +namespace interface3 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface3 +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/pca_dense_correlation_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/pca_dense_correlation_distr_step2_fpt_dispatcher.cpp index a9d318b2459..3afdec14269 100644 --- a/cpp/daal/src/algorithms/pca/pca_dense_correlation_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/pca_dense_correlation_distr_step2_fpt_dispatcher.cpp @@ -30,5 +30,26 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, pca::correlationDense) +namespace pca +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed( + const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/pca_dense_correlation_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/pca_dense_correlation_online_fpt_dispatcher.cpp index abf5078c8e1..6419ddcafe0 100644 --- a/cpp/daal/src/algorithms/pca/pca_dense_correlation_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/pca_dense_correlation_online_fpt_dispatcher.cpp @@ -30,5 +30,26 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::OnlineContainer, online, DAAL_FPTYPE, pca::correlationDense) +namespace pca +{ +namespace interface1 +{ + +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/pca_dense_svd_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/pca_dense_svd_batch_fpt_dispatcher.cpp index e64b6ca7e16..4ec9dd91752 100644 --- a/cpp/daal/src/algorithms/pca/pca_dense_svd_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/pca_dense_svd_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::interface3::BatchContainer, batch, DAAL_FPTYPE, pca::svdDense) +namespace pca +{ +namespace interface3 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); } + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface3 +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/pca_dense_svd_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/pca_dense_svd_distr_step2_fpt_dispatcher.cpp index 39b6a0182df..48fb7d5bf28 100644 --- a/cpp/daal/src/algorithms/pca/pca_dense_svd_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/pca_dense_svd_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, pca::svdDense) +namespace pca +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/pca_dense_svd_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/pca_dense_svd_online_fpt_dispatcher.cpp index 615e6cd29a7..8c8f7c4188f 100644 --- a/cpp/daal/src/algorithms/pca/pca_dense_svd_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/pca_dense_svd_online_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::OnlineContainer, online, DAAL_FPTYPE, pca::svdDense) +namespace pca +{ +namespace interface1 +{ +template +DAAL_EXPORT Online::Online() +{ + initialize(); } + +template +DAAL_EXPORT Online::Online(const Online & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Online; +} // namespace interface1 +} // namespace pca +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pca/transform/pca_transform_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pca/transform/pca_transform_dense_default_batch_fpt_dispatcher.cpp index 2761a7a5842..e9de1c20c15 100644 --- a/cpp/daal/src/algorithms/pca/transform/pca_transform_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pca/transform/pca_transform_dense_default_batch_fpt_dispatcher.cpp @@ -30,5 +30,27 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pca::transform::BatchContainer, batch, DAAL_FPTYPE, pca::transform::defaultDense) +namespace pca +{ +namespace transform +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch(size_t nComponents) : parameter(nComponents) +{ + initialize(); } -} // namespace daal + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface1 +} // namespace transform +} // namespace pca +} // namespace algorithms +} // namespace daal \ No newline at end of file From 85b6d1771a5bed56b729174f590142879e39e760 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 15:45:41 -0800 Subject: [PATCH 112/126] passing first examples --- .../multi_class_classifier_predict.h | 12 +++----- ...lass_classifier_quality_metric_set_batch.h | 2 +- .../multi_class_classifier_train.h | 9 ++---- .../pca/pca_quality_metric_set_batch.h | 2 +- .../algorithms/pivoted_qr/pivoted_qr_batch.h | 4 +-- cpp/daal/include/algorithms/qr/qr_batch.h | 4 +-- .../include/algorithms/qr/qr_distributed.h | 11 ++++--- cpp/daal/include/algorithms/qr/qr_online.h | 6 ++-- .../ridge_regression_predict.h | 6 ++-- ...ier_predict_mccwu_batch_fpt_dispatcher.cpp | 29 ++++++++++++++++++ ...predict_votebased_batch_fpt_dispatcher.cpp | 30 +++++++++++++++++++ ...ain_oneagainstone_batch_fpt_dispatcher.cpp | 30 +++++++++++++++++++ ..._qr_dense_default_batch_fpt_dispatcher.cpp | 19 ++++++++++++ .../qr_dense_default_batch_fpt_dispatcher.cpp | 19 ++++++++++++ ...nse_default_distr_step2_fpt_dispatcher.cpp | 20 +++++++++++++ ...nse_default_distr_step3_fpt_dispatcher.cpp | 20 +++++++++++++ ...qr_dense_default_online_fpt_dispatcher.cpp | 19 ++++++++++++ 17 files changed, 209 insertions(+), 33 deletions(-) diff --git a/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_predict.h b/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_predict.h index 5ce6e12b48a..4ab3f353a3a 100644 --- a/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_predict.h +++ b/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_predict.h @@ -104,7 +104,7 @@ class BatchContainer : public PredictionContainerIface */ template -class Batch : public classifier::prediction::Batch +class DAAL_EXPORT Batch : public classifier::prediction::Batch { public: typedef classifier::prediction::Batch super; @@ -120,13 +120,13 @@ class Batch : public classifier::prediction::Batch * Default constructor * \DAAL_DEPRECATED */ - DAAL_DEPRECATED Batch() : parameter(0) { initialize(); } + DAAL_DEPRECATED Batch(); /** * Default constructor * \param[in] nClasses Number of classes */ - Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + Batch(size_t nClasses); /** * Constructs multi-class classifier prediction algorithm by copying input objects and parameters @@ -134,11 +134,7 @@ class Batch : public classifier::prediction::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) - : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) - { - initialize(); - } + Batch(const Batch & other); virtual ~Batch() {} diff --git a/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_quality_metric_set_batch.h b/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_quality_metric_set_batch.h index f04667cd10a..f253f934881 100644 --- a/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_quality_metric_set_batch.h +++ b/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_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 Batch : public algorithms::quality_metric_set::Batch +class DAAL_EXPORT Batch : public algorithms::quality_metric_set::Batch { public: Parameter parameter; /*!< Parameters of the algorithm */ diff --git a/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_train.h b/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_train.h index 7c09c241008..1f461c95cd8 100644 --- a/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_train.h +++ b/cpp/daal/include/algorithms/multi_class_classifier/multi_class_classifier_train.h @@ -113,13 +113,13 @@ class DAAL_EXPORT Batch : public classifier::training::Batch * Default constructor * \DAAL_DEPRECATED */ - DAAL_DEPRECATED Batch() : parameter(0) { initialize(); } + DAAL_DEPRECATED Batch(); /** * Default constructor * \param[in] nClasses Number of classes */ - Batch(size_t nClasses) : parameter(nClasses) { initialize(); } + Batch(size_t nClasses); /** * Constructs multi-class classifier training algorithm by copying input objects and parameters @@ -127,10 +127,7 @@ class DAAL_EXPORT Batch : public classifier::training::Batch * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : classifier::training::Batch(other), parameter(other.parameter), input(other.input) - { - initialize(); - } + Batch(const Batch & other); ~Batch() {} 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 5c20f19e462..d4adfb141ff 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 Batch : public algorithms::quality_metric_set::Batch +class DAAL_EXPORT Batch : public algorithms::quality_metric_set::Batch { public: Parameter parameter; /*!< Parameters of the algorithm */ diff --git a/cpp/daal/include/algorithms/pivoted_qr/pivoted_qr_batch.h b/cpp/daal/include/algorithms/pivoted_qr/pivoted_qr_batch.h index 70fb9cfbe4b..35689feca2b 100644 --- a/cpp/daal/include/algorithms/pivoted_qr/pivoted_qr_batch.h +++ b/cpp/daal/include/algorithms/pivoted_qr/pivoted_qr_batch.h @@ -91,7 +91,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis InputType input; /*!< Input data structure */ ParameterType parameter; /*!< Pivoted QR parameters structure */ - Batch() { initialize(); } + Batch(); /** * Constructs a pivoted QR decomposition algorithm by copying input objects and parameters @@ -99,7 +99,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/qr/qr_batch.h b/cpp/daal/include/algorithms/qr/qr_batch.h index 64150636704..736f4d5ac85 100644 --- a/cpp/daal/include/algorithms/qr/qr_batch.h +++ b/cpp/daal/include/algorithms/qr/qr_batch.h @@ -91,7 +91,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis InputType input; /*!< Input object */ ParameterType parameter; /*!< QR decomposition parameters */ - Batch() { initialize(); } + Batch(); /** * Constructs a QR decomposition algorithm by copying input objects and parameters @@ -99,7 +99,7 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } + Batch(const Batch & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/qr/qr_distributed.h b/cpp/daal/include/algorithms/qr/qr_distributed.h index f20020079d8..4b803241bed 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 Distributed : public daal::algorithms::Analysis +class DAAL_EXPORT Distributed : public daal::algorithms::Analysis {}; /** @@ -214,15 +214,14 @@ class Distributed : public daal::algorithm InputType input; /*!< Input data structure */ ParameterType parameter; /*!< QR parameters structure */ - Distributed() { initialize(); } - + Distributed(); /** * Constructs a QR decomposition algorithm by copying input objects and parameters * of another QR decomposition 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) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns method of the algorithm @@ -342,7 +341,7 @@ class Distributed : public daal::algorithms ParameterType parameter; /*!< QR parameters */ /** Default constructor */ - Distributed() { initialize(); } + Distributed(); /** * Constructs a QR decomposition algorithm by copying input objects and parameters @@ -350,7 +349,7 @@ class Distributed : public daal::algorithms * \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) : input(other.input), parameter(other.parameter) { initialize(); } + Distributed(const Distributed & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/qr/qr_online.h b/cpp/daal/include/algorithms/qr/qr_online.h index 11a4f124552..b8eee22fe0f 100644 --- a/cpp/daal/include/algorithms/qr/qr_online.h +++ b/cpp/daal/include/algorithms/qr/qr_online.h @@ -85,7 +85,7 @@ class OnlineContainer : public daal::algorithms::AnalysisContainerIface * - \ref Method Computation methods for the QR decomposition algorithm */ template -class Online : public daal::algorithms::Analysis +class DAAL_EXPORT Online : public daal::algorithms::Analysis { public: typedef OnlinePartialResult PartialResult; @@ -99,7 +99,7 @@ class Online : public daal::algorithms::Analysis InputType input; /*!< Input object */ ParameterType parameter; /*!< QR parameters */ - Online() { initialize(); } + Online(); /** * Constructs a QR decomposition algorithm by copying input objects and parameters @@ -107,7 +107,7 @@ class Online : public daal::algorithms::Analysis * \param[in] other An algorithm to be used as the source to initialize the input objects * and parameters of the algorithm */ - Online(const Online & other) : input(other.input), parameter(other.parameter) { initialize(); } + Online(const Online & other); /** * Returns method of the algorithm diff --git a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h index 2eecda79131..c34f8b245d7 100644 --- a/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h +++ b/cpp/daal/include/algorithms/ridge_regression/ridge_regression_predict.h @@ -143,10 +143,8 @@ class DAAL_EXPORT Batch void initialize() { - this->_ac = new __DAAL_ALGORITHM_CONTAINER(batch, linear_model::prediction::BatchContainer, algorithmFPType, - linear_model::prediction::defaultDense)(&(this->_env)); - this->_in = &input; - this->_par = NULL; + super::initialize(); + this->_in = &input; this->_result.reset(new ResultType()); } diff --git a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp index acc606a5235..dc86bb7f057 100644 --- a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp @@ -30,6 +30,35 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multi_class_classifier::prediction::BatchContainer, batch, DAAL_FPTYPE, multi_class_classifier::prediction::multiClassClassifierWu, multi_class_classifier::training::oneAgainstOne) +namespace multi_class_classifier +{ +namespace prediction +{ +namespace interface2 +{ + +template +DAAL_DEPRECATED Batch::Batch() : parameter(0) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} +template class Batch; +} // namespace interface2 +} // namespace prediction +} // namespace multi_class_classifier } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp index e1bb11512bd..a6fe2d07c86 100644 --- a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp @@ -30,5 +30,35 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multi_class_classifier::prediction::BatchContainer, batch, DAAL_FPTYPE, multi_class_classifier::prediction::voteBased, multi_class_classifier::training::oneAgainstOne) +namespace multi_class_classifier +{ +namespace prediction +{ +namespace interface2 +{ + +template +DAAL_DEPRECATED Batch::Batch() : parameter(0) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace prediction +} // namespace multi_class_classifier } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp index a58d5ebd517..adaa8dbf3e5 100644 --- a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp @@ -30,5 +30,35 @@ namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(multi_class_classifier::training::BatchContainer, batch, DAAL_FPTYPE, multi_class_classifier::training::oneAgainstOne) +namespace multi_class_classifier +{ +namespace training +{ +namespace interface2 +{ + +template +DAAL_DEPRECATED Batch::Batch() : parameter(0) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) + : classifier::training::Batch(other), parameter(other.parameter), input(other.input) +{ + initialize(); +} + +template class Batch; +} // namespace interface2 +} // namespace training +} // namespace multi_class_classifier } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/pivoted_qr/pivoted_qr_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/pivoted_qr/pivoted_qr_dense_default_batch_fpt_dispatcher.cpp index 3fe204a4625..27abf0a20a5 100644 --- a/cpp/daal/src/algorithms/pivoted_qr/pivoted_qr_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/pivoted_qr/pivoted_qr_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(pivoted_qr::BatchContainer, batch, DAAL_FPTYPE, pivoted_qr::defaultDense) +namespace pivoted_qr +{ +namespace interface1 +{ +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Batch; +} //namespace interface1 +} //namespace pivoted_qr } //namespace algorithms } //namespace daal diff --git a/cpp/daal/src/algorithms/qr/qr_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/qr/qr_dense_default_batch_fpt_dispatcher.cpp index 738901e277d..cb0ac01d64c 100644 --- a/cpp/daal/src/algorithms/qr/qr_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/qr/qr_dense_default_batch_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(qr::BatchContainer, batch, DAAL_FPTYPE, qr::defaultDense) +namespace qr +{ +namespace interface1 +{ + +template +DAAL_EXPORT Batch::Batch() +{ + initialize(); +} + +template +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +{ + initialize(); } +template class Batch; +} // namespace interface1 +} // namespace qr +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step2_fpt_dispatcher.cpp index 9d13641f6e3..22d7d194b79 100644 --- a/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step2_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(qr::DistributedContainer, distributed, step2Master, DAAL_FPTYPE, qr::defaultDense) +namespace qr +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace qr +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step3_fpt_dispatcher.cpp index a943366950f..bcbc145f91b 100644 --- a/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/qr/qr_dense_default_distr_step3_fpt_dispatcher.cpp @@ -28,5 +28,25 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(qr::DistributedContainer, distributed, step3Local, DAAL_FPTYPE, qr::defaultDense) +namespace qr +{ +namespace interface1 +{ +template +Distributed::Distributed() +{ + initialize(); } + +template +Distributed::Distributed(const Distributed & other) + : input(other.input), parameter(other.parameter) +{ + initialize(); +} + +template class Distributed; +} // namespace interface1 +} // namespace qr +} // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/qr/qr_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/qr/qr_dense_default_online_fpt_dispatcher.cpp index 4e3bf4e79a8..12ed02f7db1 100644 --- a/cpp/daal/src/algorithms/qr/qr_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/qr/qr_dense_default_online_fpt_dispatcher.cpp @@ -28,5 +28,24 @@ namespace daal namespace algorithms { __DAAL_INSTANTIATE_DISPATCH_CONTAINER(qr::OnlineContainer, online, DAAL_FPTYPE, qr::defaultDense) +namespace qr +{ +namespace interface1 +{ + +template +DAAL_EXPORT Online::Online() +{ + initialize(); +} + +template +DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +{ + initialize(); } +template class Online; +} // namespace interface1 +} // namespace qr +} // namespace algorithms } // namespace daal From cb27c8b7fe306e5b39baa5a12ccd470157eb49a1 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 17:06:18 -0800 Subject: [PATCH 113/126] final work --- .../algorithms/kernel_function/kernel_function_rbf.h | 6 +++--- .../adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp | 2 ++ ...oordinate_descent_dense_default_batch_fpt_dispatcher.cpp | 2 ++ .../lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp | 2 ++ .../saga/saga_dense_default_batch_fpt_dispatcher.cpp | 3 +++ .../sgd/sgd_dense_default_batch_fpt_dispatcher.cpp | 1 + .../sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp | 1 + .../sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp | 1 + ...tion_multivariate_dense_default_batch_fpt_dispatcher.cpp | 1 + 9 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h b/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h index ba047f5fe78..1213e66c1e8 100644 --- a/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h +++ b/cpp/daal/include/algorithms/kernel_function/kernel_function_rbf.h @@ -139,9 +139,9 @@ class DAAL_EXPORT Batch : public KernelIface protected: void initialize() { - Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env); - _in = &input; - _par = ¶meter; + _ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env); + _in = &input; + _par = ¶meter; } virtual Batch * cloneImpl() const DAAL_C11_OVERRIDE { return new Batch(*this); } diff --git a/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp index e0c4cfc449a..5e2f407e954 100644 --- a/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/adagrad/adagrad_dense_default_batch_fpt_dispatcher.cpp @@ -53,6 +53,8 @@ services::SharedPtr BatchType::create() { return services::SharedPtr(new BatchType()); } + +template class Batch; } // namespace interface2 } // namespace adagrad } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp index b33de387165..55b34ba22c6 100644 --- a/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp @@ -55,6 +55,8 @@ services::SharedPtr BatchType::create() { return services::SharedPtr(new BatchType()); } + +template class DAAL_EXPORT Batch; } // namespace interface1 } // namespace coordinate_descent } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp index 690fb94aaa7..2a65218c39d 100644 --- a/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp @@ -53,6 +53,8 @@ services::SharedPtr BatchType::create() { return services::SharedPtr(new BatchType()); } + +template class DAAL_EXPORT Batch; } // namespace interface2 } // namespace lbfgs } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp index 3517fa462b6..c52963d2a98 100644 --- a/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp @@ -54,6 +54,9 @@ services::SharedPtr BatchType::create() { return services::SharedPtr(new BatchType()); } + +template class DAAL_EXPORT Batch; + } // namespace interface2 } // namespace saga } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp index 248c28a83c0..aa3922afe7e 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp @@ -54,6 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } +template class DAAL_EXPORT Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp index 796053ce169..65a3e398d41 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp @@ -54,6 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } +template class DAAL_EXPORT Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp index 6927ce9ce7d..67cad826f4d 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp @@ -54,6 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } +template class DAAL_EXPORT Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp index 2459f9fb4c9..e6fb9d526a4 100644 --- a/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/outlierdetection_multivariate/outlierdetection_multivariate_dense_default_batch_fpt_dispatcher.cpp @@ -50,6 +50,7 @@ DAAL_EXPORT Batch::Batch(const Batch; +template class Batch; } // namespace interface1 } // namespace multivariate_outlier_detection } // namespace algorithms From 84ef6c172587540e5f50865e9dd80255c63aff9b Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 17:18:18 -0800 Subject: [PATCH 114/126] attempt to see if this influences missing symbols --- cpp/oneapi/dal/detail/cpu.cpp | 3 ++- cpp/oneapi/dal/detail/parameters/system_parameters.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/oneapi/dal/detail/cpu.cpp b/cpp/oneapi/dal/detail/cpu.cpp index 1369da2d231..3494e0f30ce 100644 --- a/cpp/oneapi/dal/detail/cpu.cpp +++ b/cpp/oneapi/dal/detail/cpu.cpp @@ -14,13 +14,14 @@ * limitations under the License. *******************************************************************************/ +#include "oneapi/dal/common.hpp" #include "oneapi/dal/detail/cpu.hpp" #include namespace oneapi::dal::detail { namespace v1 { -cpu_extension from_daal_cpu_type(int cpu_type) { +ONEDAL_EXPORT cpu_extension from_daal_cpu_type(int cpu_type) { daal::CpuType cpu = static_cast(cpu_type); switch (cpu) { #if defined(TARGET_X86_64) diff --git a/cpp/oneapi/dal/detail/parameters/system_parameters.hpp b/cpp/oneapi/dal/detail/parameters/system_parameters.hpp index b173edbfbf7..eb35c79bd82 100644 --- a/cpp/oneapi/dal/detail/parameters/system_parameters.hpp +++ b/cpp/oneapi/dal/detail/parameters/system_parameters.hpp @@ -30,7 +30,7 @@ namespace detail { /// /// `cpu_info` reports the parameters available in hardware, where `system_parameters` /// are the software-enabled parameters that can differ from `cpu_info`. -class system_parameters : public base { +class ONEDAL_EXPORT system_parameters : public base { public: /// Creates a new default `system_parameters` instance. explicit system_parameters(); From e2851bec5070406cff10869e085242e3cda80026 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 27 Feb 2025 07:14:19 +0100 Subject: [PATCH 115/126] Update coordinate_descent_dense_default_batch_fpt_dispatcher.cpp --- .../coordinate_descent_dense_default_batch_fpt_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp index 55b34ba22c6..d616c44a172 100644 --- a/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/coordinate_descent/coordinate_descent_dense_default_batch_fpt_dispatcher.cpp @@ -56,7 +56,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } -template class DAAL_EXPORT Batch; +template class Batch; } // namespace interface1 } // namespace coordinate_descent } // namespace optimization_solver From 338785caf5d7db83b2e651c27a1d4b3ab826b470 Mon Sep 17 00:00:00 2001 From: icfaust Date: Wed, 26 Feb 2025 23:26:01 -0800 Subject: [PATCH 116/126] fix DAAL_EXPORT --- .../lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp | 2 +- .../saga/saga_dense_default_batch_fpt_dispatcher.cpp | 2 +- .../sgd/sgd_dense_default_batch_fpt_dispatcher.cpp | 2 +- .../sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp | 2 +- .../sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp index 2a65218c39d..39868b4dddd 100644 --- a/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/lbfgs/lbfgs_dense_default_batch_fpt_dispatcher.cpp @@ -54,7 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } -template class DAAL_EXPORT Batch; +template class Batch; } // namespace interface2 } // namespace lbfgs } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp index c52963d2a98..6322de823ed 100644 --- a/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/saga/saga_dense_default_batch_fpt_dispatcher.cpp @@ -55,7 +55,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } -template class DAAL_EXPORT Batch; +template class Batch; } // namespace interface2 } // namespace saga diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp index aa3922afe7e..d8f9763e1c2 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_default_batch_fpt_dispatcher.cpp @@ -54,7 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } -template class DAAL_EXPORT Batch; +template class Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp index 65a3e398d41..cf824bd9bfd 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp @@ -54,7 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } -template class DAAL_EXPORT Batch; +template class Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp index 67cad826f4d..ba3196ebce5 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp @@ -54,7 +54,7 @@ services::SharedPtr BatchType::create() return services::SharedPtr(new BatchType()); } -template class DAAL_EXPORT Batch; +template class Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver From eef6c6eb8bdee91ee156ea108b7d448c353b669b Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 01:45:34 -0800 Subject: [PATCH 117/126] clang fixes part 1 --- ...edict_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++---- ...train_dense_default_batch_fpt_dispatcher.cpp | 10 ++++++---- ...assoc_rules_apriori_batch_fpt_dispatcher.cpp | 11 +++++------ ...edict_dense_default_batch_fpt_dispatcher.cpp | 5 +++-- ...train_dense_default_batch_fpt_dispatcher.cpp | 8 +++----- ...lesky_dense_default_batch_fpt_dispatcher.cpp | 11 +++++------ ...atrix_dense_default_batch_fpt_dispatcher.cpp | 10 +++++----- ...atrix_dense_default_batch_fpt_dispatcher.cpp | 10 +++++----- ...tance_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...tance_dense_default_batch_fpt_dispatcher.cpp | 10 +++++----- ...covariance_csr_fast_batch_fpt_dispatcher.cpp | 11 ++++++----- ...ovariance_csr_fast_online_fpt_dispatcher.cpp | 11 ++++++----- ...ance_csr_singlepass_batch_fpt_dispatcher.cpp | 11 ++++++----- ...nce_csr_singlepass_online_fpt_dispatcher.cpp | 11 ++++++----- .../covariance_csr_sum_batch_fpt_dispatcher.cpp | 11 ++++++----- ...covariance_csr_sum_online_fpt_dispatcher.cpp | 11 ++++++----- ...iance_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...ance_dense_default_online_fpt_dispatcher.cpp | 11 ++++++----- ...ce_dense_singlepass_batch_fpt_dispatcher.cpp | 11 ++++++----- ...e_dense_singlepass_online_fpt_dispatcher.cpp | 11 ++++++----- ...ovariance_dense_sum_batch_fpt_dispatcher.cpp | 11 ++++++----- ...variance_dense_sum_online_fpt_dispatcher.cpp | 11 ++++++----- ...ost_predict_dense_default_fpt_dispatcher.cpp | 4 ++-- ...logitboost_train_friedman_fpt_dispatcher.cpp | 10 +++++----- ...sgd_dense_minibatch_batch_fpt_dispatcher.cpp | 17 ++++++++--------- .../sgd_dense_momentum_batch_fpt_dispatcher.cpp | 17 ++++++++--------- ...edict_dense_default_batch_fpt_dispatcher.cpp | 3 ++- ...train_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- 28 files changed, 148 insertions(+), 135 deletions(-) diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_dispatcher.cpp index db1e83dd471..9c67aced9e3 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_predict_dense_default_batch_fpt_dispatcher.cpp @@ -39,7 +39,7 @@ namespace prediction namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); parameter().nClasses = nClasses; @@ -48,14 +48,14 @@ Batch::Batch(size_t nClasses) using BatchTypeDefault = Batch; template <> -Batch::Batch(const BatchTypeDefault & other) +DAAL_EXPORT Batch::Batch(const BatchTypeDefault & other) : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); parameter().nClasses = nClasses; @@ -64,11 +64,13 @@ Batch::Batch(size_t nClasses) using BatchTypeSammeR = Batch; template <> -Batch::Batch(const BatchTypeSammeR & other) : classifier::prediction::Batch(other), input(other.input) +DAAL_EXPORT Batch::Batch(const BatchTypeSammeR & other) + : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } + } // namespace interface2 } // namespace prediction } // namespace adaboost diff --git a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp index 417676c3c89..e621db3437a 100644 --- a/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/adaboost/adaboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -39,21 +39,23 @@ namespace training namespace interface2 { template -DAAL_EXPORT Batch::Batch(size_t nClasses) +Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); } template -DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) +Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } -template class Batch; -template class Batch; +template DAAL_EXPORT Batch::Batch(size_t nClasses); +template DAAL_EXPORT Batch::Batch(const Batch & other); +template DAAL_EXPORT Batch::Batch(size_t nClasses); +template DAAL_EXPORT Batch::Batch(const Batch & other); } // namespace interface2 } // namespace training diff --git a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp index 03a58ec5e6b..96e7363e993 100644 --- a/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/assocrules/assoc_rules_apriori_batch_fpt_dispatcher.cpp @@ -34,19 +34,18 @@ namespace association_rules { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } - -template class Batch; } // namespace interface1 } // namespace association_rules } // namespace algorithms diff --git a/cpp/daal/src/algorithms/brownboost/brownboost_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/brownboost/brownboost_predict_dense_default_batch_fpt_dispatcher.cpp index 6ef32a4a4fe..4350d3abf54 100644 --- a/cpp/daal/src/algorithms/brownboost/brownboost_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/brownboost/brownboost_predict_dense_default_batch_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace prediction namespace interface2 { template <> -Batch::Batch() +DAAL_EXPORT Batch::Batch() { _par = new ParameterType(); initialize(); @@ -46,7 +46,8 @@ Batch::Batch() using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input) +DAAL_EXPORT Batch::Batch(const BatchType & other) + : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/brownboost/brownboost_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/brownboost/brownboost_train_dense_default_batch_fpt_dispatcher.cpp index 381b71ec178..dfb56dbcd81 100644 --- a/cpp/daal/src/algorithms/brownboost/brownboost_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/brownboost/brownboost_train_dense_default_batch_fpt_dispatcher.cpp @@ -59,13 +59,11 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -template Batch::Batch(); -template Batch::Batch(size_t nClasses); -template Batch::Batch(const Batch &); - +template DAAL_EXPORT Batch::Batch(); +template DAAL_EXPORT Batch::Batch(size_t nClasses); +template DAAL_EXPORT Batch::Batch(const Batch & other); } // namespace interface2 } // namespace training } // namespace brownboost - } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp index 2737decd6e6..880394f1b46 100644 --- a/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cholesky/cholesky_dense_default_batch_fpt_dispatcher.cpp @@ -31,19 +31,18 @@ namespace cholesky { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +using BatchType = Batch; +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { initialize(); } - -template class Batch; } // namespace interface1 } // namespace cholesky } // namespace algorithms diff --git a/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp index a83d7a6f7cd..3123498e76f 100644 --- a/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/classifier/binary_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp @@ -37,19 +37,19 @@ namespace binary_confusion_matrix { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace binary_confusion_matrix } // namespace quality_metric diff --git a/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp index 724845e58c9..a3183078f7d 100644 --- a/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/classifier/multiclass_confusion_matrix_dense_default_batch_fpt_dispatcher.cpp @@ -37,19 +37,19 @@ namespace multiclass_confusion_matrix { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace multiclass_confusion_matrix } // namespace quality_metric diff --git a/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp index 31a12c01be0..54ffca9101e 100644 --- a/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cordistance/cordistance_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace correlation_distance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { initialize(); } -template class Batch; } // namespace interface1 } // namespace correlation_distance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp index 65b2586014a..1d1177a9040 100644 --- a/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/cosdistance/cosdistance_dense_default_batch_fpt_dispatcher.cpp @@ -33,19 +33,19 @@ namespace cosine_distance namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input) +using BatchType = Batch; +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { initialize(); } -template class Batch; } // namespace interface1 } // namespace cosine_distance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp index c1ed75ff194..64d56ec0c9b 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_batch_fpt_dispatcher.cpp @@ -33,19 +33,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp index 00c8c200a38..ef00d71b322 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : OnlineImpl(other) { initialize(); } -template class Online; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp index 19e6e846015..2c5c5da238e 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp index 01f73032980..fe2e92eb5bd 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : OnlineImpl(other) { initialize(); } -template class Online; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp index 38500b98f6a..0ef8ade7e30 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp index a52149376cf..4cd237c8f45 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_online_fpt_dispatcher.cpp @@ -33,19 +33,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : OnlineImpl(other) { initialize(); } -template class Online; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp index 3420b031abb..b95d46439a2 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_batch_fpt_dispatcher.cpp @@ -33,19 +33,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp index 738330abe61..0360e2036e3 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : OnlineImpl(other) { initialize(); } -template class Online; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp index 6ad35da2371..6f2cda691ee 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp index 5e39dedee43..376544dc7b4 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : OnlineImpl(other) { initialize(); } -template class Online; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp index 414f35c6bb2..8be50dc3093 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp index 0919e7f8f38..55418085145 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_online_fpt_dispatcher.cpp @@ -33,19 +33,20 @@ namespace covariance { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : OnlineImpl(other) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : OnlineImpl(other) { initialize(); } -template class Online; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp index df837a95ca3..2d81a18dbd8 100644 --- a/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/logitboost/logitboost_predict_dense_default_fpt_dispatcher.cpp @@ -39,7 +39,7 @@ namespace prediction namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(); parameter().nClasses = nClasses; @@ -48,7 +48,7 @@ Batch::Batch(size_t nClasses) using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp index c58ff0c70f6..d6ae081313c 100644 --- a/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/logitboost/logitboost_train_friedman_fpt_dispatcher.cpp @@ -35,22 +35,22 @@ namespace training { namespace interface2 { -template -Batch::Batch(size_t nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(); initialize(); parameter().nClasses = nClasses; } -template -Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) +using BatchType = Batch; +template <> +DAAL_EXPORT BatchType::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } -template class Batch; } // namespace interface2 } // namespace training } // namespace logitboost diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp index cf824bd9bfd..593c12c66f8 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_minibatch_batch_fpt_dispatcher.cpp @@ -33,28 +33,27 @@ namespace sgd { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : input(), parameter(objectiveFunction) +template <> +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) + : input(), parameter(objectiveFunction) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -using BatchType = Batch; - template <> -services::SharedPtr BatchType::create() +services::SharedPtr DAAL_EXPORT BatchType::create() { return services::SharedPtr(new BatchType()); } -template class Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp index ba3196ebce5..5032e68549d 100644 --- a/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/optimization_solver/sgd/sgd_dense_momentum_batch_fpt_dispatcher.cpp @@ -33,28 +33,27 @@ namespace sgd { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) : input(), parameter(objectiveFunction) +template <> +DAAL_EXPORT Batch::Batch(const sum_of_functions::BatchPtr & objectiveFunction) + : input(), parameter(objectiveFunction) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : iterative_solver::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -using BatchType = Batch; - template <> -services::SharedPtr BatchType::create() +services::SharedPtr DAAL_EXPORT BatchType::create() { return services::SharedPtr(new BatchType()); } -template class Batch; } // namespace interface2 } // namespace sgd } // namespace optimization_solver diff --git a/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp index f861f47e214..a8b3b04f88e 100644 --- a/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -53,7 +53,8 @@ Batch::Batch(const Batch & other) : classifier::predict initialize(); } -template class Batch; +template DAAL_EXPORT Batch::Batch(size_t nClasses); +template DAAL_EXPORT Batch::Batch(const Batch & other); } // namespace interface1 } // namespace prediction diff --git a/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp index 5870eabd870..9fc54b5b366 100644 --- a/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/stump/stump_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -53,8 +53,8 @@ Batch::Batch(const Batch & other) : classifier::trainin initialize(); } -template class Batch; - +template DAAL_EXPORT Batch::Batch(size_t nClasses); +template DAAL_EXPORT Batch::Batch(const Batch & other); } // namespace interface1 } // namespace training } // namespace classification From 5d970073d4a17ccf33995ae97739aebe21107341 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 02:49:59 -0800 Subject: [PATCH 118/126] another round of hell --- cpp/daal/src/algorithms/algorithm_base_impl.cpp | 10 +++++----- ...ovariance_csr_fast_distr_step2_fpt_dispatcher.cpp | 11 ++++++----- ...nce_csr_singlepass_distr_step2_fpt_dispatcher.cpp | 11 ++++++----- ...covariance_csr_sum_distr_step2_fpt_dispatcher.cpp | 11 ++++++----- ...ance_dense_default_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...e_dense_singlepass_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...variance_dense_sum_distr_step2_fpt_dispatcher.cpp | 11 ++++++----- 7 files changed, 41 insertions(+), 37 deletions(-) diff --git a/cpp/daal/src/algorithms/algorithm_base_impl.cpp b/cpp/daal/src/algorithms/algorithm_base_impl.cpp index 0f774c1e5dc..86f2cea98d4 100644 --- a/cpp/daal/src/algorithms/algorithm_base_impl.cpp +++ b/cpp/daal/src/algorithms/algorithm_base_impl.cpp @@ -232,7 +232,7 @@ void AlgorithmImpl::setHostApp(const services::HostAppIfacePtr & pHost) /** * Computes final results of the algorithm in the %batch mode without possibility of throwing an exception. */ -services::Status AlgorithmImpl::computeNoThrow() +services::Status DAAL_EXPORT AlgorithmImpl::computeNoThrow() { this->setParameter(); @@ -277,17 +277,17 @@ services::Status AlgorithmImpl::computeNoThrow() return s; } -services::HostAppIfacePtr AlgorithmImpl::hostApp() +services::HostAppIfacePtr DAAL_EXPORT AlgorithmImpl::hostApp() { return this->_in ? services::internal::getHostApp(*this->_in) : services::HostAppIfacePtr(); } -void AlgorithmImpl::setHostApp(const services::HostAppIfacePtr & pHost) +void DAAL_EXPORT AlgorithmImpl::setHostApp(const services::HostAppIfacePtr & pHost) { if (this->_in) services::internal::setHostApp(pHost, *this->_in); } -template class interface1::AlgorithmImpl; -template class interface1::AlgorithmImpl; +template class DAAL_EXPORT interface1::AlgorithmImpl; +template class DAAL_EXPORT interface1::AlgorithmImpl; } // namespace algorithms } // namespace daal diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp index aa120177b35..e4786eb53a7 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,21 @@ namespace covariance { namespace interface1 { -template -Distributed::Distributed() +template <> +DAAL_EXPORT Distributed::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp index 0ba339e9d34..0445213d4a1 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,21 @@ namespace covariance { namespace interface1 { -template -Distributed::Distributed() +template <> +DAAL_EXPORT Distributed::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp index eb610930e40..807bed0cdec 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,21 @@ namespace covariance { namespace interface1 { -template -Distributed::Distributed() +template <> +DAAL_EXPORT Distributed::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp index 80a1f15fba1..6fbeafaaa78 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_default_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,20 @@ namespace covariance { namespace interface1 { -template -Distributed::Distributed() +template <> +DAAL_EXPORT Distributed::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : DistributedIface(other) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp index 79c2f430b75..d62df1c2db7 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_singlepass_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,20 @@ namespace covariance { namespace interface1 { -template -Distributed::Distributed() +template <> +DAAL_EXPORT Distributed::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : DistributedIface(other) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp index da346bd63e5..e055dae2802 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,21 @@ namespace covariance { namespace interface1 { -template -Distributed::Distributed() +template <> +DAAL_EXPORT Distributed::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace covariance } // namespace algorithms From da247217740332b20601b607670146ce2150ce36 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 03:56:12 -0800 Subject: [PATCH 119/126] further fixes for clang --- ...ce_csr_fast_distr_step2_fpt_dispatcher.cpp | 3 +-- ..._singlepass_distr_step2_fpt_dispatcher.cpp | 3 +-- ...nce_csr_sum_distr_step2_fpt_dispatcher.cpp | 3 +-- ...e_dense_sum_distr_step2_fpt_dispatcher.cpp | 3 +-- ...can_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...se_default_distr_step10_fpt_dispatcher.cpp | 4 ++-- ...se_default_distr_step11_fpt_dispatcher.cpp | 4 ++-- ...se_default_distr_step12_fpt_dispatcher.cpp | 4 ++-- ...se_default_distr_step13_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step3_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step4_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step5_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step6_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step7_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step8_fpt_dispatcher.cpp | 4 ++-- ...nse_default_distr_step9_fpt_dispatcher.cpp | 4 ++-- ...ict_dense_default_batch_fpt_dispatcher.cpp | 14 +++++++------ ...ain_dense_default_batch_fpt_dispatcher.cpp | 12 +++++------ ...ict_dense_default_batch_fpt_dispatcher.cpp | 11 +++++----- ...ain_dense_default_batch_fpt_dispatcher.cpp | 12 +++++------ ...lli_dense_default_batch_fpt_dispatcher.cpp | 11 +++++----- ...mal_dense_default_batch_fpt_dispatcher.cpp | 11 +++++----- ...orm_dense_default_batch_fpt_dispatcher.cpp | 11 +++++----- ...ict_dense_default_batch_fpt_dispatcher.cpp | 5 ++--- ...ain_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...cation_train_hist_batch_fpt_dispatcher.cpp | 4 ++-- ...ict_dense_default_batch_fpt_dispatcher.cpp | 11 +++++----- ...ain_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...ict_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...ain_dense_default_batch_fpt_dispatcher.cpp | 7 +++---- ...ict_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...ain_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- cpp/daal/src/services/service_defines.h | 20 +++++++++---------- 35 files changed, 109 insertions(+), 108 deletions(-) diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp index e4786eb53a7..b561871e163 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -41,8 +41,7 @@ DAAL_EXPORT Distributed::Distribu using DistributedType = Distributed; template <> -DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) - : DistributedIface(other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp index 0445213d4a1..6461acebea0 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_singlepass_distr_step2_fpt_dispatcher.cpp @@ -41,8 +41,7 @@ DAAL_EXPORT Distributed::Di using DistributedType = Distributed; template <> -DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) - : DistributedIface(other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } diff --git a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp index 807bed0cdec..cd721627512 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_csr_sum_distr_step2_fpt_dispatcher.cpp @@ -41,8 +41,7 @@ DAAL_EXPORT Distributed::Distribut using DistributedType = Distributed; template <> -DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) - : DistributedIface(other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } diff --git a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp index e055dae2802..4c501641afb 100644 --- a/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/covariance/covariance_dense_sum_distr_step2_fpt_dispatcher.cpp @@ -41,8 +41,7 @@ DAAL_EXPORT Distributed::Distrib using DistributedType = Distributed; template <> -DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) - : DistributedIface(other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedIface(other) { initialize(); } diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_batch_fpt_dispatcher.cpp index 76f4912dd34..d2fcf37d97c 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_batch_fpt_dispatcher.cpp @@ -34,7 +34,7 @@ namespace dbscan namespace interface1 { template <> -Batch::Batch(DAAL_FPTYPE epsilon, size_t minObservations) +DAAL_EXPORT Batch::Batch(DAAL_FPTYPE epsilon, size_t minObservations) { _par = new ParameterType(epsilon, minObservations); initialize(); @@ -42,7 +42,7 @@ Batch::Batch(DAAL_FPTYPE epsilon, size_t minO using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT Batch::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step10_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step10_fpt_dispatcher.cpp index fa2269e85c8..efda2d0be20 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step10_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step10_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step11_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step11_fpt_dispatcher.cpp index 458c3211e73..9c76a9df5e3 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step11_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step11_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step12_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step12_fpt_dispatcher.cpp index 77dde8229f2..6a1f2b7015c 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step12_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step12_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step13_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step13_fpt_dispatcher.cpp index 8671428eb7a..2e10163fd97 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step13_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step13_fpt_dispatcher.cpp @@ -37,13 +37,13 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed() +DAAL_EXPORT DistributedType::Distributed() { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { initialize(); } diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step1_fpt_dispatcher.cpp index 06a7314ab24..197c6e5839f 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step1_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step2_fpt_dispatcher.cpp index 21203009489..14dd4471360 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step2_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step3_fpt_dispatcher.cpp index b8ea87b6bab..8a82f01ac99 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step3_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t leftBlocks, size_t rightBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t leftBlocks, size_t rightBlocks) { ParameterType * par = new ParameterType(); par->leftBlocks = leftBlocks; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t leftBlocks, size_t rightBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step4_fpt_dispatcher.cpp index 346bf29b3bb..b01107414de 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step4_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t leftBlocks, size_t rightBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t leftBlocks, size_t rightBlocks) { ParameterType * par = new ParameterType(); par->leftBlocks = leftBlocks; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t leftBlocks, size_t rightBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step5_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step5_fpt_dispatcher.cpp index b06c4712c29..287050aa5aa 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step5_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step5_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks, DAAL_FPTYPE epsilon) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks, DAAL_FPTYPE epsilon) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -49,7 +49,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks, DAAL_FPTYPE epsi } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step6_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step6_fpt_dispatcher.cpp index 92206b36ca3..570b23d47b5 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step6_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step6_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks, DAAL_FPTYPE epsilon, size_t minObservations) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks, DAAL_FPTYPE epsilon, size_t minObservations) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -50,7 +50,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks, DAAL_FPTYPE epsi } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step7_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step7_fpt_dispatcher.cpp index 341ea2798b5..6c281507e6d 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step7_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step7_fpt_dispatcher.cpp @@ -37,13 +37,13 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed() +DAAL_EXPORT DistributedType::Distributed() { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { initialize(); } diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step8_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step8_fpt_dispatcher.cpp index 9734fd3c445..3a84b8a4006 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step8_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step8_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t blockIndex, size_t nBlocks) +DAAL_EXPORT DistributedType::Distributed(size_t blockIndex, size_t nBlocks) { ParameterType * par = new ParameterType(); par->blockIndex = blockIndex; @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t blockIndex, size_t nBlocks) } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step9_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step9_fpt_dispatcher.cpp index 128ee8e3b5f..0a2c2a0a8a5 100644 --- a/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step9_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dbscan/dbscan_dense_default_distr_step9_fpt_dispatcher.cpp @@ -37,13 +37,13 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed() +DAAL_EXPORT DistributedType::Distributed() { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input) { initialize(); } diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp index d7f5127ada9..7c6cb4d5eca 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -38,19 +38,21 @@ namespace prediction { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : classifier::prediction::Batch(), input(), parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) + : classifier::prediction::Batch(), input(), parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; + } // namespace interface2 } // namespace prediction } // namespace classification diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp index ab642d04909..3959f5d1059 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -37,19 +37,19 @@ namespace training { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::training::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace training diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp index 76334371733..f3d866eddea 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -38,19 +38,20 @@ namespace prediction { namespace interface2 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : algorithms::regression::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace prediction diff --git a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp index e878016c303..33bfad69a4d 100644 --- a/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/decision_tree/decision_tree_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -37,19 +37,19 @@ namespace training { namespace interface2 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : algorithms::regression::training::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace training diff --git a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp index 4664f7d6468..d62c93d6e88 100644 --- a/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/bernoulli/bernoulli_dense_default_batch_fpt_dispatcher.cpp @@ -33,19 +33,20 @@ namespace bernoulli { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(algorithmFPType p) : parameter(p) +template <> +DAAL_EXPORT Batch::Batch(DAAL_FPTYPE p) : parameter(p) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace bernoulli } // namespace distributions diff --git a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp index f7c94123f0f..67daa7024b4 100644 --- a/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/normal/normal_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace normal { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType sigma) : parameter(a, sigma) +template <> +DAAL_EXPORT Batch::Batch(DAAL_FPTYPE a, DAAL_FPTYPE sigma) : parameter(a, sigma) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace normal } // namespace distributions diff --git a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp index 46d5c7b7613..af34940990d 100644 --- a/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/distributions/uniform/uniform_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace uniform { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(algorithmFPType a, algorithmFPType b) : parameter(a, b) +template <> +DAAL_EXPORT Batch::Batch(DAAL_FPTYPE a, DAAL_FPTYPE b) : parameter(a, b) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace uniform } // namespace distributions diff --git a/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_predict_dense_default_batch_fpt_dispatcher.cpp index 4842b1d6e8f..34287152955 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -40,7 +40,7 @@ namespace prediction namespace interface3 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); @@ -48,8 +48,7 @@ Batch::B using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) - : classifier::prediction::Batch(other), input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_dense_default_batch_fpt_dispatcher.cpp index 7aad0d9ec25..558c42efe7c 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -41,7 +41,7 @@ namespace interface3 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) +DAAL_EXPORT BatchType::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); @@ -49,7 +49,7 @@ BatchType::Batch(size_t nClasses) } template <> -BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_hist_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_hist_batch_fpt_dispatcher.cpp index e6db0c8f14c..ead1a5b8466 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_hist_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/classification/df_classification_train_hist_batch_fpt_dispatcher.cpp @@ -41,7 +41,7 @@ namespace interface3 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) +DAAL_EXPORT BatchType::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); @@ -49,7 +49,7 @@ BatchType::Batch(size_t nClasses) } template <> -BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp index d95da747a42..67d07c2a0df 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -39,19 +39,20 @@ namespace prediction { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace prediction } // namespace regression diff --git a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_dense_default_batch_fpt_dispatcher.cpp index 1c51315ff75..86f101b96ae 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -40,7 +40,7 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch() +DAAL_EXPORT BatchType::Batch() { _par = new ParameterType; initialize(); @@ -48,7 +48,7 @@ BatchType::Batch() } template <> -BatchType::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_predict_dense_default_batch_fpt_dispatcher.cpp index feaa135eb91..e414b5b4edf 100644 --- a/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -41,7 +41,7 @@ namespace prediction namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); @@ -49,7 +49,7 @@ Batch::Batch(size_t using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) +DAAL_EXPORT Batch::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); diff --git a/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_train_dense_default_batch_fpt_dispatcher.cpp index b84a06c11fb..0ab465550f5 100644 --- a/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/gbt/classification/gbt_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace training namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); @@ -46,15 +46,14 @@ Batch::Batch(size_t nC using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) - : classifier::training::Batch(other), input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } template <> -DAAL_EXPORT services::Status Batch::checkComputeParams() +DAAL_EXPORT services::Status BatchType::checkComputeParams() { services::Status s = classifier::training::Batch::checkComputeParams(); if (!s) return s; diff --git a/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_predict_dense_default_batch_fpt_dispatcher.cpp index e386d3fe553..393524813b6 100644 --- a/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -39,7 +39,7 @@ namespace prediction namespace interface1 { template <> -Batch::Batch() +DAAL_EXPORT Batch::Batch() { _par = new ParameterType(); initialize(); @@ -47,7 +47,7 @@ Batch::Batch() using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_train_dense_default_batch_fpt_dispatcher.cpp index 625dafb93a3..9d960259692 100644 --- a/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/gbt/regression/gbt_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace training namespace interface1 { template <> -Batch::Batch() +DAAL_EXPORT Batch::Batch() { _par = new ParameterType(); initialize(); @@ -46,7 +46,7 @@ Batch::Batch() using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/services/service_defines.h b/cpp/daal/src/services/service_defines.h index 954dfbecc9f..25e348e099a 100644 --- a/cpp/daal/src/services/service_defines.h +++ b/cpp/daal/src/services/service_defines.h @@ -274,57 +274,57 @@ typedef union } _daal_dp_union_t; #define IMPLEMENT_SERIALIZABLE_TAG(Class, Tag) \ - int Class::serializationTag() \ + int DAAL_EXPORT Class::serializationTag() \ { \ return Tag; \ } \ - int Class::getSerializationTag() const \ + int DAAL_EXPORT Class::getSerializationTag() const \ { \ return Class::serializationTag(); \ } #define IMPLEMENT_SERIALIZABLE_TAG1T(Class, T1, Tag) \ template <> \ - int Class::serializationTag() \ + int DAAL_EXPORT Class::serializationTag() \ { \ return features::internal::getIndexNumType() + Tag; \ } \ template <> \ - int Class::getSerializationTag() const \ + int DAAL_EXPORT Class::getSerializationTag() const \ { \ return Class::serializationTag(); \ } #define IMPLEMENT_SERIALIZABLE_TAG1T_SPECIALIZATION(Class, TemplateClass, Tag) \ template <> \ - int Class::serializationTag() \ + int DAAL_EXPORT Class::serializationTag() \ { \ return Tag; \ } \ template <> \ - int Class::getSerializationTag() const \ + int DAAL_EXPORT Class::getSerializationTag() const \ { \ return Class::serializationTag(); \ } #define IMPLEMENT_SERIALIZABLE_TAG2T(Class, T1, T2, Tag) \ template <> \ - int Class::serializationTag() \ + int DAAL_EXPORT Class::serializationTag() \ { \ return features::internal::getIndexNumType() + Tag; \ } \ template <> \ - int Class::getSerializationTag() const \ + int DAAL_EXPORT Class::getSerializationTag() const \ { \ return Class::serializationTag(); \ } #define IMPLEMENT_SERIALIZABLE_TAG22(Class, T1, Tag) \ - int Class::serializationTag() \ + int DAAL_EXPORT Class::serializationTag() \ { \ return Tag; \ } \ - int Class::getSerializationTag() const \ + int DAAL_EXPORT Class::getSerializationTag() const \ { \ return Class::serializationTag(); \ } From d9b8e23cff5c102313bc50c106f699297616c74c Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 04:33:21 -0800 Subject: [PATCH 120/126] fixes on fixes --- .../df_regression_train_hist_batch_fpt_dispatcher.cpp | 4 ++-- cpp/daal/src/algorithms/engines/mcg59/mcg59.cpp | 4 ++-- .../mcg59_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a.cpp | 4 ++-- .../mrg32k3a_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- cpp/daal/src/algorithms/engines/mt19937/mt19937.cpp | 4 ++-- .../mt19937_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- cpp/daal/src/algorithms/engines/mt2203/mt2203.cpp | 4 ++-- .../mt2203_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- .../engines/philox4x32x10/philox4x32x10.cpp | 4 ++-- ...ilox4x32x10_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- 11 files changed, 42 insertions(+), 37 deletions(-) diff --git a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_hist_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_hist_batch_fpt_dispatcher.cpp index d2ea86f3cbf..8397a474def 100644 --- a/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_hist_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/dtrees/forest/regression/df_regression_train_hist_batch_fpt_dispatcher.cpp @@ -40,7 +40,7 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch() +DAAL_EXPORT BatchType::Batch() { _par = new ParameterType; initialize(); @@ -48,7 +48,7 @@ BatchType::Batch() } template <> -BatchType::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/engines/mcg59/mcg59.cpp b/cpp/daal/src/algorithms/engines/mcg59/mcg59.cpp index ab0313f18a3..6ef862a60b7 100644 --- a/cpp/daal/src/algorithms/engines/mcg59/mcg59.cpp +++ b/cpp/daal/src/algorithms/engines/mcg59/mcg59.cpp @@ -48,8 +48,8 @@ SharedPtr > Batch::creat return engPtr; } -template class Batch; -template class Batch; +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); } // namespace interface1 } // namespace mcg59 diff --git a/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp index 5596db836a8..058158cc204 100644 --- a/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mcg59/mcg59_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace mcg59 { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t seed) +template <> +DAAL_EXPORT Batch::Batch(size_t seed) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace mcg59 } // namespace engines diff --git a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a.cpp b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a.cpp index 393979ba319..45827eaa8b8 100644 --- a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a.cpp +++ b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a.cpp @@ -50,8 +50,8 @@ SharedPtr > Batch::creat return engPtr; } -template class Batch; -template class Batch; +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); } // namespace interface1 } // namespace mrg32k3a diff --git a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp index 4c624804103..af2e9472aa8 100644 --- a/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mrg32k3a/mrg32k3a_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace mrg32k3a { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t seed) +template <> +DAAL_EXPORT Batch::Batch(size_t seed) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace mrg32k3a } // namespace engines diff --git a/cpp/daal/src/algorithms/engines/mt19937/mt19937.cpp b/cpp/daal/src/algorithms/engines/mt19937/mt19937.cpp index a5236e3465b..2e9e6d0cf00 100644 --- a/cpp/daal/src/algorithms/engines/mt19937/mt19937.cpp +++ b/cpp/daal/src/algorithms/engines/mt19937/mt19937.cpp @@ -49,8 +49,8 @@ SharedPtr > Batch::creat return engPtr; } -template class Batch; -template class Batch; +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); } // namespace interface1 } // namespace mt19937 diff --git a/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp index ca3ae66b654..8022362583f 100644 --- a/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mt19937/mt19937_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace mt19937 { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t seed) +template <> +DAAL_EXPORT Batch::Batch(size_t seed) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace mt19937 } // namespace engines diff --git a/cpp/daal/src/algorithms/engines/mt2203/mt2203.cpp b/cpp/daal/src/algorithms/engines/mt2203/mt2203.cpp index bc2d612b674..13fe607d87e 100644 --- a/cpp/daal/src/algorithms/engines/mt2203/mt2203.cpp +++ b/cpp/daal/src/algorithms/engines/mt2203/mt2203.cpp @@ -49,8 +49,8 @@ SharedPtr > Batch::creat return engPtr; } -template class Batch; -template class Batch; +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed, services::Status * st); +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed, services::Status * st); } // namespace interface1 } // namespace mt2203 diff --git a/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp index a51360af4a5..fbb050cd640 100644 --- a/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/mt2203/mt2203_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace mt2203 { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t seed) +template <> +DAAL_EXPORT Batch::Batch(size_t seed) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace mt2203 } // namespace engines diff --git a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10.cpp b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10.cpp index 47fb7dae70f..606966d894f 100644 --- a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10.cpp +++ b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10.cpp @@ -49,8 +49,8 @@ SharedPtr > Batch::creat return engPtr; } -template class Batch; -template class Batch; +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); +template SharedPtr> DAAL_EXPORT Batch::create(size_t seed); } // namespace interface1 } // namespace philox4x32x10 diff --git a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp index d3d73376bfb..b194dca5e31 100644 --- a/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/engines/philox4x32x10/philox4x32x10_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace philox4x32x10 { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t seed) +template <> +DAAL_EXPORT Batch::Batch(size_t seed) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : super(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : super(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace philox4x32x10 } // namespace engines From 53416ff65c4b251185827ccc4f9cd2d9e2cda32b Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 05:33:18 -0800 Subject: [PATCH 121/126] further fixes for clang --- ...ain_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...gmm_dense_default_batch_fpt_dispatcher.cpp | 7 ++++--- ...csr_default_distr_step1_fpt_dispatcher.cpp | 13 +++++++------ ...ngs_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...train_csr_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...csr_default_distr_step1_fpt_dispatcher.cpp | 12 ++++++------ ...csr_default_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...csr_default_distr_step3_fpt_dispatcher.cpp | 12 ++++++------ ...csr_default_distr_step4_fpt_dispatcher.cpp | 12 ++++++------ ...ain_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ..._init_csr_default_batch_fpt_dispatcher.cpp | 12 ++++++------ ...csr_default_distr_step1_fpt_dispatcher.cpp | 12 ++++++------ ...csr_default_distr_step2_fpt_dispatcher.cpp | 11 ++++++----- ...nit_dense_default_batch_fpt_dispatcher.cpp | 12 ++++++------ ...ict_dense_default_batch_fpt_dispatcher.cpp | 19 +++++++++---------- ...ain_dense_default_batch_fpt_dispatcher.cpp | 14 ++++++-------- ...ict_dense_default_batch_fpt_dispatcher.cpp | 14 ++++++-------- ...ain_dense_default_batch_fpt_dispatcher.cpp | 14 ++++++-------- ...ear_dense_default_batch_fpt_dispatcher.cpp | 12 ++++++------ ...tion_rbf_csr_fast_batch_fpt_dispatcher.cpp | 12 ++++++------ ...rbf_dense_default_batch_fpt_dispatcher.cpp | 12 ++++++------ ...lynomial_csr_fast_batch_fpt_dispatcher.cpp | 13 ++++++------- ...ial_dense_default_batch_fpt_dispatcher.cpp | 12 ++++++------ 23 files changed, 136 insertions(+), 138 deletions(-) diff --git a/cpp/daal/src/algorithms/elastic_net/elastic_net_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/elastic_net/elastic_net_train_dense_default_batch_fpt_dispatcher.cpp index e6f274e48f3..016ea8bc6fc 100755 --- a/cpp/daal/src/algorithms/elastic_net/elastic_net_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/elastic_net/elastic_net_train_dense_default_batch_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace training namespace interface1 { template <> -Batch::Batch(const optimization_solver::iterative_solver::BatchPtr & solver) +DAAL_EXPORT Batch::Batch(const optimization_solver::iterative_solver::BatchPtr & solver) { _par = new ParameterType(solver); initialize(); @@ -46,7 +46,7 @@ Batch::Batch(const optimizatio using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp index 8c7bcb55910..308ddee12ac 100644 --- a/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp @@ -33,13 +33,14 @@ namespace em_gmm namespace interface1 { -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace em_gmm } // namespace algorithms diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp index 94bea5e706b..0517249f551 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_csr_default_distr_step1_fpt_dispatcher.cpp @@ -38,20 +38,21 @@ namespace ratings { namespace interface1 { -template -Distributed::Distributed() + +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace ratings } // namespace prediction diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp index 5ab5cc04f3c..809856a40f8 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_predict_ratings_dense_default_batch_fpt_dispatcher.cpp @@ -39,19 +39,20 @@ namespace ratings { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace ratings } // namespace prediction diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp index 1f0c2ed7489..4d7efe0b798 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_batch_fpt_dispatcher.cpp @@ -34,19 +34,20 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace training } // namespace implicit_als diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp index c428939bc92..e85492f5cec 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step1_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace training } // namespace implicit_als diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp index 3fcc699e9b6..6176483ba92 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace training } // namespace implicit_als diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp index 6b24f5b25e2..c2c396971e6 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace training } // namespace implicit_als diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp index f23e24f9dcf..c6cb91155e4 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace training } // namespace implicit_als diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp index 37e5c105c63..27e2ba3ed62 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_dense_default_batch_fpt_dispatcher.cpp @@ -34,19 +34,20 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace training } // namespace implicit_als diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp index 2ab1d6b91be..0d897ba0144 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_batch_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace init { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; - } // namespace interface1 } // namespace init } // namespace training diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp index f5529590365..bdf3d349f20 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step1_fpt_dispatcher.cpp @@ -38,20 +38,20 @@ namespace init { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace init } // namespace training diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp index db5a61f76da..e12ffa706a7 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_csr_default_distr_step2_fpt_dispatcher.cpp @@ -38,20 +38,21 @@ namespace init { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) { initialize(); input.set(inputOfStep2FromStep1, other.input.get(inputOfStep2FromStep1)); } -template class Distributed; } // namespace interface1 } // namespace init } // namespace training diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp index e21e74cfe9f..aea1e7faf06 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_init_dense_default_batch_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace init { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; - } // namespace interface1 } // namespace init } // namespace training diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp index 1603a768c5a..4dd00986915 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -31,29 +31,28 @@ namespace prediction { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() : classifier::prediction::Batch() + +template <> +DAAL_EXPORT Batch::Batch() : classifier::prediction::Batch() { _par = new ParameterType(); initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) { - _par = new ParameterType(other.parameter()); + _par = new ParameterType(nClasses); initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) +template <> +DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::prediction::Batch(other), input(other.input) { - _par = new ParameterType(nClasses); + _par = new ParameterType(other.parameter()); initialize(); } -template class Batch; - } // namespace interface1 } // namespace prediction } // namespace bf_knn_classification diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp index e83e68bf38c..0fa92be00c5 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/bf_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -29,29 +29,27 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() : classifier::training::Batch() +template <> +DAAL_EXPORT Batch::Batch() : classifier::training::Batch() { _par = new ParameterType(); initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) +template <> +DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); } -template class Batch; - } // namespace interface1 } // namespace training } // namespace bf_knn_classification diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp index dbbdc38bb35..faa928c6ae3 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_predict_dense_default_batch_fpt_dispatcher.cpp @@ -37,27 +37,25 @@ namespace prediction { namespace interface3 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) { initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) { parameter.nClasses = nClasses; initialize(); } -template class Batch; - } // namespace interface3 } // namespace prediction } // namespace kdtree_knn_classification diff --git a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp index 00983ecbfd9..c73f4c057dc 100644 --- a/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/k_nearest_neighbors/kdtree_knn_classification_train_dense_default_batch_fpt_dispatcher.cpp @@ -35,28 +35,26 @@ namespace training { namespace interface3 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) +template <> +DAAL_EXPORT Batch::Batch(const Batch & other) : classifier::training::Batch(other), parameter(other.parameter), input(other.input) { initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) { parameter.nClasses = nClasses; initialize(); } -template class Batch; - } // namespace interface3 } // namespace training } // namespace kdtree_knn_classification diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp index be1f5c961e0..8fbbf4940f3 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_dense_default_batch_fpt_dispatcher.cpp @@ -35,19 +35,19 @@ namespace linear { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : KernelIface(other), parameter(other.parameter), input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; } // namespace interface1 } // namespace linear } // namespace kernel_function diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp index 284bda52a2f..130391a07b9 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_csr_fast_batch_fpt_dispatcher.cpp @@ -36,19 +36,19 @@ namespace rbf { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : KernelIface(other), parameter(other.parameter), input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; } // namespace interface1 } // namespace rbf } // namespace kernel_function diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp index 50d0c00db0b..b990ab8ad5c 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_rbf_dense_default_batch_fpt_dispatcher.cpp @@ -36,19 +36,19 @@ namespace rbf { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : KernelIface(other), parameter(other.parameter), input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; } // namespace interface1 } // namespace rbf } // namespace kernel_function diff --git a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp index 04a877c3df1..52e951887fa 100644 --- a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_csr_fast_batch_fpt_dispatcher.cpp @@ -31,20 +31,19 @@ namespace polynomial { namespace internal { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : KernelIface(other), parameter(other.parameter), input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; - } // namespace internal } // namespace polynomial } // namespace kernel_function diff --git a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp index 898eac34697..91fbfcab50e 100644 --- a/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/polynomial/kernel_function_polynomial_dense_default_batch_fpt_dispatcher.cpp @@ -31,19 +31,19 @@ namespace polynomial { namespace internal { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : KernelIface(other), parameter(other.parameter), input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; } // namespace internal } // namespace polynomial From 4b76072e8fe55a10ac2b0887b369c0c8e482c779 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 05:52:38 -0800 Subject: [PATCH 122/126] stopping point --- ...function_linear_csr_fast_batch_fpt_dispatcher.cpp | 12 ++++++------ .../kmeans_csr_lloyd_distr_step1_fpt_dispatcher.cpp | 4 ++-- .../kmeans_csr_lloyd_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...kmeans_dense_lloyd_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...kmeans_dense_lloyd_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...s_init_csr_deterministic_batch_fpt_dispatcher.cpp | 4 ++-- ..._csr_deterministic_distr_step1_fpt_dispatcher.cpp | 4 ++-- ..._csr_deterministic_distr_step2_fpt_dispatcher.cpp | 2 +- ...ns_init_csr_parallelplus_batch_fpt_dispatcher.cpp | 4 ++-- ...t_csr_parallelplus_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...t_csr_parallelplus_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...t_csr_parallelplus_distr_step3_fpt_dispatcher.cpp | 5 +++-- ...t_csr_parallelplus_distr_step4_fpt_dispatcher.cpp | 5 +++-- ...t_csr_parallelplus_distr_step5_fpt_dispatcher.cpp | 5 +++-- ...kmeans_init_csr_plusplus_batch_fpt_dispatcher.cpp | 4 ++-- ..._init_csr_plusplus_distr_step1_fpt_dispatcher.cpp | 4 ++-- ..._init_csr_plusplus_distr_step2_fpt_dispatcher.cpp | 4 ++-- ..._init_csr_plusplus_distr_step3_fpt_dispatcher.cpp | 5 +++-- ..._init_csr_plusplus_distr_step4_fpt_dispatcher.cpp | 5 +++-- .../kmeans_init_csr_random_batch_fpt_dispatcher.cpp | 4 ++-- ...ns_init_csr_random_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...ns_init_csr_random_distr_step2_fpt_dispatcher.cpp | 2 +- ...init_dense_deterministic_batch_fpt_dispatcher.cpp | 4 ++-- ...ense_deterministic_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...ense_deterministic_distr_step2_fpt_dispatcher.cpp | 2 +- ..._init_dense_parallelplus_batch_fpt_dispatcher.cpp | 4 ++-- ...dense_parallelplus_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...dense_parallelplus_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...dense_parallelplus_distr_step3_fpt_dispatcher.cpp | 5 +++-- ...dense_parallelplus_distr_step4_fpt_dispatcher.cpp | 5 +++-- ...dense_parallelplus_distr_step5_fpt_dispatcher.cpp | 5 +++-- ...eans_init_dense_plusplus_batch_fpt_dispatcher.cpp | 4 ++-- ...nit_dense_plusplus_distr_step1_fpt_dispatcher.cpp | 4 ++-- ...nit_dense_plusplus_distr_step2_fpt_dispatcher.cpp | 4 ++-- ...nit_dense_plusplus_distr_step3_fpt_dispatcher.cpp | 5 +++-- ...nit_dense_plusplus_distr_step4_fpt_dispatcher.cpp | 5 +++-- ...kmeans_init_dense_random_batch_fpt_dispatcher.cpp | 4 ++-- ..._init_dense_random_distr_step1_fpt_dispatcher.cpp | 4 ++-- ..._init_dense_random_distr_step2_fpt_dispatcher.cpp | 2 +- ...el_predict_dense_default_batch_fpt_dispatcher.cpp | 8 +++----- 40 files changed, 91 insertions(+), 83 deletions(-) diff --git a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp index 271d683f28f..5705c17c897 100644 --- a/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kernel_function/kernel_function_linear_csr_fast_batch_fpt_dispatcher.cpp @@ -35,19 +35,19 @@ namespace linear { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : KernelIface(other), parameter(other.parameter), input(other.input) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : KernelIface(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; } // namespace interface1 } // namespace linear } // namespace kernel_function diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step1_fpt_dispatcher.cpp index d245e8b4169..1bb9bdf7342 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step1_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, bool assignFlag) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, bool assignFlag) { _par = new ParameterType(nClusters, 1); initialize(); @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t nClusters, bool assignFlag) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step2_fpt_dispatcher.cpp index c309a4c77d9..acac64f29eb 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_distr_step2_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nIterations) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nIterations) { _par = new ParameterType(nClusters, nIterations); initialize(); @@ -45,7 +45,7 @@ DistributedType::Distributed(size_t nClusters, size_t nIterations) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step1_fpt_dispatcher.cpp index e55da154977..ea6ebfe9287 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step1_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, bool assignFlag) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, bool assignFlag) { _par = new ParameterType(nClusters, 1); initialize(); @@ -48,7 +48,7 @@ DistributedType::Distributed(size_t nClusters, bool assignFlag) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step2_fpt_dispatcher.cpp index 2bd0e9b85ed..a06d65ee90e 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_distr_step2_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nIterations) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nIterations) { _par = new ParameterType(nClusters, nIterations); initialize(); @@ -45,7 +45,7 @@ DistributedType::Distributed(size_t nClusters, size_t nIterations) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_batch_fpt_dispatcher.cpp index 5e485b1c6b8..425b367e4aa 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_batch_fpt_dispatcher.cpp @@ -36,7 +36,7 @@ namespace init namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); @@ -44,7 +44,7 @@ Batch::Batch(size_t nClasses) using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step1_fpt_dispatcher.cpp index a91ca47ac7c..c0e8594ad4e 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step2_fpt_dispatcher.cpp index f39e26aa466..5bf4256822e 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_deterministic_distr_step2_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { Analysis::_ac = diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_batch_fpt_dispatcher.cpp index bec9fdda052..0e21b540d2b 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_batch_fpt_dispatcher.cpp @@ -38,13 +38,13 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) +DAAL_EXPORT BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step1_fpt_dispatcher.cpp index dd8148b6875..3cc085a9bac 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step2_fpt_dispatcher.cpp index 38661f4f08c..43d473a76fa 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step2_fpt_dispatcher.cpp @@ -38,14 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, bool bFirstIteration) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, bool bFirstIteration) : DistributedStep2LocalPlusPlusBase(new ParameterType(nClusters, bFirstIteration)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedStep2LocalPlusPlusBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step3_fpt_dispatcher.cpp index 111c24475b8..ac474aa09fb 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step3_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step4_fpt_dispatcher.cpp index 288efc69311..b2b0c0b53c7 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step4_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step5_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step5_fpt_dispatcher.cpp index fa077fa6ca3..d3abbe0a183 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step5_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_parallelplus_distr_step5_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_batch_fpt_dispatcher.cpp index 4f9677f09a1..eb03764725d 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_batch_fpt_dispatcher.cpp @@ -38,13 +38,13 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) +DAAL_EXPORT BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step1_fpt_dispatcher.cpp index ba19a365ff0..6b0a49a5e1b 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step2_fpt_dispatcher.cpp index 247ecb78879..7b99d0d36b4 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step2_fpt_dispatcher.cpp @@ -38,14 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, bool bFirstIteration) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, bool bFirstIteration) : DistributedStep2LocalPlusPlusBase(new ParameterType(nClusters, bFirstIteration)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedStep2LocalPlusPlusBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step3_fpt_dispatcher.cpp index 0504f42f0d8..9a107a8babe 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step3_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step4_fpt_dispatcher.cpp index 762d04f96c9..8dff77f99f1 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_plusplus_distr_step4_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_batch_fpt_dispatcher.cpp index 623e9aabbe6..f129344e511 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_batch_fpt_dispatcher.cpp @@ -36,7 +36,7 @@ namespace init namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); @@ -44,7 +44,7 @@ Batch::Batch(size_t nClasses) using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step1_fpt_dispatcher.cpp index efb5bc4f62d..bc960ff1435 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step2_fpt_dispatcher.cpp index ffca0e9a613..9801be11654 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_csr_random_distr_step2_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { Analysis::_ac = diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_batch_fpt_dispatcher.cpp index 7e4f09f2a0e..790cae8c744 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_batch_fpt_dispatcher.cpp @@ -38,13 +38,13 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) +DAAL_EXPORT BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step1_fpt_dispatcher.cpp index 04b43d0530d..1b131f7e214 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step1_fpt_dispatcher.cpp @@ -39,7 +39,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -47,7 +47,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step2_fpt_dispatcher.cpp index dc1089cdca3..58fe8ec716b 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_deterministic_distr_step2_fpt_dispatcher.cpp @@ -39,7 +39,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { Analysis::_ac = diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_batch_fpt_dispatcher.cpp index 6340b74d9aa..eb8208b3790 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_batch_fpt_dispatcher.cpp @@ -38,13 +38,13 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) +DAAL_EXPORT BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step1_fpt_dispatcher.cpp index f1af15d139a..cec6a664033 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step2_fpt_dispatcher.cpp index 68092325dc8..0ece73f5a97 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step2_fpt_dispatcher.cpp @@ -38,14 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, bool bFirstIteration) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, bool bFirstIteration) : DistributedStep2LocalPlusPlusBase(new ParameterType(nClusters, bFirstIteration)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedStep2LocalPlusPlusBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step3_fpt_dispatcher.cpp index fa300c58bd0..937c335aa79 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step3_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step4_fpt_dispatcher.cpp index 7219582c50f..19ae805595d 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step4_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step5_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step5_fpt_dispatcher.cpp index 336bc847952..20fc17db9b2 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step5_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_parallelplus_distr_step5_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_batch_fpt_dispatcher.cpp index a1f8acccc77..ad2ba14d385 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_batch_fpt_dispatcher.cpp @@ -38,13 +38,13 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) +DAAL_EXPORT BatchType::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step1_fpt_dispatcher.cpp index ddadf8fedc8..d5ed241ab98 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step2_fpt_dispatcher.cpp index ccd328bdeb7..1d0a2d303a1 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step2_fpt_dispatcher.cpp @@ -38,14 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, bool bFirstIteration) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, bool bFirstIteration) : DistributedStep2LocalPlusPlusBase(new ParameterType(nClusters, bFirstIteration)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedStep2LocalPlusPlusBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step3_fpt_dispatcher.cpp index 639250b73e1..c4bc27ca0da 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step3_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step4_fpt_dispatcher.cpp index 4d34bc12900..ac7e31139ea 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_plusplus_distr_step4_fpt_dispatcher.cpp @@ -38,13 +38,14 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters) : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters) + : DistributedBase(new ParameterType(nClusters)), parameter(*static_cast(_par)) { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_batch_fpt_dispatcher.cpp index dea4bb5d503..13f846b5ec2 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_batch_fpt_dispatcher.cpp @@ -36,7 +36,7 @@ namespace init namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) : BatchBase(new ParameterType(nClasses)), parameter(*static_cast(_par)) { initialize(); @@ -44,7 +44,7 @@ Batch::Batch(size_t nClasses) using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) +DAAL_EXPORT Batch::Batch(const BatchType & other) : BatchBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)), input(other.input) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step1_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step1_fpt_dispatcher.cpp index f18a7d86649..92326ae0dfa 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step1_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step1_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { initialize(); @@ -46,7 +46,7 @@ DistributedType::Distributed(size_t nClusters, size_t nRowsTotal, size_t offset) } template <> -DistributedType::Distributed(const DistributedType & other) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : DistributedBase(new ParameterType(other.parameter)), parameter(*static_cast(_par)) { initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step2_fpt_dispatcher.cpp index 0dba642ec04..9fbfa8f46fd 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_init_dense_random_distr_step2_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace interface2 using DistributedType = Distributed; template <> -DistributedType::Distributed(size_t nClusters, size_t offset) +DAAL_EXPORT DistributedType::Distributed(size_t nClusters, size_t offset) : DistributedBase(new ParameterType(nClusters, offset)), parameter(*static_cast(_par)) { Analysis::_ac = diff --git a/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp index 1bb53042c24..d1da8443cf9 100644 --- a/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_model/linear_model_predict_dense_default_batch_fpt_dispatcher.cpp @@ -36,14 +36,12 @@ namespace prediction { namespace interface1 { -template -DAAL_EXPORT void Batch::initialize() +template <> +DAAL_EXPORT void Batch::initialize() { - this->_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, defaultDense)(&(this->_env)); + this->_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, DAAL_FPTYPE, defaultDense)(&(this->_env)); this->_par = NULL; } - -template class Batch; } // namespace interface1 } // namespace prediction } // namespace linear_model From a6e1630f4e719f534cdd6c07c34a061148bdd505 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 14:04:09 -0800 Subject: [PATCH 123/126] fix mistakes --- cpp/daal/include/algorithms/em/em_gmm.h | 8 ++- .../algorithms/em/em_gmm_dense_batch_fpt.cpp | 56 ------------------- ...gmm_dense_default_batch_fpt_dispatcher.cpp | 8 +++ ...nit_dense_default_batch_fpt_dispatcher.cpp | 11 ++-- ...csr_default_distr_step2_fpt_dispatcher.cpp | 4 +- ...csr_default_distr_step3_fpt_dispatcher.cpp | 4 +- ...csr_default_distr_step4_fpt_dispatcher.cpp | 4 +- .../kmeans_csr_lloyd_batch_fpt_dispatcher.cpp | 4 +- ...means_dense_lloyd_batch_fpt_dispatcher.cpp | 4 +- 9 files changed, 31 insertions(+), 72 deletions(-) delete mode 100644 cpp/daal/src/algorithms/em/em_gmm_dense_batch_fpt.cpp diff --git a/cpp/daal/include/algorithms/em/em_gmm.h b/cpp/daal/include/algorithms/em/em_gmm.h index 37a3e49bb99..7cdf20afcc9 100644 --- a/cpp/daal/include/algorithms/em/em_gmm.h +++ b/cpp/daal/include/algorithms/em/em_gmm.h @@ -140,7 +140,13 @@ class DAAL_EXPORT Batch : public daal::algorithms::Analysis return s; } - void initialize(); + void initialize() + { + Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env); + _in = &input; + _par = ¶meter; + _result = ResultPtr(new Result()); + } public: InputType input; /*!< %Input data structure */ diff --git a/cpp/daal/src/algorithms/em/em_gmm_dense_batch_fpt.cpp b/cpp/daal/src/algorithms/em/em_gmm_dense_batch_fpt.cpp deleted file mode 100644 index 0d531aa879a..00000000000 --- a/cpp/daal/src/algorithms/em/em_gmm_dense_batch_fpt.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* file: em_gmm_dense_batch_fpt.cpp */ -/******************************************************************************* -* 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 EM Batch constructor -//-- -*/ - -#include "algorithms/em/em_gmm.h" - -namespace daal -{ -namespace algorithms -{ -namespace em_gmm -{ -namespace interface1 -{ -template -Batch::Batch(const size_t nComponents) - : parameter(nComponents, services::SharedPtr >( - new covariance::Batch())) -{ - initialize(); -} - -template -void Batch::initialize() -{ - Analysis::_ac = new __DAAL_ALGORITHM_CONTAINER(batch, BatchContainer, algorithmFPType, method)(&_env); - _in = &input; - _par = ¶meter; - _result = ResultPtr(new Result()); -} - -template class Batch; - -} // namespace interface1 -} // namespace em_gmm -} // namespace algorithms -} // namespace daal diff --git a/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp index 308ddee12ac..54041df3a68 100644 --- a/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/em/em_gmm_dense_default_batch_fpt_dispatcher.cpp @@ -33,6 +33,14 @@ namespace em_gmm namespace interface1 { +template <> +DAAL_EXPORT Batch::Batch(const size_t nComponents) + : parameter(nComponents, services::SharedPtr >( + new covariance::Batch())) +{ + initialize(); +} + using BatchType = Batch; template <> diff --git a/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp index f76ecf12ae0..a3521a3ba36 100644 --- a/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/em/em_gmm_init_dense_default_batch_fpt_dispatcher.cpp @@ -34,19 +34,20 @@ namespace init { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(const size_t nComponents) : parameter(nComponents) +template <> +DAAL_EXPORT Batch::Batch(const size_t nComponents) : parameter(nComponents) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace init } // namespace em_gmm diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp index 6176483ba92..65ec71c48cb 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step2_fpt_dispatcher.cpp @@ -39,13 +39,13 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed() +DAAL_EXPORT DistributedType::Distributed() { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp index c2c396971e6..c21ed743027 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step3_fpt_dispatcher.cpp @@ -39,13 +39,13 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed() +DAAL_EXPORT DistributedType::Distributed() { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } diff --git a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp index c6cb91155e4..2b3e64b564b 100644 --- a/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/implicit_als/implicit_als_train_csr_default_distr_step4_fpt_dispatcher.cpp @@ -39,13 +39,13 @@ namespace interface1 using DistributedType = Distributed; template <> -DistributedType::Distributed() +DAAL_EXPORT DistributedType::Distributed() { initialize(); } template <> -DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_batch_fpt_dispatcher.cpp index 59ca0107028..7670704f8c9 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_csr_lloyd_batch_fpt_dispatcher.cpp @@ -37,14 +37,14 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClusters, size_t nIterations) +DAAL_EXPORT BatchType::Batch(size_t nClusters, size_t nIterations) { _par = new ParameterType(nClusters, nIterations); initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_batch_fpt_dispatcher.cpp index 0c09415ba2d..d53be2cace0 100644 --- a/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/kmeans/kmeans_dense_lloyd_batch_fpt_dispatcher.cpp @@ -37,14 +37,14 @@ namespace interface2 using BatchType = Batch; template <> -BatchType::Batch(size_t nClusters, size_t nIterations) +DAAL_EXPORT BatchType::Batch(size_t nClusters, size_t nIterations) { _par = new ParameterType(nClusters, nIterations); initialize(); } template <> -BatchType::Batch(const BatchType & other) +DAAL_EXPORT BatchType::Batch(const BatchType & other) { _par = new ParameterType(other.parameter()); initialize(); From ce9b9612467f43cf541848133bfa9df0693d75c5 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 14:15:35 -0800 Subject: [PATCH 124/126] through linear regression --- ...sion_train_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...p_of_betas_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...ingle_beta_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...ssion_train_dense_normeq_batch_fpt_dispatcher.cpp | 11 ++++++----- ...train_dense_normeq_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...sion_train_dense_normeq_online_fpt_dispatcher.cpp | 12 ++++++------ ...egression_train_dense_qr_batch_fpt_dispatcher.cpp | 11 ++++++----- ...ion_train_dense_qr_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...gression_train_dense_qr_online_fpt_dispatcher.cpp | 12 ++++++------ ...on_predict_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- ...sion_train_dense_default_batch_fpt_dispatcher.cpp | 4 ++-- 11 files changed, 54 insertions(+), 50 deletions(-) diff --git a/cpp/daal/src/algorithms/lasso_regression/lasso_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/lasso_regression/lasso_regression_train_dense_default_batch_fpt_dispatcher.cpp index 84bf8751220..6d6769b5507 100644 --- a/cpp/daal/src/algorithms/lasso_regression/lasso_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/lasso_regression/lasso_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace training namespace interface1 { template <> -Batch::Batch(const optimization_solver::iterative_solver::BatchPtr & solver) +DAAL_EXPORT Batch::Batch(const optimization_solver::iterative_solver::BatchPtr & solver) { _par = new ParameterType(solver); initialize(); @@ -46,7 +46,7 @@ Batch::Batch(const optimi using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) : input(other.input) +DAAL_EXPORT Batch::Batch(const BatchType & other) : input(other.input) { _par = new ParameterType(other.parameter()); initialize(); diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp index b838ea97140..bd8f818a44e 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_group_of_betas_dense_default_batch_fpt_dispatcher.cpp @@ -37,21 +37,22 @@ namespace group_of_betas { namespace interface1 { -template -DAAL_EXPORT Batch::Batch(size_t nBeta, size_t nBetaReducedModel) : parameter(nBeta, nBetaReducedModel) +template <> +DAAL_EXPORT Batch::Batch(size_t nBeta, size_t nBetaReducedModel) : parameter(nBeta, nBetaReducedModel) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : parameter(other.parameter) { initialize(); input.set(expectedResponses, other.input.get(expectedResponses)); input.set(predictedResponses, other.input.get(predictedResponses)); input.set(predictedReducedModelResponses, other.input.get(predictedReducedModelResponses)); } -template class Batch; } // namespace interface1 } // namespace group_of_betas } // namespace quality_metric diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp index 52c260f4024..798e045f5e7 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_single_beta_dense_default_batch_fpt_dispatcher.cpp @@ -37,14 +37,16 @@ namespace single_beta { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : parameter(other.parameter) { initialize(); input.set(expectedResponses, other.input.get(expectedResponses)); @@ -52,7 +54,6 @@ DAAL_EXPORT Batch::Batch(const Batch; } // namespace interface1 } // namespace single_beta } // namespace quality_metric diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp index ff224bf38f8..0fe0ab6cf90 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_batch_fpt_dispatcher.cpp @@ -34,19 +34,20 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace training } // namespace linear_regression diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp index e327f5c9b04..b5f4f26da24 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_distr_step2_fpt_dispatcher.cpp @@ -35,21 +35,21 @@ namespace training { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : parameter(other.parameter) { initialize(); input.set(partialModels, other.input.get(partialModels)); } -template class Distributed; } // namespace interface1 } // namespace training } // namespace linear_regression diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp index ee2fb1bd44e..4ed158e1a70 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_normeq_online_fpt_dispatcher.cpp @@ -34,20 +34,20 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) - : linear_model::training::Online(other), input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : linear_model::training::Online(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace training } // namespace linear_regression diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp index 6226735ef36..5b9de467515 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_batch_fpt_dispatcher.cpp @@ -35,19 +35,20 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface1 } // namespace training } // namespace linear_regression diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp index e7eba4505ad..751741783b2 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_distr_step2_fpt_dispatcher.cpp @@ -35,21 +35,21 @@ namespace training { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : parameter(other.parameter) { initialize(); input.set(partialModels, other.input.get(partialModels)); } -template class Distributed; } // namespace interface1 } // namespace training } // namespace linear_regression diff --git a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp index af20bfbf964..289c0efbd74 100644 --- a/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/linear_regression/linear_regression_train_dense_qr_online_fpt_dispatcher.cpp @@ -34,20 +34,20 @@ namespace training { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) - : linear_model::training::Online(other), input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : linear_model::training::Online(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace training } // namespace linear_regression diff --git a/cpp/daal/src/algorithms/logistic_regression/logistic_regression_predict_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/logistic_regression/logistic_regression_predict_dense_default_batch_fpt_dispatcher.cpp index 5d677300d06..23c56aa3561 100644 --- a/cpp/daal/src/algorithms/logistic_regression/logistic_regression_predict_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/logistic_regression/logistic_regression_predict_dense_default_batch_fpt_dispatcher.cpp @@ -38,7 +38,7 @@ namespace prediction namespace interface2 { template <> -Batch::Batch(size_t nClasses) +DAAL_EXPORT Batch::Batch(size_t nClasses) { _par = new ParameterType(nClasses); initialize(); @@ -46,7 +46,7 @@ Batch::Batch(size_t using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) +DAAL_EXPORT Batch::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); diff --git a/cpp/daal/src/algorithms/logistic_regression/logistic_regression_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/logistic_regression/logistic_regression_train_dense_default_batch_fpt_dispatcher.cpp index 065549930c1..ec1d72e0e91 100644 --- a/cpp/daal/src/algorithms/logistic_regression/logistic_regression_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/logistic_regression/logistic_regression_train_dense_default_batch_fpt_dispatcher.cpp @@ -37,7 +37,7 @@ namespace training namespace interface3 { template <> -Batch::Batch(size_t nClasses, const SolverPtr & solver) +DAAL_EXPORT Batch::Batch(size_t nClasses, const SolverPtr & solver) { _par = new ParameterType(nClasses, solver); initialize(); @@ -45,7 +45,7 @@ Batch::Batch(size_t nC using BatchType = Batch; template <> -Batch::Batch(const BatchType & other) +DAAL_EXPORT Batch::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input) { _par = new ParameterType(other.parameter()); From b64180a4d354f50f57931705fe46ace0d041c8e5 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 14:37:32 -0800 Subject: [PATCH 125/126] low order moments --- ...w_order_moments_csr_fast_batch_fpt_dispatcher.cpp | 11 ++++++----- ...r_moments_csr_fast_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ..._order_moments_csr_fast_online_fpt_dispatcher.cpp | 11 ++++++----- ...r_moments_csr_singlepass_batch_fpt_dispatcher.cpp | 11 ++++++----- ...nts_csr_singlepass_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ..._moments_csr_singlepass_online_fpt_dispatcher.cpp | 11 ++++++----- ...ow_order_moments_csr_sum_batch_fpt_dispatcher.cpp | 11 ++++++----- ...er_moments_csr_sum_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...w_order_moments_csr_sum_online_fpt_dispatcher.cpp | 11 ++++++----- ...er_moments_dense_default_batch_fpt_dispatcher.cpp | 11 ++++++----- ...ents_dense_default_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...r_moments_dense_default_online_fpt_dispatcher.cpp | 11 ++++++----- ...moments_dense_singlepass_batch_fpt_dispatcher.cpp | 11 ++++++----- ...s_dense_singlepass_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...oments_dense_singlepass_online_fpt_dispatcher.cpp | 11 ++++++----- ..._order_moments_dense_sum_batch_fpt_dispatcher.cpp | 11 ++++++----- ..._moments_dense_sum_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...order_moments_dense_sum_online_fpt_dispatcher.cpp | 11 ++++++----- 18 files changed, 108 insertions(+), 96 deletions(-) diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp index e9aa93f7df7..0dca627869e 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp index 7b0ff30a382..2a9f0201007 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp index e9625769707..a8fa450f059 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_fast_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp index b32c307a464..5d8b41c2eec 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp index 3d0cd4cbe05..17e4d3e39a2 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_distr_step2_fpt_dispatcher.cpp @@ -33,20 +33,20 @@ namespace low_order_moments { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp index eefe377f28c..602f642f021 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_singlepass_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp index f9b7a62abf3..27d7f044f2d 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp index ccbaac075db..02375697746 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp index 9d5e9f250a8..9cb4e42ff41 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_csr_sum_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp index 0ea277f3f67..3f5eae2aa59 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp index c482751fb60..9e3a4a3950f 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp index 43a207a8985..24b3cb1462e 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_default_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp index 4efe12d8719..bf6b4b45302 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp index 052028bb843..2a9f12e0bf9 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_distr_step2_fpt_dispatcher.cpp @@ -33,20 +33,20 @@ namespace low_order_moments { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp index dd5796a7491..efa02f21963 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_singlepass_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp index 9b687e813f5..c3eb7addf82 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_batch_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Batch::Batch() +template <> +DAAL_EXPORT Batch::Batch() { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) : BatchImpl(other) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : BatchImpl(other) { initialize(); } -template class Batch; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp index 1e4ff7f2f3f..6ea805048b4 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_distr_step2_fpt_dispatcher.cpp @@ -32,20 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -Distributed::Distributed() +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed() { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Distributed; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms diff --git a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp index bc9ec02dabe..82d58d11b1a 100644 --- a/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/low_order_moments/low_order_moments_dense_sum_online_fpt_dispatcher.cpp @@ -32,19 +32,20 @@ namespace low_order_moments { namespace interface1 { -template -DAAL_EXPORT Online::Online() +template <> +DAAL_EXPORT Online::Online() { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) : input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface1 } // namespace low_order_moments } // namespace algorithms From 047458ec3caa4008b38192586bfb53ac47e4b2f9 Mon Sep 17 00:00:00 2001 From: icfaust Date: Thu, 27 Feb 2025 14:57:19 -0800 Subject: [PATCH 126/126] naivebayes --- ...ssifier_predict_mccwu_batch_fpt_dispatcher.cpp | 15 +++++++-------- ...ier_predict_votebased_batch_fpt_dispatcher.cpp | 15 +++++++-------- ...r_train_oneagainstone_batch_fpt_dispatcher.cpp | 15 +++++++-------- ...naivebayes_predict_csr_fast_fpt_dispatcher.cpp | 12 ++++++------ ...bayes_predict_dense_default_fpt_dispatcher.cpp | 12 ++++++------ ...ebayes_train_csr_fast_batch_fpt_dispatcher.cpp | 12 ++++++------ ..._train_csr_fast_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ...bayes_train_csr_fast_online_fpt_dispatcher.cpp | 12 ++++++------ ...s_train_dense_default_batch_fpt_dispatcher.cpp | 12 ++++++------ ...n_dense_default_distr_step2_fpt_dispatcher.cpp | 12 ++++++------ ..._train_dense_default_online_fpt_dispatcher.cpp | 12 ++++++------ 11 files changed, 69 insertions(+), 72 deletions(-) diff --git a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp index dc86bb7f057..5b388088648 100644 --- a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_mccwu_batch_fpt_dispatcher.cpp @@ -36,27 +36,26 @@ namespace prediction { namespace interface2 { +using BatchType = Batch; -template -DAAL_DEPRECATED Batch::Batch() : parameter(0) +template <> +DAAL_DEPRECATED BatchType::Batch() : parameter(0) { initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT BatchType::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace prediction } // namespace multi_class_classifier diff --git a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp index a6fe2d07c86..b58447b0b37 100644 --- a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_predict_votebased_batch_fpt_dispatcher.cpp @@ -36,27 +36,26 @@ namespace prediction { namespace interface2 { +using BatchType = Batch; -template -DAAL_DEPRECATED Batch::Batch() : parameter(0) +template <> +DAAL_DEPRECATED BatchType::Batch() : parameter(0) { initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT BatchType::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace prediction } // namespace multi_class_classifier diff --git a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp index adaa8dbf3e5..44d9db845e4 100644 --- a/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/multiclassclassifier/multiclassclassifier_train_oneagainstone_batch_fpt_dispatcher.cpp @@ -36,27 +36,26 @@ namespace training { namespace interface2 { +using BatchType = Batch; -template -DAAL_DEPRECATED Batch::Batch() : parameter(0) +template <> +DAAL_DEPRECATED BatchType::Batch() : parameter(0) { initialize(); } -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT BatchType::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::training::Batch(other), parameter(other.parameter), input(other.input) +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Batch; } // namespace interface2 } // namespace training } // namespace multi_class_classifier diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp index b1454f436f8..9261de2cfaf 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_csr_fast_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace prediction { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace prediction } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp index e9355ff38a0..5b18e8c5842 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_predict_dense_default_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace prediction { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::prediction::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace prediction } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp index ce337fe4313..e73a70fd0dc 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_batch_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::training::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace training } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp index 5b43f06ff11..dbbef0d33e2 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_distr_step2_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface2 { -template -Distributed::Distributed(size_t nClasses) : parameter(nClasses) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(size_t nClasses) : parameter(nClasses) { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : Training(other), parameter(other.parameter), input(other.input) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : Training(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Distributed; } // namespace interface2 } // namespace training } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp index f2513b83346..ebf9949c361 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_csr_fast_online_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface2 { -template -DAAL_EXPORT Online::Online(size_t nClasses) : input(), parameter(nClasses) +template <> +DAAL_EXPORT Online::Online(size_t nClasses) : input(), parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) - : classifier::training::Online(other), input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : classifier::training::Online(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface2 } // namespace training } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp index ada40afd8d1..4711d4386b1 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_batch_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface2 { -template -DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) +template <> +DAAL_EXPORT Batch::Batch(size_t nClasses) : parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Batch::Batch(const Batch & other) - : classifier::training::Batch(other), input(other.input), parameter(other.parameter) +using BatchType = Batch; + +template <> +DAAL_EXPORT BatchType::Batch(const BatchType & other) : classifier::training::Batch(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Batch; } // namespace interface2 } // namespace training } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp index 26e4fdbfd38..d997ee7501e 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_distr_step2_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface2 { -template -Distributed::Distributed(size_t nClasses) : parameter(nClasses) +using DistributedType = Distributed; + +template <> +DAAL_EXPORT DistributedType::Distributed(size_t nClasses) : parameter(nClasses) { initialize(); } -template -Distributed::Distributed(const Distributed & other) - : Training(other), parameter(other.parameter), input(other.input) +template <> +DAAL_EXPORT DistributedType::Distributed(const DistributedType & other) : Training(other), parameter(other.parameter), input(other.input) { initialize(); } -template class Distributed; } // namespace interface2 } // namespace training } // namespace multinomial_naive_bayes diff --git a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp index b7f8d44cf0b..e89904cb085 100644 --- a/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp +++ b/cpp/daal/src/algorithms/naivebayes/naivebayes_train_dense_default_online_fpt_dispatcher.cpp @@ -36,20 +36,20 @@ namespace training { namespace interface2 { -template -DAAL_EXPORT Online::Online(size_t nClasses) : input(), parameter(nClasses) +template <> +DAAL_EXPORT Online::Online(size_t nClasses) : input(), parameter(nClasses) { initialize(); } -template -DAAL_EXPORT Online::Online(const Online & other) - : classifier::training::Online(other), input(other.input), parameter(other.parameter) +using OnlineType = Online; + +template <> +DAAL_EXPORT OnlineType::Online(const OnlineType & other) : classifier::training::Online(other), input(other.input), parameter(other.parameter) { initialize(); } -template class Online; } // namespace interface2 } // namespace training } // namespace multinomial_naive_bayes