Changeset 9836f6 in git


Ignore:
Timestamp:
Jun 6, 2017, 11:55:00 AM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
e91901dce5fba3ac4ddf2c91c8a0a1f1f6da2843
Parents:
7b530596c04e94674670d6f56ce78eef6131916c
Message:
minor reformulation in factory
Location:
factory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_chinese.cc

    r7b5305 r9836f6  
    264264void chineseRemainderCached(CFArray &a, CFArray &n, CanonicalForm &xnew, CanonicalForm &prod, CFArray &inv)
    265265{
    266   CanonicalForm p, sum = 0; prod=1;
     266  CanonicalForm p, sum(0L); prod(1L);
    267267  int i;
    268268  int len=n.size();
  • factory/gfops.cc

    r7b5305 r9836f6  
    5454unsigned short * gf_table = 0;
    5555
    56 CanonicalForm gf_mipo(0);
     56CanonicalForm gf_mipo(0L);
    5757
    5858static CanonicalForm intVec2CF ( int degree, int * coeffs, int level )
  • factory/imm.h

    r7b5305 r9836f6  
    6464#if 1
    6565
    66 inline long imm2int ( const InternalCF * const imm )
     66static inline long imm2int ( const InternalCF * const imm )
    6767{
    6868    return ((intptr_t)imm) >> 2;
    6969}
    7070
    71 inline InternalCF * int2imm ( long i )
     71static inline InternalCF * int2imm ( long i )
    7272{
    7373    return (InternalCF*)((i << 2) | INTMARK );
     
    7676#else
    7777
    78 inline int imm2int ( const InternalCF * const imm )
     78static inline long imm2int ( const InternalCF * const imm )
    7979{
    8080    // this could be better done by masking the sign bit
    81     if ( ((int)((intptr_t)imm)) < 0 )
    82         return -((-(intptr_t)imm) >> 2);
    83     else
    84         return (intptr_t)imm >> 2;
    85 }
    86 
    87 inline InternalCF * int2imm ( long i )
     81    if ( ((long)(intptr_t)imm)) < 0 )
     82        return -((-(long)(intptr_t)imm) >> 2);
     83    else
     84        return (long)(intptr_t)imm >> 2;
     85}
     86
     87static inline InternalCF * int2imm ( long i )
    8888{
    8989    if ( i < 0 )
Note: See TracChangeset for help on using the changeset viewer.