[pipepar] Compute a CRC 8bit in lattice.c
* Change number of bits in CRC to 8 * Avoid q to be higher than 2^CRC_BIT * Increase the number of packets when benchmarking lattice.c
This commit is contained in:
parent
e4450d68c2
commit
eab2df2a38
|
@ -46,8 +46,8 @@ lattice-prog-%: lattice.c
|
|||
|
||||
runlattice%: lattice-%
|
||||
mkdir -p logs
|
||||
./$< -p 50 2>/dev/null
|
||||
$(call runntimesandlog,10,./$< -p 50,logs/$<-$$(date +%Y-%m-%d_%H-%M-%S).log)
|
||||
./$< -p 10000 2>/dev/null
|
||||
$(call runntimesandlog,10,./$< -p 10000,logs/$<-$$(date +%Y-%m-%d_%H-%M-%S).log)
|
||||
|
||||
pipeline_template-prog-%: pipeline_template.c
|
||||
NUM=$*;OPT=-$*;gcc $(CFLAGS) -DNB_CORES=$${NUM##*-} $${OPT%-*} -o $@ $< -lrt
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#define AAC_SCE_PROT_BIT 192
|
||||
#define AAC_SCE_PROT_PER_CORE_BIT (AAC_SCE_PROT_BIT / NB_CORES)
|
||||
|
||||
/* CRC CCITT-16 size */
|
||||
#define CRC_BIT 16
|
||||
/* CRC CCITT-8 size? */
|
||||
#define CRC_BIT 8
|
||||
|
||||
#define DATA_BITS_PER_CORE ((AAC_SCE_PROT_BIT - 1) / NB_CORES)
|
||||
|
||||
|
@ -202,7 +202,7 @@ inline void compute_cumulative_metrics_column(
|
|||
for(jf = 0; jf < (1 << CRC_BIT); jf++)
|
||||
{
|
||||
uint_fast16_t j = (uint_fast16_t) jf;
|
||||
uint_fast16_t q = j ^ p_matrix;
|
||||
uint_fast16_t q = (j ^ p_matrix) & ((1 << CRC_BIT) - 1);
|
||||
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]);
|
||||
n = jacolog(lattice_metrics_out[j], n);
|
||||
|
|
Loading…
Reference in New Issue