[codegen/alignment_info] better handling of constants

This commit is contained in:
Philippe Tillet
2019-07-18 16:12:06 -07:00
parent 86f70f8224
commit f0d8306437
11 changed files with 57 additions and 33 deletions

View File

@@ -298,9 +298,9 @@ void shift::triton_c_src(std::ostream &os) const {
if(is_chwn) {
return R"(
int32 )" + rx + "wh[" + sz + "] = " + rkx + " / " + B + R"(;
int32 )" + rx + "b[" + sz + "] = " + rkx + " % " + B + R"();
int32 )" + rx + "w[" + sz + "] = (" + rx + "(wh % " + CW + R"() + pad_w;
int32 )" + rx + "h[" + sz + "] = (" + rx + "(wh / " + CW + R"() + pad_h;)";
int32 )" + rx + "b[" + sz + "] = " + rkx + " % " + B + R"(;
int32 )" + rx + "w[" + sz + "] = (" + rx + "wh % " + CW + R"() + pad_w;
int32 )" + rx + "h[" + sz + "] = (" + rx + "wh / " + CW + R"() + pad_h;)";
}
else {
return R"(