Changeset 1660


Ignore:
Timestamp:
Nov 5, 2011, 8:28:47 AM (7 years ago)
Author:
ksherdy
Message:

Preliminary check in of CarryQ advance32, interpose functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/carryQ.hpp

    r1659 r1660  
    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_slli_32(s, n), simd_srli_32(s32, 32-n));
    3434}
    3535
     
    7171        CarryArray()
    7272        {
    73                 Carry0 = simd::constant<0>();
    74                 Carry1 = simd::constant<1>();
     73                Carry0 = simd< sizeof(BitBlock)*8 >::constant<0>();
     74                Carry1 = simd< sizeof(BitBlock)*8 >::constant<1>();
    7575
    7676                memset (cq, 0, sizeof(BitBlock) * CarryCount);// size_t num )
     
    150150        {
    151151                uint32_t temp = pending32;
    152                 pending32 = mvmd<32>::extract<0>((simd::srli<96>(strm)));
    153                 return simd_or(simd::slli<32>(strm), mvmd<32>::extract<0>(temp));
    154 
    155         }
     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
    156158
    157159/*
     
    165167        IDISA_ALWAYS_INLINE BitBlock BitBlock_advance32_co(BitBlock strm, uint32_t & pending32)
    166168        {
    167                 pending32 = mvmd<32>::extract<0>((simd::srli<96>(strm)));
    168                 return simd::slli<32>(strm);
     169                pending32 = (uint32_t) mvmd<32>::extract<0>((simd< sizeof(BitBlock)*8 >::srli<96>(strm)));
     170                return simd< sizeof(BitBlock)*8 >::slli<32>(strm);
    169171        }
    170172
Note: See TracChangeset for help on using the changeset viewer.