Skip to content

Refactor: deduplicate DMR de-interleave tables (rW, rX, rY, rZ, sf_dibit_idx) #10

@felixx-sp

Description

@felixx-sp

Confidence: high · Effort: small (<1 d)

Problem

The DMR de-interleave tables rW, rX, rY, rZ, sf_dibit_idx (originally from DSD-FME's dmr_const.h) are duplicated across three files. Any future correction to these constants has to be applied in four places (the .cu file also has a host/device pair).

Files: src/bruteforce.cu:366-418 (device + host copies), src/bruteforce.c:137-162, src/test_strict_score.c:47-78

Suggested fix

Put a single canonical copy in include/dmr_const.h as static const. The .cu file can wrap it once into __constant__ initializers in the launcher.

Why it matters

Eliminates a "fixed in one place, not the others" bug class. Good groundwork for the upcoming CLI build using bruteforce.c as a base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions