[pipepar] Explicit cast in compute_cumulative_metrics_column
Explicit the cast for loop variable from uint_fast32_t to uint_fast16_t
This commit is contained in:
parent
3d17a4db90
commit
01acb467ee
|
@ -161,10 +161,11 @@ inline void compute_cumulative_metrics_column(
|
|||
double *lattice_metrics_in,
|
||||
double lattice_metrics_out[])
|
||||
{
|
||||
uint_fast32_t j;
|
||||
uint_fast32_t jf;
|
||||
double n = 0; // Normalisation factor
|
||||
for(j = 0; j < (1 << CRC_BIT); j++)
|
||||
for(jf = 0; jf < (1 << CRC_BIT); jf++)
|
||||
{
|
||||
uint_fast16_t j = (uint_fast16_t) jf;
|
||||
uint_fast16_t q = j ^ p_matrix;
|
||||
lattice_metrics_out[j] = jacolog(lattice_metrics_in[j] + bit_metrics, lattice_metrics_out[j]);
|
||||
lattice_metrics_out[q] = jacolog(lattice_metrics_in[j] - bit_metrics, lattice_metrics_out[q]);
|
||||
|
@ -172,8 +173,8 @@ inline void compute_cumulative_metrics_column(
|
|||
}
|
||||
|
||||
// Normalization
|
||||
for (j = 0; j < (1 << CRC_BIT); j++)
|
||||
lattice_metrics_out[j] -= n;
|
||||
for (jf = 0; jf < (1 << CRC_BIT); jf++)
|
||||
lattice_metrics_out[jf] -= n;
|
||||
}
|
||||
|
||||
/* Forward method */
|
||||
|
|
Loading…
Reference in New Issue