Changeset e7a487 in git for factory/gfops.cc
 Timestamp:
 Feb 22, 2012, 6:41:12 PM (11 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 a3aa3f3540f7d9604a809fe2b268a4115e7aef9a
 Parents:
 9b8b090bca59f6bb48b468a6a1b63a90e53e6299ff3a4f4a8e655885eb376e551f47339a6de25bf0
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/gfops.cc
r9b8b09 re7a487 31 31 32 32 const int gf_primes_len = 42; 33 //static unsigned short gf_primes [] = 34 //{ 35 // 2, 3, 5, 7, 11, 13, 17, 19, 36 // 23, 29, 31, 37, 41, 43, 47, 53, 37 // 59, 61, 67, 71, 73, 79, 83, 89, 38 // 97, 101, 103, 107, 109, 113, 127, 131, 39 // 137, 139, 149, 151, 157, 163, 167, 173, 40 // 179, 181, 191, 193, 197, 199, 223, 211, 41 // 227, 229, 233, 239, 241, 251 42 //}; 33 #ifndef NOASSERT 34 static unsigned short gf_primes [] = 35 { 36 2, 3, 5, 7, 11, 13, 17, 19, 37 23, 29, 31, 37, 41, 43, 47, 53, 38 59, 61, 67, 71, 73, 79, 83, 89, 39 97, 101, 103, 107, 109, 113, 127, 131, 40 137, 139, 149, 151, 157, 163, 167, 173, 41 179, 181, 191, 193, 197, 199, 223, 211, 42 227, 229, 233, 239, 241, 251 43 }; 44 #endif 43 45 44 46 int gf_q = 0; … … 190 192 } 191 193 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 //} 194 #ifndef NOASSERT 195 static bool gf_valid_combination ( int p, int n ) 196 { 197 int i = 0; 198 while ( i < gf_primes_len && gf_primes[i] != p ) i++; 199 if ( i == gf_primes_len ) 200 return false; 201 else 202 { 203 i = n; 204 int a = 1; 205 while ( a < gf_maxtable && i > 0 ) 206 { 207 a *= p; 208 i; 209 } 210 if ( i > 0  a > gf_maxtable ) 211 return false; 212 else 213 return true; 214 } 215 } 216 #endif 213 217 214 218 void gf_setcharacteristic ( int p, int n, char name )
Note: See TracChangeset
for help on using the changeset viewer.