1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-06 10:56:34 -04:00

ldpctool: Remove VLA from MinSumCAlgorithm

Replace the variable length temporary array in MinSumCAlgorithm::finalp()
with a std::vector buffer.

This removes reliance on compiler VLA extensions and uses standard C++
storage for the temporary reduction buffer.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-08-01 13:46:46 -04:00
parent 4b3bf21418
commit 4ccc7a9bfd
@@ -391,8 +391,8 @@ struct MinSumCAlgorithm
}
static void finalp(TYPE *links, int cnt)
{
TYPE tmp[cnt];
CODE::exclusive_reduce(links, tmp, cnt, min);
std::vector<TYPE> tmp(cnt);
CODE::exclusive_reduce(links, tmp.data(), cnt, min);
for (int i = 0; i < cnt; ++i)
links[i] = tmp[i];
}