Commit 5cd934e1 authored by Renaud Pacalet's avatar Renaud Pacalet
Browse files

New Makefile, new layered schedule

parent 20650dad
......@@ -100,18 +100,14 @@ clean:
# Testing #
###########
T := 100
V := 1
NULL :=
SPACE := $(NULL) $(NULL)
SIGMA := 0.5
CHANNEL := awgn 0.5
DECMETHOD := scmsla 16 8
SEED := 19
GENMETHOD := dense
STANDARD := 802.11n
Z := 27
M := 12
N := 24
V := 0
ifeq ($(V),0)
DEVNULL := &> /dev/null
AT := @
endif
DECODE := $(BUILDDIR)/decode
ENCODE := $(BUILDDIR)/encode
......@@ -121,81 +117,124 @@ QCTOPCHK := $(BUILDDIR)/qc-to-pchk
RANDSRC := $(BUILDDIR)/rand-src
TRANSMIT := $(BUILDDIR)/transmit
ifeq ($(V),0)
DEVNULL := &> /dev/null
AT := @
endif
ifneq ($(QCMATRIX),)
ZMN := $(shell head -1 $(QCMATRIX))
Z := $(word 1,$(ZMN))
M := $(word 2,$(ZMN))
N := $(word 3,$(ZMN))
code := $(basename $(notdir $(QCMATRIX)))
qcmatrix := $(BUILDDIR)/$(code)
$(qcmatrix).qc: $(QCMATRIX)
$(AT)cp -f $< $@
T := 100
CHANNEL := awgn 0.5
DECMETHOD := scmsfp2 16 8
SEED := 19
GENMETHOD := dense
$(qcmatrix).src: d := $(shell printf '%d' "$$(( $(N) * $(Z) - $(M) * $(Z)))")
else
code := $(STANDARD)_$(Z)_$(M)_$(N)
qcmatrix := $(BUILDDIR)/$(code)
endif
export V T CHANNEL DECMETHOD SEED GENMETHOD
channel := $(subst $(SPACE),_,$(CHANNEL))
decmethod := $(subst $(SPACE),_,$(DECMETHOD))
# All standard tests
.PHONY: test-all
QCMATRICES :=
3GPPZVALUES := 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 22 24 26 28 30 32 36 40 44 48 52 56 60 64 72 80 88 96 104 112 120 128 144 160 176 192 208 224 240 256 288 320 352 384
%.pchk: %.qc | $(QCTOPCHK)
$(AT)$(QCTOPCHK) $< $@
%.gen: %.pchk | $(MAKEGEN)
$(AT)$(MAKEGEN) $< $@ $(GENMETHOD) $(DEVNULL)
$(BUILDDIR)/$(SEED)_%.src: | $(RANDSRC)
$(AT)$(RANDSRC) $@ $(SEED) $*x$(T)
%_$(channel).rec: %.enc | $(TRANSMIT)
$(AT)$(TRANSMIT) $< $@ $(SEED) $(CHANNEL) $(DEVNULL)
%.test: %.done
@echo '$@: $<'
# $(1..4): STANDARD, Z, M, N
define TEST_rule
$(BUILDDIR)/$(1)_$(2)_$(3)_$(4).qc: | $(MAKEQC)
$(AT)$(MAKEQC) --standard="$(1)" --lifting=$(2) --brows=$(3) --bcols=$(4) $$@
d := $$(shell printf '%d' "$$$$(( $(4) * $(2) - $(3) * $(2)))")
code := $(1)_$(2)_$(3)_$(4)
qc := $$(BUILDDIR)/$$(code).qc
pchk := $$(BUILDDIR)/$$(code).pchk
gen := $$(BUILDDIR)/$$(code).gen
src := $$(BUILDDIR)/$$(SEED)_$$(d).src
enc := $$(BUILDDIR)/$$(SEED)_$$(d)_$$(code).enc
rec := $$(BUILDDIR)/$$(SEED)_$$(d)_$$(code)_$$(channel).rec
dec := $$(BUILDDIR)/$$(SEED)_$$(d)_$$(code)_$$(channel)_$$(decmethod).dec
done := $$(BUILDDIR)/$$(SEED)_$$(d)_$$(code)_$$(channel)_$$(decmethod).done
test := $$(BUILDDIR)/$$(SEED)_$$(d)_$$(code)_$$(channel)_$$(decmethod).test
QCMATRICES += $(BUILDDIR)/$(1)_$(2)_$(3)_$(4).qc
test-all: $(BUILDDIR)/$(1)_$(2)_$(3)_$(4).dec
.PRECIOUS: $$(qc) $$(pchk) $$(gen) $$(src) $$(enc) $$(rec) $$(dec) $$(done)
$(BUILDDIR)/$(1)_$(2)_$(3)_$(4).src: d := $$(shell printf '%d' "$$$$(( $(4) * $(2) - $(3) * $(2)))")
endef
$(foreach Z,27 54 81,$(foreach M,4 6 8 12,$(eval $(call TEST_rule,802.11n,$(Z),$(M),24))))
$(foreach Z,$(3GPPZVALUES),$(eval $(call TEST_rule,3GPP,$(Z),46,68)))
$(foreach Z,$(3GPPZVALUES),$(eval $(call TEST_rule,3GPP,$(Z),42,52)))
PCHKS := $(patsubst %.qc,%.pchk,$(QCMATRICES))
GENS := $(patsubst %.qc,%.gen,$(QCMATRICES))
SRCS := $(patsubst %.qc,%.src,$(QCMATRICES))
ENCS := $(patsubst %.qc,%.enc,$(QCMATRICES))
RECS := $(patsubst %.qc,%.rec,$(QCMATRICES))
DECS := $(patsubst %.qc,%.dec,$(QCMATRICES))
$(PCHKS): %.pchk: %.qc | $(QCTOPCHK)
$(AT)$(QCTOPCHK) $< $@
.PHONY: $$(test)
$(GENS): %.gen: %.pchk | $(MAKEGEN)
$(AT)$(MAKEGEN) $< $@ $(GENMETHOD)
$$(qc): | $$(MAKEQC)
$$(AT)$$(MAKEQC) --standard="$(1)" --lifting=$(2) --brows=$(3) --bcols=$(4) $$@
$(SRCS): %.src: | $(RANDSRC)
$(AT)$(RANDSRC) $@ $(SEED) $(d)x$(T)
$$(enc): $$(src) $$(pchk) $$(gen) | $$(ENCODE)
$$(AT)$$(ENCODE) $$(pchk) $$(gen) $$< $$@ $$(DEVNULL)
$(ENCS): %.enc: %.src %.pchk %.gen | $(ENCODE)
$(AT)$(ENCODE) $*.pchk $*.gen $< $@ $(DEVNULL)
$$(BUILDDIR)/$$(SEED)_$$(d)_$$(code)_$$(channel)_$$(decmethod).%: $$(rec) $$(pchk) | $$(DECODE)
$$(AT)r=$$$$($$(DECODE) $$(pchk) $$< $$(dec) $$(CHANNEL) $$(DECMETHOD) 2>&1) && \
printf '%s:\t%s\n' '$$@' "$$$$r" > $$(done)
$(RECS): %.rec: %.enc | $(TRANSMIT)
$(AT)$(TRANSMIT) $< $@ $(SEED) $(CHANNEL) $(DEVNULL)
test-all: $$(test)
endef
$(foreach z,27 54 81,$(foreach m,4 6 8 12,$(eval $(call TEST_rule,802.11n,$(z),$(m),24))))
$(foreach z,$(3GPPZVALUES),$(eval $(call TEST_rule,3GPP,$(z),46,68)))
$(foreach z,$(3GPPZVALUES),$(eval $(call TEST_rule,3GPP,$(z),42,52)))
# Single test
.PHONY: test
STANDARD := 802.11n
Z := 27
M := 12
N := 24
$(DECS): %.dec: %.rec %.pchk | $(DECODE)
$(AT)r=$$($(DECODE) $*.pchk $< $@ $(CHANNEL) $(DECMETHOD) 2>&1) && \
printf '%s:\t%s\n' '$*' "$$r"
ifneq ($(QCMATRIX),)
ZMN := $(shell head -1 $(QCMATRIX))
Z := $(word 1,$(ZMN))
M := $(word 2,$(ZMN))
N := $(word 3,$(ZMN))
D := $(shell printf '%d' "$$(( $(Z) * $(N) - $(Z) * $(M)))")
CODE := $(basename $(notdir $(QCMATRIX)))
QC := $(BUILDDIR)/$(CODE).qc
PCHK := $(BUILDDIR)/$(CODE).pchk
GEN := $(BUILDDIR)/$(CODE).gen
SRC := $(BUILDDIR)/$(SEED)_$(D).src
ENC := $(BUILDDIR)/$(SEED)_$(D)_$(CODE).enc
REC := $(BUILDDIR)/$(SEED)_$(D)_$(CODE)_$(channel).rec
DEC := $(BUILDDIR)/$(SEED)_$(D)_$(CODE)_$(channel)_$(decmethod).dec
DONE := $(BUILDDIR)/$(SEED)_$(D)_$(CODE)_$(channel)_$(decmethod).done
TEST := $(BUILDDIR)/$(SEED)_$(D)_$(CODE)_$(channel)_$(decmethod).test
.PRECIOUS: $(QC) $(PCHK) $(GEN) $(SRC) $(ENC) $(REC) $(DEC) $(DONE)
.PHONY: $(TEST)
$(QC): $(QCMATRIX)
$(AT)cp -f $< $@
.PRECIOUS: $(QCMATRICES) $(PCHKS) $(GENS) $(SRCS) $(ENCS) $(RECS) $(DECS)
$(ENC): $(SRC) $(PCHK) $(GEN) | $(ENCODE)
$(AT)$(ENCODE) $(PCHK) $(GEN) $< $@ $(DEVNULL)
test: $(qcmatrix).dec
$(BUILDDIR)/$(SEED)_$(D)_$(CODE)_$(channel)_$(decmethod).%: $(REC) $(PCHK) | $(DECODE)
$(AT)r=$$($(DECODE) $(PCHK) $< $(DEC) $(CHANNEL) $(DECMETHOD) 2>&1) && \
printf '%s:\t%s\n' '$@' "$$r" > $(DONE)
.PHONY: $(SRCS) test-all
test: $(TEST)
else
D := $(shell printf '%d' "$$(( $(Z) * $(N) - $(Z) * $(M)))")
CODE := $(STANDARD)_$(Z)_$(M)_$(N)
test-all: $(CEXECS) $(QCMATRICES)
test: $(BUILDDIR)/$(SEED)_$(D)_$(CODE)_$(channel)_$(decmethod).test
@echo $^
endif
test-clean:
rm -f $(addprefix $(BUILDDIR)/,*.qc *.pchk *.gen *.src *.dec *.enc *.rec)
rm -f $(addprefix $(BUILDDIR)/,*.qc *.pchk *.gen *.src *.dec *.enc *.rec *.done)
.PHONY: list
......
......@@ -24,7 +24,7 @@
declared here are located in dec.c. */
typedef enum
{ Enum_block, Enum_bit, Prprp, Scms, Scmsfp, Scmsla, Scmspp
{ Enum_block, Enum_bit, Prprp, Scms, Scmsfp, Scmsfp1, Scmsfp2, Scmsla, Scmspp
} decoding_method;
extern decoding_method dec_method; /* Decoding method to use */
......@@ -70,6 +70,12 @@ typedef struct {
unsigned scmsfp_decode(mod2sparse *, double *, char *, char *, double *, scmsfp_data *);
void scmsfp_init(mod2sparse *, double *, char *, double *, scmsfp_data *);
void scmsfp_iter(mod2sparse *, double *, char *, double *, scmsfp_data *);
unsigned scmsfp1_decode(mod2sparse *, double *, char *, char *, double *, scmsfp_data *);
void scmsfp1_init(mod2sparse *, double *, char *, double *, scmsfp_data *);
void scmsfp1_iter(mod2sparse *, double *, char *, double *, scmsfp_data *);
unsigned scmsfp2_decode(mod2sparse *, double *, char *, char *, double *, scmsfp_data *);
void scmsfp2_init(mod2sparse *, double *, char *, double *, scmsfp_data *);
void scmsfp2_iter(mod2sparse *, double *, char *, double *, scmsfp_data *);
// compact representation of set of VN-to-CN messages of a row
typedef struct {
......
......@@ -461,7 +461,7 @@ void scms_init( mod2sparse *H, double *lratio, char *dblk, double *bprb, scms_da
sd->g[col] = -log(lratio[col]); // channel observations as Log Likelihood Ratios (LLR)
if(fabs(sd->g[col]) > max) max = fabs(sd->g[col]);
}
for(int row = 0; row < M; row++) {
for(row = 0; row < M; row++) {
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) { // for all active columns in row
col = e->col; // column index
sd->b[row][i] = 0.0; // CN
......@@ -620,7 +620,7 @@ void scmsfp_init(mod2sparse *H, double *lratio, char *dblk, double *bprb, scmsfp
dtmp = -log(lratio[col]);
sd->g[col] = scms_saturate(round(dtmp), sd->size);
}
for(int row = 0; row < M; row++) {
for(row = 0; row < M; row++) {
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) { // for all active columns in row
col = e->col; // column index
sd->b[row][i] = 0; // CN
......@@ -700,6 +700,257 @@ void scmsfp_iter(mod2sparse *H, double *lratio, char *dblk, double *bprb, scmsfp
}
}
/*******************************************************************************/
/* self-corrected min-sum, fixed point version, overwrite a-priori information */
/* with a-posteriori information */
/*******************************************************************************/
// absolute value of integer v
#define SCMS_ABS(v) (((v)<0)?(-v):(v))
unsigned scmsfp1_decode(mod2sparse *H, double *lratio, char *dblk, char *pchk, double *bprb, scmsfp_data *sd) {
int N, n, c;
N = mod2sparse_cols(H);
/* Initialize probabilities, likelihood ratios, SCMS data, and find initial guess */
scmsfp1_init(H,lratio,dblk,bprb,sd);
/* Do up to abs(max_iter) iterations of probability propagation, stopping early if a codeword is found, unless max_iter is negative. */
for (n = 0; ; n++) {
c = check(H,dblk,pchk);
if (table==2) {
printf("%7d %5d %8.1f %6d %+9.2f %8.1f %+9.2f %7.1f\n", block_no, n, changed(lratio,dblk,N), c, loglikelihood(lratio,dblk,N), expected_parity_errors(H,bprb), expected_loglikelihood(lratio,bprb,N), entropy(bprb,N));
}
if (n==max_iter || n==-max_iter || (max_iter>0 && c==0)) {
break;
}
scmsfp1_iter(H,lratio,dblk,bprb,sd);
}
return n;
}
/* initialize */
void scmsfp1_init(mod2sparse *H, double *lratio, char *dblk, double *bprb, scmsfp_data *sd) {
int N;
int M;
int row, col, i;
double dtmp;
mod2entry *e;
N = mod2sparse_cols(H);
M = mod2sparse_rows(H);
// Find max row degrees
for(row = 0; row < M; row++) {
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) // for all active columns in row
;
sd->b[row] = chk_alloc (i, sizeof **(sd->b));
sd->a[row] = chk_alloc (i, sizeof **(sd->a));
}
for (col = 0; col<N; col++) {
if (bprb) bprb[col] = 1 - 1/(1+lratio[col]);
dblk[col] = lratio[col]>=1;
dtmp = -log(lratio[col]);
sd->g[col] = scms_saturate(round(dtmp), sd->size);
sd->h[col] = sd->g[col];
}
for(row = 0; row < M; row++) {
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) { // for all active columns in row
col = e->col; // column index
sd->b[row][i] = 0; // CN
sd->a[row][i] = sd->h[col]; // VN
}
}
}
/* compute one iteration */
void scmsfp1_iter(mod2sparse *H, double *lratio, char *dblk, double *bprb, scmsfp_data *sd) {
mod2entry *e;
int N, M;
int64_t itmp;
int i, col, row;
int64_t min1;
int64_t min2;
int idx;
int sp;
M = mod2sparse_rows(H);
N = mod2sparse_cols(H);
for (row = 0; row<M; row++) {
min1 = -1;
min2 = -1;
idx = 0;
sp = 1;
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) {
col = e->col;
sp = sp * SCMS_SIGN_MP(sd->a[row][i]);
itmp = SCMS_ABS(sd->a[row][i]);
if(itmp < min1 || min1 < 0) {
min2 = min1;
min1 = itmp;
idx = i;
} else if(itmp < min2 || min2 < 0) {
min2 = itmp;
}
}
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) {
col = e->col;
itmp = sp * SCMS_SIGN_MP(sd->a[row][i]);
if(idx == i) {
sd->b[row][i] = itmp * min2;
} else {
sd->b[row][i] = itmp * min1;
}
}
}
for (row = 0; row<M; row++) { // for all rows
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) { // for all active columns in row
col = e->col; // column index
sd->h[col] += sd->b[row][i];
}
}
for (col = 0; col<N; col++) {
sd->h[col] = scms_saturate(sd->h[col], sd->size);
}
for (row = 0; row<M; row++) { // for all rows
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) { // for all active columns in row
col = e->col; // column index
itmp = scms_saturate(sd->h[col] - sd->b[row][i], sd->size);
if((SCMS_SIGN_MP(sd->a[row][i]) != SCMS_SIGN_MP(itmp)) && (sd->a[row][i] != 0)) {
sd->a[row][i] = 0;
} else {
sd->a[row][i] = itmp;
}
}
}
for (col = 0; col<N; col++) { // for all columns
if (bprb) bprb[col] = 1 - 1/(1+exp(-sd->h[col]));
dblk[col] = sd->h[col] < 0;
}
}
/*******************************************************************************/
/* self-corrected min-sum, fixed point version, overwrite a-priori information */
/* with a-posteriori information, layered schedule */
/*******************************************************************************/
// absolute value of integer v
#define SCMS_ABS(v) (((v)<0)?(-v):(v))
unsigned scmsfp2_decode(mod2sparse *H, double *lratio, char *dblk, char *pchk, double *bprb, scmsfp_data *sd) {
int N, n, c;
N = mod2sparse_cols(H);
/* Initialize probabilities, likelihood ratios, SCMS data, and find initial guess */
scmsfp2_init(H,lratio,dblk,bprb,sd);
/* Do up to abs(max_iter) iterations of probability propagation, stopping early if a codeword is found, unless max_iter is negative. */
for (n = 0; ; n++) {
c = check(H,dblk,pchk);
if (table==2) {
printf("%7d %5d %8.1f %6d %+9.2f %8.1f %+9.2f %7.1f\n", block_no, n, changed(lratio,dblk,N), c, loglikelihood(lratio,dblk,N), expected_parity_errors(H,bprb), expected_loglikelihood(lratio,bprb,N), entropy(bprb,N));
}
if (n==max_iter || n==-max_iter || (max_iter>0 && c==0)) {
break;
}
scmsfp2_iter(H,lratio,dblk,bprb,sd);
}
return n;
}
/* initialize */
void scmsfp2_init(mod2sparse *H, double *lratio, char *dblk, double *bprb, scmsfp_data *sd) {
int N;
int M;
int row, col, i;
double dtmp;
mod2entry *e;
N = mod2sparse_cols(H);
M = mod2sparse_rows(H);
// Find max row degrees
for(row = 0; row < M; row++) {
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) // for all active columns in row
;
sd->b[row] = chk_alloc (i, sizeof **(sd->b));
sd->a[row] = chk_alloc (i, sizeof **(sd->a));
}
for (col = 0; col<N; col++) {
if (bprb) bprb[col] = 1 - 1/(1+lratio[col]);
dblk[col] = lratio[col]>=1;
dtmp = -log(lratio[col]);
sd->g[col] = scms_saturate(round(dtmp), sd->size);
sd->h[col] = sd->g[col];
}
for(row = 0; row < M; row++) {
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) { // for all active columns in row
col = e->col; // column index
sd->b[row][i] = 0; // CN
sd->a[row][i] = sd->h[col]; // VN
}
}
}
/* compute one iteration */
void scmsfp2_iter(mod2sparse *H, double *lratio, char *dblk, double *bprb, scmsfp_data *sd) {
mod2entry *e;
int N, M;
int64_t itmp;
int i, col, row;
int64_t min1;
int64_t min2;
int idx;
int sp;
M = mod2sparse_rows(H);
N = mod2sparse_cols(H);
for (row = 0; row<M; row++) {
min1 = -1;
min2 = -1;
idx = 0;
sp = 1;
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) {
col = e->col;
sp = sp * SCMS_SIGN_MP(sd->a[row][i]);
itmp = SCMS_ABS(sd->a[row][i]);
if(itmp < min1 || min1 < 0) {
min2 = min1;
min1 = itmp;
idx = i;
} else if(itmp < min2 || min2 < 0) {
min2 = itmp;
}
}
for (e = mod2sparse_first_in_row(H,row), i = 0; !mod2sparse_at_end(e); e = mod2sparse_next_in_row(e), i++) {
col = e->col;
itmp = sp * SCMS_SIGN_MP(sd->a[row][i]);
if(idx == i) {
sd->b[row][i] = itmp * min2;
} else {
sd->b[row][i] = itmp * min1;
}
itmp = scms_saturate(sd->h[col], sd->size);
if((SCMS_SIGN_MP(sd->a[row][i]) != SCMS_SIGN_MP(itmp)) && (sd->a[row][i] != 0)) {
sd->a[row][i] = 0;
} else {
sd->a[row][i] = itmp;
}
sd->h[col] = scms_saturate(sd->h[col] + sd->b[row][i], sd->size);
}
}
for (col = 0; col<N; col++) { // for all columns
if (bprb) bprb[col] = 1 - 1/(1+exp(-sd->h[col]));
dblk[col] = sd->h[col] < 0;
}
}
/*********************************************************/
/* self-corrected min-sum, fixed point, layered schedule */
/*********************************************************/
......
......@@ -148,6 +148,30 @@ int main
{ usage();
}
}
else if (strcmp(meth[0],"scmsfp1")==0)
{ dec_method = Scmsfp1;
if (!meth[1] || sscanf(meth[1],"%d%c",&max_iter,&junk)!=1)
{ usage();
}
if (!meth[2] || sscanf(meth[2],"%d%c",&sdfp.size,&junk)!=1 || meth[3])
{ usage();
}
if (sdfp.size < 1 || sdfp.size > 32)
{ usage();
}
}
else if (strcmp(meth[0],"scmsfp2")==0)
{ dec_method = Scmsfp2;
if (!meth[1] || sscanf(meth[1],"%d%c",&max_iter,&junk)!=1)
{ usage();
}
if (!meth[2] || sscanf(meth[2],"%d%c",&sdfp.size,&junk)!=1 || meth[3])
{ usage();
}
if (sdfp.size < 1 || sdfp.size > 32)
{ usage();
}
}
else if (strcmp(meth[0],"scmsla")==0)
{ dec_method = Scmsla;
if (!meth[1] || sscanf(meth[1],"%d%c",&max_iter,&junk)!=1)
......@@ -303,6 +327,14 @@ int main
{ scms_decode_setup();
break;
}
case Scmsfp1:
{ scms_decode_setup();
break;
}
case Scmsfp2:
{ scms_decode_setup();
break;
}
case Scmsla:
{ scms_decode_setup();
break;
......@@ -399,6 +431,14 @@ int main
{ iters = scmsfp_decode (H, lratio, dblk, pchk, bitpr, &sdfp);
break;
}
case Scmsfp1:
{ iters = scmsfp1_decode (H, lratio, dblk, pchk, bitpr, &sdfp);
break;
}
case Scmsfp2:
{ iters = scmsfp2_decode (H, lratio, dblk, pchk, bitpr, &sdfp);
break;
}
case Scmsla:
{ iters = scmsla_decode (H, lratio, dblk, pchk, bitpr, &sdla);
break;
......@@ -488,6 +528,6 @@ void usage(void)
" decode [ -f ] [ -t | -T ] pchk-file received-file decoded-file [ bp-file ] channel method\n");
channel_usage();
fprintf(stderr,
"Method: enum-block gen-file | enum-bit gen-file | prprp [-]max-iterations | scms [-]max-iterations | scmsfp [-]max-iterations 1<=bit-width<=32 | scmsla [-]max-iterations 1<=bit-width<=32 | scmspp [-]max-iterations 1<=bit-width<=32 1<=parallel-level\n");
"Method: enum-block gen-file | enum-bit gen-file | prprp [-]max-iterations | scms [-]max-iterations | scmsfp[1] [-]max-iterations 1<=bit-width<=32 | scmsla [-]max-iterations 1<=bit-width<=32 | scmspp [-]max-iterations 1<=bit-width<=32 1<=parallel-level\n");
exit(1);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment