Skip to content

Remove headroom calculation option from BFP vector initialization. #127

@astewart-xmos

Description

@astewart-xmos

Currently all forms of bfp_*_init() take a boolean final parameter which indicates whether the vector's headroom should be immediately calculated and set, or if 0 should be used instead.

In hind sight, I don't think this was the right move. The init functions should just set the vector's headroom to 0, and if the user wants to ensure headroom is correct, they can just call bfp_*_headroom() on the vector immediately after. There is no real advantage to combining it into the initialization call, and it makes the explanation of the initialization call just slightly more confusing. Plus I dislike that every call to e.g. bfp_s32_init() ends up having a final argument which is a naked 1 or 0 literal.

Unfortunately this is a backwards compatibility breaking change, and can only really be fixed with a new major version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    size:Stype:enhancementNew feature or requestversion: major incrMajor version number increment required. (Change is not backwards-compatible)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions