1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-09-11 15:26:02 +00:00

Speedup in code_resampler - avoid floor function

Direct cast to integer takes the floor anyway.
This commit is contained in:
Cillian O'Driscoll
2015-12-02 21:45:58 +00:00
parent 12d2386653
commit f6f9a4bf88

View File

@@ -112,7 +112,7 @@ public:
for( ; j < num_samples_this_iter; ++j )
{
associated_chip_index = std::floor(tcode_chips);
associated_chip_index = static_cast< int >(tcode_chips);
*curr_sample = orig_code[associated_chip_index];
tcode_chips += code_phase_step;
++curr_sample;
@@ -240,7 +240,7 @@ public:
++curr_sample;
}
assert( static_cast<int>(
assert( static_cast<int>(
fxpt64_to_double( code_phase_fxp - code_phase_step_fxp )
) < code_length );