Changeset cf2d9e in git for factory/gfops.cc


Ignore:
Timestamp:
Jan 10, 2012, 4:53:09 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
72486f0639537653ca068a90c827262845f27ce2
Parents:
41d31d33c92e8a93df58457734616fabacdcb346
git-author:
Martin Lee <martinlee84@web.de>2012-01-10 16:53:09+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-02-03 17:54:39+01:00
Message:
chg: use feFopen to open GF tables if Singular is used

TODO: add a check if table was already read in and if so load it from memory?
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/gfops.cc

    r41d31d rcf2d9e  
    2121#include "variable.h"
    2222#include "gfops.h"
     23
     24#ifdef SINGULAR
     25#include "singext.h"
     26#endif
    2327
    2428
     
    7478        gf_table = new unsigned short[gf_maxtable];
    7579
     80/*#ifdef SINGULAR
     81    // just copy the table if Singular already read it
     82    //printf("init_gf(gf_get_table) q=%d, nfCharQ=%d\n",q,nfCharQ);
     83    if ( q == nfCharQ )
     84    {
     85        gf_p = p; gf_n = n;
     86        gf_q = q; gf_q1 = q - 1;
     87        gf_m1 = nfM1;
     88        gf_mipo = intVec2CF( nfMinPoly[0], nfMinPoly + 1, 1 );
     89        (void)memcpy( gf_table, nfPlus1Table, gf_q * sizeof( unsigned short ) );
     90        gf_table[gf_q] = 0;
     91        return;
     92    }
     93#endif*/
     94
    7695    // try to open file
    77     sprintf( buffer, GFTABLEDIR "/%d", q );
     96#ifndef SINGULAR
     97    sprintf( buffer, GFTABLEDIR "/%d", q);
    7898    FILE * inputfile = fopen( buffer, "r" );
     99#else
     100    int check= sprintf( buffer, "gftables/%d", q );
     101    FILE * inputfile = feFopen( buffer, "r" );
     102#endif
    79103    STICKYASSERT( inputfile, "can not open GF(q) table" );
    80104
Note: See TracChangeset for help on using the changeset viewer.