aboutsummaryrefslogtreecommitdiffstats
path: root/common/alcomplex.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-05 14:51:03 -0800
committerChris Robinson <[email protected]>2022-12-05 14:51:03 -0800
commitdf6d61dd40b602af55f903564358b083bb8b37e4 (patch)
tree84113a098867e2ba82aa1f156911e94755fde727 /common/alcomplex.cpp
parent73df39b8f8cefa0c0fca0e287b548063e9e62636 (diff)
Use standard likely/unlikely attributes when available
Diffstat (limited to 'common/alcomplex.cpp')
-rw-r--r--common/alcomplex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/alcomplex.cpp b/common/alcomplex.cpp
index c08ac751..cce92665 100644
--- a/common/alcomplex.cpp
+++ b/common/alcomplex.cpp
@@ -101,7 +101,7 @@ complex_fft(const al::span<std::complex<Real>> buffer, const Real sign)
*/
const size_t log2_size{static_cast<size_t>(al::countr_zero(fftsize))};
- if(unlikely(log2_size >= gBitReverses.size()))
+ if(log2_size >= gBitReverses.size()) [[alunlikely]]
{
for(size_t idx{1u};idx < fftsize-1;++idx)
{
@@ -116,7 +116,7 @@ complex_fft(const al::span<std::complex<Real>> buffer, const Real sign)
std::swap(buffer[idx], buffer[revidx]);
}
}
- else for(auto &rev : gBitReverses[log2_size])
+ else for(auto &rev : gBitReverses[log2_size]) [[allikely]]
std::swap(buffer[rev.first], buffer[rev.second]);
/* Iterative form of Danielson-Lanczos lemma */