Changeset c879ee in git for factory/ffops.h


Ignore:
Timestamp:
Oct 19, 2012, 6:38:54 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
05fd55e34baa83465ce4306966c9011d1a156232
Parents:
1bc7201c1a771fb5cc842ca4f475ba3ea91e697963e72b40a6237e50811b0e8745201177d25cb979
Message:
Merge pull request #193 from mmklee/64bitIntegersFactorySW

64bit integers factory sw
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/ffops.h

    r1bc7201 rc879ee  
    3737}
    3838
     39inline long ff_norm ( const long a )
     40{
     41    long n = a % ff_prime;
     42#if defined(i386) || defined(NTL_AVOID_BRANCHING)
     43    n += (n >> 31) & ff_prime;
     44    return n;
     45#else
     46    if (n < 0) n += ff_prime;
     47    return n;
     48#endif
     49}
     50
    3951inline int ff_symmetric( const int a )
     52{
     53    if ( cf_glob_switches.isOn( SW_SYMMETRIC_FF ) )
     54        return ( a > ff_halfprime ) ? a - ff_prime : a;
     55    else
     56        return a;
     57}
     58
     59inline long ff_symmetric( const long a )
    4060{
    4161    if ( cf_glob_switches.isOn( SW_SYMMETRIC_FF ) )
Note: See TracChangeset for help on using the changeset viewer.