Changeset 321 for proto


Ignore:
Timestamp:
Oct 24, 2009, 6:59:28 AM (10 years ago)
Author:
cameron
Message:

simplify: bit_count(x) == 128 => has_bit(not(x))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/Compiler/py2bitexpr.py

    r320 r321  
    520520    replace = expr.replace
    521521    if replace == "allzero":
    522         return "\n%sif (bitblock_has_bit(%s) == 0)  {\n"%(" "*indent, target)
     522        return "\n%sif (bitblock_has_bit(%s))  {\n"%(" "*indent, target)
    523523    elif replace == "allone":
    524         return "\n%sif (bitblock_bit_count(%s) == 128) {\n"%(" "*indent, target)
     524        return "\n%sif (bitblock_has_bit(simd_not(%s))) {\n"%(" "*indent, target)
    525525    else:
    526526        assert (1==0)
Note: See TracChangeset for help on using the changeset viewer.