Skip to content

Commit

Permalink
Refactor header file references
Browse files Browse the repository at this point in the history
Signed-off-by: minmingzhu <minming.zhu@intel.com>
  • Loading branch information
minmingzhu committed Apr 19, 2023
1 parent 668fec8 commit a73e2a1
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 50 deletions.
8 changes: 1 addition & 7 deletions mllib-dal/src/main/native/CorrelationImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@
#include <chrono>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"
#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "Communicator.hpp"
#include "OutputHelpers.hpp"
#include "common.hpp"
#include "oneapi/dal/algo/covariance.hpp"
#include "oneapi/dal/table/homogen.hpp"
#endif

#include "OneCCL.h"
Expand Down
4 changes: 0 additions & 4 deletions mllib-dal/src/main/native/GPU.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#pragma once

#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif

#include "service.h"
#include <CL/cl.h>
#include <CL/sycl.hpp>
Expand Down
8 changes: 1 addition & 7 deletions mllib-dal/src/main/native/KMeansImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
#include <iostream>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"
#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "Communicator.hpp"
#include "OutputHelpers.hpp"
#include "common.hpp"
#include "oneapi/dal/algo/kmeans.hpp"
#include "oneapi/dal/table/homogen.hpp"
#endif

#include "OneCCL.h"
Expand Down
8 changes: 1 addition & 7 deletions mllib-dal/src/main/native/PCAImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@
#include <iostream>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"
#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "Communicator.hpp"
#include "OutputHelpers.hpp"
#include "common.hpp"
#include "oneapi/dal/algo/covariance.hpp"
#include "oneapi/dal/algo/pca.hpp"
#include "oneapi/dal/table/homogen.hpp"
#endif

#include "OneCCL.h"
Expand Down
8 changes: 1 addition & 7 deletions mllib-dal/src/main/native/SummarizerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@
#include <chrono>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"
#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "Communicator.hpp"
#include "OutputHelpers.hpp"
#include "common.hpp"
#include "oneapi/dal/algo/basic_statistics.hpp"
#include "oneapi/dal/table/homogen.hpp"
#endif

#include "OneCCL.h"
Expand Down
26 changes: 26 additions & 0 deletions mllib-dal/src/main/native/common.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*******************************************************************************
* Copyright 2020 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.
*******************************************************************************/

#pragma once

#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif

#include "GPU.h"
#include "Communicator.hpp"
#include "OutputHelpers.hpp"
#include "oneapi/dal/table/homogen.hpp"
7 changes: 1 addition & 6 deletions mllib-dal/src/main/native/oneapi/dal/ColumnAccessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@
#include <vector>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"

#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "common.hpp"

#include "com_intel_oneapi_dal_table_ColumnAccessor.h"
#include "oneapi/dal/table/homogen.hpp"
#include "oneapi/dal/table/column_accessor.hpp"
#include "service.h"

Expand Down
7 changes: 1 addition & 6 deletions mllib-dal/src/main/native/oneapi/dal/HomogenTableImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@
#include <mutex>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"

#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "common.hpp"

#include "com_intel_oneapi_dal_table_HomogenTableImpl.h"
#include "oneapi/dal/table/homogen.hpp"
#include "service.h"

using namespace std;
Expand Down
7 changes: 1 addition & 6 deletions mllib-dal/src/main/native/oneapi/dal/RowAccessorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@
#include <vector>

#ifdef CPU_GPU_PROFILE
#include "GPU.h"

#ifndef ONEDAL_DATA_PARALLEL
#define ONEDAL_DATA_PARALLEL
#endif
#include "common.hpp"

#include "com_intel_oneapi_dal_table_RowAccessor.h"
#include "oneapi/dal/table/homogen.hpp"
#include "oneapi/dal/table/row_accessor.hpp"
#include "service.h"

Expand Down

0 comments on commit a73e2a1

Please sign in to comment.