Skip to content

Bugs in AVX kernel for DD (likely elsewhere) #353

Description

@manodeep

Claude identified the bug in this line - the bin update is missing a popcnt on num_left, i.e., the line should be:

npairs[nbin-1] += AVX_BIT_COUNT_INT(num_left);/* add the total number of pairs to the last bin and continue j-loop*/

Claude also went on to identify that the reason the bug wasn't uncovered was that the if check in this line should have been comparing against nbin-2 , rather than nbin-1. This bug ensured the if was never satisfied, and that the missing popcnt bug was never triggered.

Since the bugs were never triggered, thankfully, the results were unaffected. (Also tests would have caught the bugs - but it's surprising that the bugs have been there in the code for so long)

Good job Claude :)

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