kopia lustrzana https://github.com/mobilinkd/m17-cxx-demod
Comment out [[unlikely]] hints
The syntax seems to have changed and they don't really exist until C++20. Probably not significant performance improvements anyway. So they're commented out until proved useful, to suppress the warnings.pull/24/head
rodzic
37b3a2dbac
commit
cfc48b7967
|
@ -104,11 +104,11 @@ class ClockRecovery
|
|||
int8_t offset = sample_index_ - prev_sample_index_;
|
||||
|
||||
// When in spec, the clock should drift by less than 1 sample per frame.
|
||||
if (offset >= MAX_OFFSET) [[unlikely]]
|
||||
if (offset >= MAX_OFFSET) //!!! [[unlikely]]
|
||||
{
|
||||
offset -= SAMPLES_PER_SYMBOL;
|
||||
}
|
||||
else if (offset <= -MAX_OFFSET) [[unlikely]]
|
||||
else if (offset <= -MAX_OFFSET) //!!! [[unlikely]]
|
||||
{
|
||||
offset += SAMPLES_PER_SYMBOL;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ class ClockRecovery
|
|||
{
|
||||
// update_sample_index_() must be called first.
|
||||
|
||||
if (frame_count_ == 0) [[unlikely]]
|
||||
if (frame_count_ == 0) //!!! [[unlikely]]
|
||||
{
|
||||
prev_sample_index_ = sample_index_;
|
||||
offset_ = 0.0;
|
||||
|
|
|
@ -556,7 +556,7 @@ void OPVDemodulator<FloatType>::operator()(const FloatType input)
|
|||
|
||||
// We need to pump a few ms of data through on startup to initialize
|
||||
// the demodulator.
|
||||
if (initializing) [[unlikely]]
|
||||
if (initializing) //!!! [[unlikely]]
|
||||
{
|
||||
--initializing;
|
||||
initialize(input);
|
||||
|
|
Ładowanie…
Reference in New Issue