Skip to content

Commit

Permalink
unsigned long --> uint64_t
Browse files Browse the repository at this point in the history
  • Loading branch information
jgdumas committed Jul 10, 2019
1 parent b1c4c20 commit 520c8c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions examples/omp_block_rank.C
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
// **********************************************************
// Variable globale pour fixer le générateurs des FFT primes
struct FFTSeeder {
unsigned long seed;
FFTSeeder(unsigned long s=0) : seed(s) {}
void setseed(unsigned long s=0) { seed=s; }
unsigned long operator()() const { return this->seed; }
uint64_t seed;
FFTSeeder(uint64_t s=0) : seed(s) {}
void setseed(uint64_t s=0) { seed=s; }
uint64_t operator()() const { return this->seed; }
};
FFTSeeder FFTgenerator;
#define FFT_PRIME_SEED FFTgenerator()
Expand Down Expand Up @@ -233,7 +233,7 @@ int OMP_BLOCK_RANK_main (const Field& F, int argc, char **argv)
OMPTimer chrono1,chrono2,chrono3,chrono4; chrono1.clear(); chrono2.clear(); chrono3.clear(); chrono4.clear();

Integer c; F.cardinality(c);
unsigned long seed = (argc>4?atoi(argv[4]):0);
uint64_t seed = (argc>4?atoi(argv[4]):0);
FFTgenerator.setseed(seed);

typename Field::RandIter generator (F,c,seed);
Expand Down Expand Up @@ -388,7 +388,7 @@ int OMP_BLOCK_RANK_main (const Field& F, int argc, char **argv)
extractLeftSigma(F, LS2, Sigma, defect, nb);
std::cerr<<"done with size: " << LS2.size() << std::endl;
std::cerr<<"Rank of the highest degree coefficient...";
unsigned long rdeg;
uint64_t rdeg;
LinBox::BlasMatrixDomain<Field> D(F);
rdeg = D.rank(LS2[LS2.size()-1]);
typename Field::Element d0,de;
Expand Down Expand Up @@ -544,14 +544,14 @@ int main (int argc, char **argv)
// argv[4]: [optional] random generator seed

int c = (argc>2 ? atoi(argv[2]) : 65521);
unsigned long extend = (unsigned long)FF_EXPONENT_MAX(c,(int)LINBOX_EXTENSION_DEGREE_MAX);
uint64_t extend = (uint64_t)FF_EXPONENT_MAX(c,(int)LINBOX_EXTENSION_DEGREE_MAX);
if (extend > 1) {
std::cerr << "*** WARNING *** would be best using an extension field of degree " << extend << std::endl;
}
#if 0
if (extend > 1) {
typedef Givaro::GFqDom<int64_t> Field;
Field EF( (unsigned long)c, extend);
Field EF( (uint64_t)c, extend);
EF.write(std::cerr << "Using an extension field ") << std::endl;
return OMP_BLOCK_RANK_main(EF,argc,argv);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/smith.C
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int main(int argc, char* argv[])

string src = argv[2];

unsigned long m = 1; if (argc == 4) m = atoi(argv[3]);
uint64_t m = 1; if (argc == 4) m = atoi(argv[3]);

UserTimer T;

Expand Down
6 changes: 3 additions & 3 deletions examples/smithsparse.C
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int main(int argc, char* argv[])
ifstream input(argv[1]);

if (argc > 2) { // so over Z_m
unsigned long m = atoi(argv[2]);
uint64_t m = atoi(argv[2]);
if (m > 4967296) {// too big
cerr << "Modulus too large for this example" << endl;
return -1;
Expand Down Expand Up @@ -182,7 +182,7 @@ int main(int argc, char* argv[])
vector<size_t> exponents;
Givaro::IntFactorDom<> FTD;

typedef pair<integer,unsigned long> PairIntRk;
typedef pair<integer,uint64_t> PairIntRk;
vector< PairIntRk > smith;


Expand All @@ -193,7 +193,7 @@ int main(int argc, char* argv[])

//cout << "integer rank: " << endl;

unsigned long coprimeR; LRank(coprimeR, argv[1], coprimeV);
uint64_t coprimeR; LRank(coprimeR, argv[1], coprimeV);
smith.push_back(PairIntRk(coprimeV, coprimeR));
// cerr << "Rank mod " << coprimeV << " is " << coprimeR << endl;

Expand Down

0 comments on commit 520c8c6

Please sign in to comment.