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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user