Commit ad8bc60b authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Replace static_for<> by ordinary 'for' loop

parent 0840e016
......@@ -62,10 +62,11 @@ __device__ auto readfirstlane(const Object& obj)
constexpr Size RemainedSize = ObjectSize % SgprSize;
constexpr Size CompleteSgprCopyBoundary = ObjectSize - RemainedSize;
static_for<0, CompleteSgprCopyBoundary, SgprSize>{}([&](auto offset) {
for(Size offset = 0; offset < CompleteSgprCopyBoundary; offset += SgprSize)
{
*reinterpret_cast<Sgpr*>(to_obj + offset) =
readfirstlane(*reinterpret_cast<const Sgpr*>(from_obj + offset));
});
}
if constexpr(0 < RemainedSize)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment