Changeset 1662 for trunk/lib/carryQ.hpp


Ignore:
Timestamp:
Nov 5, 2011, 12:47:07 PM (8 years ago)
Author:
ksherdy
Message:

Update interpose, advance32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/carryQ.hpp

    r1660 r1662  
    3131static IDISA_ALWAYS_INLINE BitBlock interpose32(BitBlock s, BitBlock s32, const uint32_t n);
    3232IDISA_ALWAYS_INLINE BitBlock interpose32(BitBlock s, BitBlock s32, const uint32_t n) {
    33         return simd_or(simd_slli_32(s, n), simd_srli_32(s32, 32-n));
     33        return simd_or(simd<32>::slli<n>(s), simd<32>::srli<32-n>(s32));
    3434}
    3535
     
    7171        CarryArray()
    7272        {
    73                 Carry0 = simd< sizeof(BitBlock)*8 >::constant<0>();
    74                 Carry1 = simd< sizeof(BitBlock)*8 >::constant<1>();
     73                Carry0 = simd<BLOCK_SIZE>::constant<0>();
     74                Carry1 = simd<BLOCK_SIZE>::constant<1>();
    7575
    7676                memset (cq, 0, sizeof(BitBlock) * CarryCount);// size_t num )
     
    150150        {
    151151                uint32_t temp = pending32;
    152                 pending32 = (uint32_t) mvmd<32>::extract<0>((simd< sizeof(BitBlock)*8 >::srli<96>(strm)));
    153                 return simd_or(simd< sizeof(BitBlock)*8 >::slli<32>(strm), mvmd128< sizeof(BitBlock)*8 >::fill((uint32_t)temp) );
    154 
    155         }
    156 
    157 
     152                pending32 = (uint32_t) mvmd<32>::extract<3>(strm);
     153                return mvmd<32>::dslli<1>(strm, mvmd128<BLOCK_SIZE>::fill((uint32_t)temp));
     154        }
    158155
    159156/*
     
    167164        IDISA_ALWAYS_INLINE BitBlock BitBlock_advance32_co(BitBlock strm, uint32_t & pending32)
    168165        {
    169                 pending32 = (uint32_t) mvmd<32>::extract<0>((simd< sizeof(BitBlock)*8 >::srli<96>(strm)));
    170                 return simd< sizeof(BitBlock)*8 >::slli<32>(strm);
     166                pending32 = (uint32_t) mvmd<32>::extract<3>(strm);
     167                return mvmd<32>::slli<1>(strm);
    171168        }
    172169
Note: See TracChangeset for help on using the changeset viewer.