Skip to content

bch_decode_jit gives wrong behavior when not compiled. #611

@fyellin

Description

@fyellin

There is a bug in bch_decode_jit.implementation when the code is not compiled.

test_bug():
    field = galois.GF(2**8, compile='python-calculate')
    rs = galois.ReedSolomon(15, 11, field=field)
    bad_message = list(range(15)) 
    rs.decode(bad_message)

The code gives an error on dec_codewords[i, -1] = -1. Jit-compiled code is happy to do this, but uncompiled code will give an error about assigning -1 to an array of type uint8 (or whatever unsigned type the array happens to be).

Perhaps the method needs to just return a tuple of two values rather than shoe-horn two different answers into a single array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions