Changeset aa07a0 in git for kernel/fast_mult.cc


Ignore:
Timestamp:
Feb 14, 2005, 1:31:34 PM (19 years ago)
Author:
Michael Brickenstein <bricken@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9cb26468351fcd4a821d55df6f9e83599d693eb9
Parents:
c70e58e289e0fb70ec18f904a7b46f4640a32101
Message:
*bricken: removed memory leak


git-svn-id: file:///usr/local/Singular/svn/trunk@7724 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/fast_mult.cc

    rc70e58 raa07a0  
    11#include "fast_mult.h"
    22#include "kbuckets.h"
     3typedef poly fastmultrec(poly f, poly g);
    34static const int pass_option=1;
    45static void degsplit(poly p,int n,poly &p1,poly&p2, int vn){
     
    4142}
    4243
    43 poly do_unifastmult(poly f,int df,poly g,int dg, int vn){
     44poly do_unifastmult(poly f,int df,poly g,int dg, int vn, fastmultrec rec){
    4445  int n=1;
    4546  if ((f==NULL)||(g==NULL)) return NULL;
     
    7778 
    7879  //p00, p11
    79   poly p00=unifastmult(f0,g0);
    80   poly p11=unifastmult(f1,g1);
     80  poly p00=rec(f0,g0);//unifastmult(f0,g0);
     81  poly p11=rec(f1,g1);
    8182
    8283  //construct erg, factor
     
    9293
    9394 
    94   //  if((f1!=NULL) &&(f0!=NULL) &&(g0!=NULL) && (g1!=NULL)){
    95   if(true){
    96 //eat up f0,f1,g0,g1
    97   poly pbig=unifastmult(pAdd(f0,f1),pAdd(g0,g1));
    98  
     95  if((f1!=NULL) &&(f0!=NULL) &&(g0!=NULL) && (g1!=NULL)){
     96  //if(true){
     97//eat up f0,f1,g0,g1
     98    poly s1=pAdd(f0,f1);
     99    poly s2=pAdd(g0,g1);
     100  poly pbig=rec(s1,s2);
     101  pDelete(&s1);
     102  pDelete(&s2);
    99103
    100104 
     
    232236  //    do_unifastmult_buckets(f,g);
    233237  //else
    234   return do_unifastmult(f,df,g,dg,vn);
    235 
    236 }
    237 
     238  return do_unifastmult(f,df,g,dg,vn,unifastmult);
     239
     240}
     241
Note: See TracChangeset for help on using the changeset viewer.