Skip to content

Commit

Permalink
[SYCLomatic][NFC] refactor code by creating a separate util file for …
Browse files Browse the repository at this point in the history
…groups (#1784)


Signed-off-by: Wang, Yihan <[email protected]>
Co-authored-by: Yihan Wang <[email protected]>
Co-authored-by: Dan Hoeflinger <[email protected]>
  • Loading branch information
3 people authored May 30, 2024
1 parent 9b163ab commit b2e5588
Show file tree
Hide file tree
Showing 9 changed files with 548 additions and 514 deletions.
2 changes: 2 additions & 0 deletions clang/lib/DPCT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set(RUNTIME_HEADERS
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/sparse_utils.hpp
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/fft_utils.hpp
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/lapack_utils.hpp
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/group_utils.hpp
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/dpl_extras/functional.h
${CMAKE_SOURCE_DIR}/../clang/runtime/dpct-rt/include/dpct/dpl_extras/iterators.h
Expand Down Expand Up @@ -58,6 +59,7 @@ set(PROCESS_FILES_OUTPUT
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/sparse_utils.hpp.inc
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/fft_utils.hpp.inc
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/lapack_utils.hpp.inc
${CMAKE_BINARY_DIR}/tools/clang/include/clang/DPCT/group_utils.hpp.inc
)

add_custom_command(
Expand Down
4 changes: 4 additions & 0 deletions clang/lib/DPCT/GenHelperFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const std::string FftUtilsAllContentStr =
const std::string LapackUtilsAllContentStr =
#include "clang/DPCT/lapack_utils.hpp.inc"
;
const std::string GroupUtilsAllContentStr =
#include "clang/DPCT/group_utils.hpp.inc"
;
const std::string DplExtrasAlgorithmAllContentStr =
#include "clang/DPCT/dpl_extras/algorithm.h.inc"
;
Expand Down Expand Up @@ -162,6 +165,7 @@ void genHelperFunction(const clang::tooling::UnifiedPath &OutRoot) {
GENERATE_ALL_FILE_CONTENT(SparseUtils, ".", sparse_utils.hpp)
GENERATE_ALL_FILE_CONTENT(FftUtils, ".", fft_utils.hpp)
GENERATE_ALL_FILE_CONTENT(LapackUtils, ".", lapack_utils.hpp)
GENERATE_ALL_FILE_CONTENT(GroupUtils, ".", group_utils.hpp)
GENERATE_ALL_FILE_CONTENT(CodePin, "codepin", codepin.hpp)
GENERATE_ALL_FILE_CONTENT(CodePinSerializationBasic, "codepin/serialization",
basic.hpp)
Expand Down
1 change: 1 addition & 0 deletions clang/lib/DPCT/GenHelperFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ extern const std::string CclUtilsAllContentStr;
extern const std::string SparseUtilsAllContentStr;
extern const std::string FftUtilsAllContentStr;
extern const std::string LapackUtilsAllContentStr;
extern const std::string GroupUtilsAllContentStr;
extern const std::string DplExtrasAlgorithmAllContentStr;
extern const std::string DplExtrasFunctionalAllContentStr;
extern const std::string DplExtrasIteratorsAllContentStr;
Expand Down
1 change: 1 addition & 0 deletions clang/lib/DPCT/HeaderTypes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ DPCT_HEADER(CCL_Utils, "<dpct/ccl_utils.hpp>")
DPCT_HEADER(BLAS_Utils, "<dpct/blas_utils.hpp>")
DPCT_HEADER(DNNL_Utils, "<dpct/dnnl_utils.hpp>")
DPCT_HEADER(LAPACK_Utils, "<dpct/lapack_utils.hpp>")
DPCT_HEADER(GROUP_Utils, "<dpct/group_utils.hpp>")
DPCT_HEADER(COMMON_Utils, "<dpct/lib_common_utils.hpp>")
DPCT_HEADER(Atomic, "<dpct/atomic.hpp>")
DPCT_HEADER(SPBLAS_Utils, "<dpct/sparse_utils.hpp>")
Expand Down
1 change: 1 addition & 0 deletions clang/runtime/dpct-rt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(dpct_rt_files
include/dpct/sparse_utils.hpp
include/dpct/fft_utils.hpp
include/dpct/lapack_utils.hpp
include/dpct/group_utils.hpp
)

set(dpct_rt_dpstd_files
Expand Down
Loading

0 comments on commit b2e5588

Please sign in to comment.