GEMM: Bugfix

This commit is contained in:
Philippe Tillet
2016-10-05 10:07:19 -04:00
parent 5a0dfb983d
commit ba1520ae98

View File

@@ -294,7 +294,7 @@ std::string gemm::generate_impl(std::string const & suffix, expression_tree cons
stream << "gidz = $GROUP_IDX_2;" << std::endl;
stream << "div = (K+" << depth_-1 << ")/" << depth_ << ";" << std::endl;
stream << "offz = div*gidz;" << std::endl;
stream << "K = min(K - div*gidz, ($SIZE_T)div);" << std::endl;
stream << "K = max(0, min(K - div*gidz, ($SIZE_T)div));" << std::endl;
}
stream << "idt = " << ls0_ << "*ids.w + ids.z;" << std::endl;