Changeset cf2d9e in git


Ignore:
Timestamp:
Jan 10, 2012, 4:53:09 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b21a664aa22dc6e196223af8a74ad4885e83547c')
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?
Location:
factory
Files:
2 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
  • factory/singext.h

    r41d31d rcf2d9e  
    99#include "canonicalform.h"
    1010#include <factory/cf_gmp.h>
     11
     12extern FILE * feFopen ( const char * path, const char * mode);
    1113
    1214/*BEGINPUBLIC*/
Note: See TracChangeset for help on using the changeset viewer.