Changeset d83c0b in git


Ignore:
Timestamp:
Sep 11, 2013, 3:20:39 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
142afdb13c43074bd1d8e25bc17989486e397819
Parents:
babf57a175c3a59ac32f2f47682bb203ad3ed696
git-author:
Martin Lee <martinlee84@web.de>2013-09-11 15:20:39+02:00
git-committer:
Martin Lee <martinlee84@web.de>2013-09-11 15:31:05+02:00
Message:
fix: memory leak
deleted unnecessary stuff using NTL in non-word size case
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    rbabf57a rd83c0b  
    342342    {
    343343      fac_NTL_char=getCharacteristic();
    344       #ifdef NTL_ZZ
    345       ZZ r;
    346       r=getCharacteristic();
    347       ZZ_pContext ccc(r);
    348       #else
    349       zz_pContext ccc(getCharacteristic());
    350       #endif
    351       ccc.restore();
    352       #ifdef NTL_ZZ
    353       ZZ_p::init(r);
    354       #else
    355344      zz_p::init(getCharacteristic());
    356       #endif
    357     }
    358     #ifdef NTL_ZZ
    359     ZZ_pX F1=convertFacCF2NTLZZpX(f);
    360     ZZ_pX G1=convertFacCF2NTLZZpX(g);
    361     ZZ_pX R;
    362     ZZ_pX A,B;
    363     XGCD(R,A,B,F1,G1);
    364     a=convertNTLZZpX2CF(A,f.mvar());
    365     b=convertNTLZZpX2CF(B,f.mvar());
    366     return convertNTLZZpX2CF(R,f.mvar());
    367     #else
     345    }
    368346    zz_pX F1=convertFacCF2NTLzzpX(f);
    369347    zz_pX G1=convertFacCF2NTLzzpX(g);
     
    374352    b=convertNTLzzpX2CF(B,f.mvar());
    375353    return convertNTLzzpX2CF(R,f.mvar());
    376     #endif
    377354  }
    378355#endif
     
    11281105  {
    11291106    fac_NTL_char=getCharacteristic();
    1130     #ifdef NTL_ZZ
    1131     ZZ r;
    1132     r=getCharacteristic();
    1133     ZZ_pContext ccc(r);
    1134     #else
    1135     zz_pContext ccc(getCharacteristic());
    1136     #endif
    1137     ccc.restore();
    1138     #ifdef NTL_ZZ
    1139     ZZ_p::init(r);
    1140     #else
    11411107    zz_p::init(getCharacteristic());
    1142     #endif
    1143   }
    1144   #ifdef NTL_ZZ
    1145   ZZ_pX F1=convertFacCF2NTLZZpX(F);
    1146   ZZ_pX G1=convertFacCF2NTLZZpX(G);
    1147   ZZ_pX R=GCD(F1,G1);
    1148   return  convertNTLZZpX2CF(R,F.mvar());
    1149   #else
     1108  }
    11501109  zz_pX F1=convertFacCF2NTLzzpX(F);
    11511110  zz_pX G1=convertFacCF2NTLzzpX(G);
    11521111  zz_pX R=GCD(F1,G1);
    11531112  return  convertNTLzzpX2CF(R,F.mvar());
    1154   #endif
    11551113}
    11561114#endif
Note: See TracChangeset for help on using the changeset viewer.