mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 14:59:17 +00:00
make code compliant with std=c++20 (#2123)
This commit is contained in:
@@ -94,7 +94,7 @@ struct FillMonotonicSeq
|
||||
template <typename ForwardIter>
|
||||
void operator()(ForwardIter first, ForwardIter last) const
|
||||
{
|
||||
std::generate(first, last, [=, n = init_value_]() mutable {
|
||||
std::generate(first, last, [=, *this, n = init_value_]() mutable {
|
||||
auto tmp = n;
|
||||
n += step_;
|
||||
return tmp;
|
||||
@@ -150,7 +150,7 @@ struct TransformIntoStructuralSparsity
|
||||
template <typename ForwardIter>
|
||||
void operator()(ForwardIter first, ForwardIter last) const
|
||||
{
|
||||
std::for_each(first, last, [=, idx = 0](T& elem) mutable {
|
||||
std::for_each(first, last, [=, *this, idx = 0](T& elem) mutable {
|
||||
auto tmp_idx = idx;
|
||||
idx += 1;
|
||||
return elem *= valid_sequences[tmp_idx % (sizeof(valid_sequences) / sizeof(T))];
|
||||
|
||||
@@ -252,7 +252,7 @@ struct ParallelTensorFunctor
|
||||
std::size_t iw_begin = it * work_per_thread;
|
||||
std::size_t iw_end = std::min((it + 1) * work_per_thread, mN1d);
|
||||
|
||||
auto f = [=] {
|
||||
auto f = [=, *this] {
|
||||
for(std::size_t iw = iw_begin; iw < iw_end; ++iw)
|
||||
{
|
||||
call_f_unpack_args(mF, GetNdIndices(iw));
|
||||
|
||||
Reference in New Issue
Block a user