Changeset 2794 for trunk/lib


Ignore:
Timestamp:
Dec 20, 2012, 5:28:40 PM (6 years ago)
Author:
ksherdy
Message:

Added experimental PabloJCarryTest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/carryQ.hpp

    r2719 r2794  
    149149
    150150        IDISA_ALWAYS_INLINE bool CarryTest(uint16_t carryno, uint16_t carry_count)
    151 
    152 
    153151        {
    154152                  BitBlock c1 = cq[carryno];
     
    160158        }
    161159
     160        // Experimental
     161        IDISA_ALWAYS_INLINE BitBlock PabloJCarryTest(uint16_t carryno, uint16_t carry_count)
     162        {
     163                  BitBlock c1 = cq[carryno];
     164                  int ubound = carryno + carry_count;
     165                  for (int i = carryno + 1; i < ubound ; i++) {
     166                        c1 = carry_or(c1, cq[i]);
     167                  }
     168                  return c1;
     169        }
     170
    162171        IDISA_ALWAYS_INLINE void CarryDequeueEnqueue(uint16_t carryno, uint16_t carry_count)
    163172        {
Note: See TracChangeset for help on using the changeset viewer.