mirror of
https://github.com/paboyle/Grid.git
synced 2026-08-22 10:29:35 +01:00
Deprecate D2 fields
This commit is contained in:
@@ -33,6 +33,7 @@ using namespace Grid;
|
|||||||
|
|
||||||
int main (int argc, char ** argv)
|
int main (int argc, char ** argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
Grid_init(&argc,&argv);
|
Grid_init(&argc,&argv);
|
||||||
|
|
||||||
int Ls = 12;
|
int Ls = 12;
|
||||||
@@ -61,9 +62,6 @@ int main (int argc, char ** argv)
|
|||||||
LatticeFermionD field_d(FGridD), tmp_d(FGridD);
|
LatticeFermionD field_d(FGridD), tmp_d(FGridD);
|
||||||
random(RNG5,field_d); tmp_d = field_d;
|
random(RNG5,field_d); tmp_d = field_d;
|
||||||
|
|
||||||
LatticeFermionD2 field_d2(FGridF), tmp_d2(FGridF);
|
|
||||||
precisionChange(field_d2, field_d); tmp_d2 = field_d2;
|
|
||||||
|
|
||||||
LatticeFermionF field_f(FGridF), tmp_f(FGridF);
|
LatticeFermionF field_f(FGridF), tmp_f(FGridF);
|
||||||
precisionChange(field_f, field_d); tmp_f = field_f;
|
precisionChange(field_f, field_d); tmp_f = field_f;
|
||||||
|
|
||||||
@@ -141,49 +139,5 @@ int main (int argc, char ** argv)
|
|||||||
}
|
}
|
||||||
std::cout << "d->s " << time_ds/N << "us" << " s->d " << time_sd/N << "us" << std::endl;
|
std::cout << "d->s " << time_ds/N << "us" << " s->d " << time_sd/N << "us" << std::endl;
|
||||||
|
|
||||||
|
|
||||||
std::cout<<GridLogMessage << "Benchmarking single<->double2 (fields initially device-resident)" << std::endl;
|
|
||||||
time_sd = time_ds = 0;
|
|
||||||
for(int i=0;i<N;i++){
|
|
||||||
field_d2 = tmp_d2;
|
|
||||||
field_f = tmp_f;
|
|
||||||
|
|
||||||
double start=usecond();
|
|
||||||
precisionChangeFast(field_d2,field_f);
|
|
||||||
double stop=usecond();
|
|
||||||
time_sd += stop - start;
|
|
||||||
|
|
||||||
field_d2 = tmp_d2;
|
|
||||||
field_f = tmp_f;
|
|
||||||
|
|
||||||
start=usecond();
|
|
||||||
precisionChangeFast(field_f,field_d2);
|
|
||||||
stop=usecond();
|
|
||||||
time_ds += stop - start;
|
|
||||||
}
|
|
||||||
std::cout << "d->s " << time_ds/N << "us" << " s->d " << time_sd/N << "us" << std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
std::cout<<GridLogMessage << "Benchmarking single<->double2 through standard precisionChange call(fields initially device-resident) [NB: perf should be the same as the previous test!]" << std::endl;
|
|
||||||
time_sd = time_ds = 0;
|
|
||||||
for(int i=0;i<N;i++){
|
|
||||||
field_d2 = tmp_d2;
|
|
||||||
field_f = tmp_f;
|
|
||||||
|
|
||||||
double start=usecond();
|
|
||||||
precisionChange(field_d2,field_f);
|
|
||||||
double stop=usecond();
|
|
||||||
time_sd += stop - start;
|
|
||||||
|
|
||||||
field_d2 = tmp_d2;
|
|
||||||
field_f = tmp_f;
|
|
||||||
|
|
||||||
start=usecond();
|
|
||||||
precisionChange(field_f,field_d2);
|
|
||||||
stop=usecond();
|
|
||||||
time_ds += stop - start;
|
|
||||||
}
|
|
||||||
std::cout << "d->s " << time_ds/N << "us" << " s->d " << time_sd/N << "us" << std::endl;
|
|
||||||
|
|
||||||
Grid_finalize();
|
Grid_finalize();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user