Skip to content

Commit

Permalink
[SYCLomatic] Refine SYCLCompat support for CUB (#2302)
Browse files Browse the repository at this point in the history
Signed-off-by: Wang, Yihan <yihan.wang@intel.com>
  • Loading branch information
yihanwg authored Sep 2, 2024
1 parent 28e58b7 commit 9b3c121
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 316 deletions.
4 changes: 3 additions & 1 deletion clang/lib/DPCT/CallExprRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ std::unique_ptr<std::unordered_map<
std::string, std::shared_ptr<CallExprRewriterFactoryBase>>>();

void CallExprRewriterFactoryBase::initRewriterMap() {
if (DpctGlobalInfo::useSYCLCompat())
if (DpctGlobalInfo::useSYCLCompat()) {
initRewriterMapSYCLcompat(*RewriterMap);
initRewriterMethodMapSYCLcompat(*MethodRewriterMap);
}
initRewriterMapAtomic();
initRewriterMapCUB();
initRewriterMapCUFFT();
Expand Down
4 changes: 4 additions & 0 deletions clang/lib/DPCT/CallExprRewriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class CallExprRewriterFactoryBase {
std::unordered_map<std::string,
std::shared_ptr<CallExprRewriterFactoryBase>>
&RewriterMap);
static void initRewriterMethodMapSYCLcompat(
std::unordered_map<std::string,
std::shared_ptr<CallExprRewriterFactoryBase>>
&MethodRewriterMap);
static void initRewriterMapAtomic();
static void initRewriterMapCUB();
static void initRewriterMapCUFFT();
Expand Down
Loading

0 comments on commit 9b3c121

Please sign in to comment.