"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "7f11f64407741909746f860cad6ca6f3bfe09af9"
Commit fb51f338 authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Add 'const' specifier to never changing variable

parent a609bfaa
...@@ -57,7 +57,7 @@ __device__ auto readfirstlane(const Object& obj) ...@@ -57,7 +57,7 @@ __device__ auto readfirstlane(const Object& obj)
alignas(Object) std::byte memory[ObjectSize]; alignas(Object) std::byte memory[ObjectSize];
const auto* from = reinterpret_cast<const std::byte*>(&obj); auto* const from = reinterpret_cast<const std::byte*>(&obj);
static_for<0, ObjectSize, SgprSize>{}([&](auto offset) { static_for<0, ObjectSize, SgprSize>{}([&](auto offset) {
*reinterpret_cast<Sgpr*>(memory + offset) = *reinterpret_cast<Sgpr*>(memory + offset) =
readfirstlane(*reinterpret_cast<const Sgpr*>(from + offset)); readfirstlane(*reinterpret_cast<const Sgpr*>(from + offset));
......
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