Ignore:
Timestamp:
Jan 24, 2019, 2:32:29 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
08394f319ba420091cccad7e025c3f7cac04c373
Parents:
5abb79fd2458b47b21d297f2c8b26f285ac9546f756676ef1fcf4cff300fb1607a6d21293b253245
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-01-24 14:32:29+01:00
git-committer:
GitHub <noreply@github.com>2019-01-24 14:32:29+01:00
Message:
Merge pull request #906 from rbehrends/prelim-thread-rewrite

Singular changes for multi-threading support.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/linear_algebra/interpolation.cc

    r5abb79f r172d852  
    3131#define exponent int
    3232
    33 static modp_number myp;  // all modp computation done mod myp
    34 static int myp_index; // index of small prime in Singular table of primes
     33STATIC_VAR modp_number myp;  // all modp computation done mod myp
     34STATIC_VAR int myp_index; // index of small prime in Singular table of primes
    3535
    3636static inline modp_number modp_mul (modp_number x,modp_number y)
     
    8181typedef bool *coord_exist_table;
    8282
    83 static int final_base_dim;    // dimension of the quotient space, known from the beginning
    84 static int last_solve_column;  // last non-zero column in "solve" part of matrix, used for speed up
    85 static int n_points;  // modp_number of ideals (points)
    86 static int *multiplicity;  // multiplicities of points
    87 static int variables;  // modp_number of variables
    88 static int max_coord;  // maximal possible coordinate product used during Evaluation
    89 static bool only_modp;  // perform only one modp computations
    90 
    91 static modp_coordinates *modp_points; // coordinates of points for modp problem - used by Evaluate (this is also initial data for only modp)
    92 static q_coordinates *q_points; // coordinates of points for rational data (not used for modp)
    93 static int_coordinates *int_points; // coordinates of points for integer data - used to check generators (not used for modp)
    94 static coord_exist_table *coord_exist; // checks whether all coordinates has been initialized
    95 static mon_list_entry *check_list; // monomials to be checked in next stages
    96 static coordinates *points; // power products of coordinates of points used in modp cycles
    97 static condition_type *condition_list; // conditions stored in an array
    98 static mon_list_entry *lt_list; // leading terms found so far
    99 static mon_list_entry *base_list; // standard monomials found so far
    100 static row_list_entry *row_list; // rows of the matrix (both parts)
    101 static modp_number *my_row; // one special row to perform operations
    102 static modp_number *my_solve_row; // one special row to find the linear dependence ("solve" part)
    103 static mono_type *column_name; // monomials assigned to columns in solve_row
    104 
    105 static int n_results;  // modp_number of performed modp computations (not discarded)
    106 static modp_number modp_denom; // denominator of mod p computations
    107 static modp_result_entry *modp_result; // list of results for various mod p calculations (used for modp - first result is the desired one)
    108 static modp_result_entry *cur_result; // pointer to current result (as before)
    109 static modp_number *congr; // primes used in computations (chinese remainder theorem) (not used for modp)
    110 static modp_number *in_gamma; // inverts used in chinese remainder theorem (not used for modp)
    111 static mpz_t bigcongr; // result, in fact, is given in mod bigcongr (not used for modp)
    112 
    113 static mpz_t *polycoef; // polynomial integercoefficients (not used for modp)
    114 static mono_type *polyexp; // polynomial exponents
     83STATIC_VAR int final_base_dim;    // dimension of the quotient space, known from the beginning
     84STATIC_VAR int last_solve_column;  // last non-zero column in "solve" part of matrix, used for speed up
     85STATIC_VAR int n_points;  // modp_number of ideals (points)
     86STATIC_VAR int *multiplicity;  // multiplicities of points
     87STATIC_VAR int variables;  // modp_number of variables
     88STATIC_VAR int max_coord;  // maximal possible coordinate product used during Evaluation
     89STATIC_VAR bool only_modp;  // perform only one modp computations
     90
     91STATIC_VAR modp_coordinates *modp_points; // coordinates of points for modp problem - used by Evaluate (this is also initial data for only modp)
     92STATIC_VAR q_coordinates *q_points; // coordinates of points for rational data (not used for modp)
     93STATIC_VAR int_coordinates *int_points; // coordinates of points for integer data - used to check generators (not used for modp)
     94STATIC_VAR coord_exist_table *coord_exist; // checks whether all coordinates has been initialized
     95STATIC_VAR mon_list_entry *check_list; // monomials to be checked in next stages
     96STATIC_VAR coordinates *points; // power products of coordinates of points used in modp cycles
     97STATIC_VAR condition_type *condition_list; // conditions stored in an array
     98STATIC_VAR mon_list_entry *lt_list; // leading terms found so far
     99STATIC_VAR mon_list_entry *base_list; // standard monomials found so far
     100STATIC_VAR row_list_entry *row_list; // rows of the matrix (both parts)
     101STATIC_VAR modp_number *my_row; // one special row to perform operations
     102STATIC_VAR modp_number *my_solve_row; // one special row to find the linear dependence ("solve" part)
     103STATIC_VAR mono_type *column_name; // monomials assigned to columns in solve_row
     104
     105STATIC_VAR int n_results;  // modp_number of performed modp computations (not discarded)
     106STATIC_VAR modp_number modp_denom; // denominator of mod p computations
     107STATIC_VAR modp_result_entry *modp_result; // list of results for various mod p calculations (used for modp - first result is the desired one)
     108STATIC_VAR modp_result_entry *cur_result; // pointer to current result (as before)
     109STATIC_VAR modp_number *congr; // primes used in computations (chinese remainder theorem) (not used for modp)
     110STATIC_VAR modp_number *in_gamma; // inverts used in chinese remainder theorem (not used for modp)
     111STATIC_VAR mpz_t bigcongr; // result, in fact, is given in mod bigcongr (not used for modp)
     112
     113STATIC_VAR mpz_t *polycoef; // polynomial integercoefficients (not used for modp)
     114STATIC_VAR mono_type *polyexp; // polynomial exponents
    115115
    116116struct gen_list_struct {mpz_t *polycoef;
     
    119119typedef struct gen_list_struct gen_list_entry;
    120120
    121 static gen_list_entry *gen_list=NULL; // list of resulting generators - output data (integer version)
    122 
    123 static int generic_n_generators; // modp_number of generators - should be the same for all modp comp (not used for modp)
    124 static mono_type *generic_column_name; // monomials assigned to columns in solve_row - should be the same for all modp comp (!!! used for modp)
    125 static mon_list_entry *generic_lt=NULL; // leading terms for ordered generators - should be the same for all modp comp (not used for modp)
    126 static int good_primes; // modp_number of good primes so far;
    127 static int bad_primes; // modp_number of bad primes so far;
    128 static mpz_t common_denom; // common denominator used to force points coordinates to Z (not used for modp)
    129 static bool denom_divisible; // common denominator is divisible by p (not used for modp)
    130 
    131 static poly comparizon_p1;  //polynomials used to do comparizons by Singular
    132 static poly comparizon_p2;
    133 
    134 static modp_number *modp_Reverse; // reverses in mod p
    135 
    136 static bool protocol; // true to show the protocol
     121STATIC_VAR gen_list_entry *gen_list=NULL; // list of resulting generators - output data (integer version)
     122
     123STATIC_VAR int generic_n_generators; // modp_number of generators - should be the same for all modp comp (not used for modp)
     124STATIC_VAR mono_type *generic_column_name; // monomials assigned to columns in solve_row - should be the same for all modp comp (!!! used for modp)
     125STATIC_VAR mon_list_entry *generic_lt=NULL; // leading terms for ordered generators - should be the same for all modp comp (not used for modp)
     126STATIC_VAR int good_primes; // modp_number of good primes so far;
     127STATIC_VAR int bad_primes; // modp_number of bad primes so far;
     128STATIC_VAR mpz_t common_denom; // common denominator used to force points coordinates to Z (not used for modp)
     129STATIC_VAR bool denom_divisible; // common denominator is divisible by p (not used for modp)
     130
     131STATIC_VAR poly comparizon_p1;  //polynomials used to do comparizons by Singular
     132STATIC_VAR poly comparizon_p2;
     133
     134STATIC_VAR modp_number *modp_Reverse; // reverses in mod p
     135
     136STATIC_VAR bool protocol; // true to show the protocol
    137137
    138138#ifdef checksize
    139 static int maximal_size=0;
     139STATIC_VAR int maximal_size=0;
    140140#endif
    141141
Note: See TracChangeset for help on using the changeset viewer.