Changeset 3446 for trunk


Ignore:
Timestamp:
Sep 8, 2013, 11:54:45 AM (5 years ago)
Author:
linmengl
Message:

minor changes to proper inline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock256.hpp

    r3443 r3446  
    5353static IDISA_ALWAYS_INLINE carry_t bitblock2carry(bitblock256_t carry) {  return carry;}
    5454
    55 static inline void add_ci_co(bitblock256_t x, bitblock256_t y, carry_t carry_in, carry_t & carry_out, bitblock256_t & sum) {
     55static IDISA_ALWAYS_INLINE void add_ci_co(bitblock256_t x, bitblock256_t y, carry_t carry_in, carry_t & carry_out, bitblock256_t & sum) {
    5656  bitblock256_t all_ones = simd256<1>::constant<1>();
    5757  bitblock256_t gen = simd_and(x, y);
     
    6969}
    7070
    71 IDISA_ALWAYS_INLINE void sub_bi_bo(bitblock256_t x, bitblock256_t y, carry_t borrow_in, carry_t & borrow_out, bitblock256_t & difference){
     71static IDISA_ALWAYS_INLINE void sub_bi_bo(bitblock256_t x, bitblock256_t y, carry_t borrow_in, carry_t & borrow_out, bitblock256_t & difference){
    7272        bitblock256_t gen = simd_andc(y, x);
    7373        bitblock256_t prop = simd_not(simd_xor(x, y));
     
    8585}
    8686
     87IDISA_ALWAYS_INLINE bitblock256_t convert(uint64_t s)
     88{
     89  ubitblock b = {b._256 = simd256<128>::constant<0>()}; // = {0};
     90  b._64[0] = s;
     91  return b._256;
     92}
     93
     94IDISA_ALWAYS_INLINE bitblock128_t convert_128(uint64_t s)
     95{
     96  ubitblock b = {b._256 = simd256<128>::constant<0>()}; // = {0};
     97  b._64[0] = s;
     98  return b._128[0];
     99}
     100
     101IDISA_ALWAYS_INLINE uint64_t convert(bitblock256_t v)
     102{
     103  return (uint64_t) mvmd256<64>::extract<0>(v);
     104}
     105
     106// The code below is not used.
    87107
    88108#ifdef AVX
     
    183203#endif
    184204
    185 
    186 
    187 
    188 
    189205IDISA_ALWAYS_INLINE void sbb128(bitblock128_t x, bitblock128_t y, bitblock128_t borrow_in, bitblock128_t & borrow_out, bitblock128_t & difference)
    190206{
     
    237253#endif
    238254
    239 IDISA_ALWAYS_INLINE bitblock256_t convert(uint64_t s)
    240 {
    241   ubitblock b = {b._256 = simd256<128>::constant<0>()}; // = {0};
    242   b._64[0] = s;
    243   return b._256;
    244 }
    245 
    246 IDISA_ALWAYS_INLINE bitblock128_t convert_128(uint64_t s)
    247 {
    248   ubitblock b = {b._256 = simd256<128>::constant<0>()}; // = {0};
    249   b._64[0] = s;
    250   return b._128[0];
    251 }
    252 
    253 IDISA_ALWAYS_INLINE uint64_t convert(bitblock256_t v)
    254 {
    255   return (uint64_t) mvmd256<64>::extract<0>(v);
    256 }
    257 
    258 
    259255#endif // BITBLOCK256_HPP_
Note: See TracChangeset for help on using the changeset viewer.