Changeset e2c181 in git for factory/gfops.cc
 Timestamp:
 Feb 22, 2012, 4:26:12 PM (11 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
 Children:
 ff3a4f4a8e655885eb376e551f47339a6de25bf0
 Parents:
 43bbd6d912fd61156de899f0e8aa1e830a90b6d7
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/gfops.cc
r43bbd6 re2c181 190 190 } 191 191 192 //static bool gf_valid_combination ( int p, int n )193 //{194 //int i = 0;195 //while ( i < gf_primes_len && gf_primes[i] != p ) i++;196 //if ( i == gf_primes_len )197 //return false;198 //else199 //{200 //i = n;201 //int a = 1;202 //while ( a < gf_maxtable && i > 0 )203 //{204 //a *= p;205 //i;206 //}207 //if ( i > 0  a > gf_maxtable )208 //return false;209 //else210 //return true;211 //}212 //}192 static bool gf_valid_combination ( int p, int n ) 193 { 194 int i = 0; 195 while ( i < gf_primes_len && gf_primes[i] != p ) i++; 196 if ( i == gf_primes_len ) 197 return false; 198 else 199 { 200 i = n; 201 int a = 1; 202 while ( a < gf_maxtable && i > 0 ) 203 { 204 a *= p; 205 i; 206 } 207 if ( i > 0  a > gf_maxtable ) 208 return false; 209 else 210 return true; 211 } 212 } 213 213 214 214 void gf_setcharacteristic ( int p, int n, char name ) 215 215 { 216 //ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );216 ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" ); 217 217 gf_name = name; 218 218 gf_get_table( p, n );
Note: See TracChangeset
for help on using the changeset viewer.