Skip to content

Commit b2e5588

Browse files
abhilash1910Yihan Wangdanhoeflinger
authored
[SYCLomatic][NFC] refactor code by creating a separate util file for groups (#1784)
Signed-off-by: Wang, Yihan <[email protected]> Co-authored-by: Yihan Wang <[email protected]> Co-authored-by: Dan Hoeflinger <[email protected]>
1 parent 9b163ab commit b2e5588

File tree

9 files changed

+548
-514
lines changed

9 files changed

+548
-514
lines changed

clang/lib/DPCT/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ set(RUNTIME_HEADERS
2222
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/sparse_utils.hpp
2323
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/fft_utils.hpp
2424
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/lapack_utils.hpp
25+
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/group_utils.hpp
2526
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h
2627
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/dpl_extras/functional.h
2728
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/dpl_extras/iterators.h
@@ -58,6 +59,7 @@ set(PROCESS_FILES_OUTPUT
5859
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/sparse_utils.hpp.inc
5960
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/fft_utils.hpp.inc
6061
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/lapack_utils.hpp.inc
62+
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/group_utils.hpp.inc
6163
)
6264

6365
add_custom_command(

clang/lib/DPCT/GenHelperFunction.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ const std::string FftUtilsAllContentStr =
7373
const std::string LapackUtilsAllContentStr =
7474
#include "clang/DPCT/lapack_utils.hpp.inc"
7575
;
76+
const std::string GroupUtilsAllContentStr =
77+
#include "clang/DPCT/group_utils.hpp.inc"
78+
;
7679
const std::string DplExtrasAlgorithmAllContentStr =
7780
#include "clang/DPCT/dpl_extras/algorithm.h.inc"
7881
;
@@ -162,6 +165,7 @@ void genHelperFunction(const clang::tooling::UnifiedPath &OutRoot) {
162165
GENERATE_ALL_FILE_CONTENT(SparseUtils, ".", sparse_utils.hpp)
163166
GENERATE_ALL_FILE_CONTENT(FftUtils, ".", fft_utils.hpp)
164167
GENERATE_ALL_FILE_CONTENT(LapackUtils, ".", lapack_utils.hpp)
168+
GENERATE_ALL_FILE_CONTENT(GroupUtils, ".", group_utils.hpp)
165169
GENERATE_ALL_FILE_CONTENT(CodePin, "codepin", codepin.hpp)
166170
GENERATE_ALL_FILE_CONTENT(CodePinSerializationBasic, "codepin/serialization",
167171
basic.hpp)

clang/lib/DPCT/GenHelperFunction.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ extern const std::string CclUtilsAllContentStr;
3232
extern const std::string SparseUtilsAllContentStr;
3333
extern const std::string FftUtilsAllContentStr;
3434
extern const std::string LapackUtilsAllContentStr;
35+
extern const std::string GroupUtilsAllContentStr;
3536
extern const std::string DplExtrasAlgorithmAllContentStr;
3637
extern const std::string DplExtrasFunctionalAllContentStr;
3738
extern const std::string DplExtrasIteratorsAllContentStr;

clang/lib/DPCT/HeaderTypes.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ DPCT_HEADER(CCL_Utils, "<dpct/ccl_utils.hpp>")
6565
DPCT_HEADER(BLAS_Utils, "<dpct/blas_utils.hpp>")
6666
DPCT_HEADER(DNNL_Utils, "<dpct/dnnl_utils.hpp>")
6767
DPCT_HEADER(LAPACK_Utils, "<dpct/lapack_utils.hpp>")
68+
DPCT_HEADER(GROUP_Utils, "<dpct/group_utils.hpp>")
6869
DPCT_HEADER(COMMON_Utils, "<dpct/lib_common_utils.hpp>")
6970
DPCT_HEADER(Atomic, "<dpct/atomic.hpp>")
7071
DPCT_HEADER(SPBLAS_Utils, "<dpct/sparse_utils.hpp>")

clang/runtime/dpct-rt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ set(dpct_rt_files
1717
include/dpct/sparse_utils.hpp
1818
include/dpct/fft_utils.hpp
1919
include/dpct/lapack_utils.hpp
20+
include/dpct/group_utils.hpp
2021
)
2122

2223
set(dpct_rt_dpstd_files

0 commit comments

Comments
 (0)