Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit e5d9904

Browse files
author
Sven Verdoolaege
committed
cuda/codegen.cc: split emitAccess into two functions
This will make it easier to perform some checks on the intermediate results in the next commit.
1 parent 79b4be7 commit e5d9904

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tc/core/polyhedral/cuda/codegen.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,18 @@ struct LdgWrapper {
396396
std::ostream& out_;
397397
};
398398

399+
template <typename AFF>
400+
isl::ast_expr buildAccess(AFF access, const CodegenStatementContext& context) {
401+
return context.build().access_from(access);
402+
}
403+
404+
void emitAccess(isl::ast_expr access, const CodegenStatementContext& context) {
405+
context.ss << access.to_C_str();
406+
}
407+
399408
template <typename AFF>
400409
void emitAccess(AFF access, const CodegenStatementContext& context) {
401-
context.ss << context.build().access_from(access).to_C_str();
410+
emitAccess(buildAccess(access, context), context);
402411
}
403412

404413
// Print an access to global memory, wrapping the access in an "__ldg()"

0 commit comments

Comments
 (0)