lattice / quda

QUDA is a library for performing calculations in lattice QCD on GPUs.
https://lattice.github.io/quda
Other
294 stars 100 forks source link

Remove VLAs and replace with std::vector #1493

Closed dmcdougall closed 2 months ago

dmcdougall commented 2 months ago

VLAs were rejected by WG21 and, in light of this, recent-ish Clangs updated the warning set to include their use in C++ code. See here for the relevant LLVM commit.

STRICT builds therefore fail to compile them. This patch replaces their use with std::vector where appropriate.

dmcdougall commented 2 months ago

contract_ft_test is failing... investigating.

dmcdougall commented 2 months ago

Oh, the first argument to FourierPhase isn't a pointer to const. You're probably expecting this method to change the stuff pointed to by phase, and I just put it on the stack before calling the method. That's probably why the test is failing; changes aren't propagated back to the caller.

Give me a moment to fix it.

dmcdougall commented 2 months ago

contract_ft_test appears to be passing now.