00001
00002 void ildg_gauge_reader(gauge_field& U,
00003 filename,
00004 header_bytes=0,
00005 precision=16) {
00006
00007 mdp_site x(lattice());
00008 mdp_site y(lattice());
00009 mdp_matrix v[4];
00010 if(precision==16) U.load_as_float(filename,0,512,false,header_bytes);
00011 else if(precision==32) U.load_as_double(filename,0,512,false,header_bytes);
00012 forallsites(x) {
00013 if(x(1)<x(3)) {
00014 y.set(x(0),x(3),x(2),x(1));
00015 v[0]=U(x,3);
00016 v[1]=U(x,0);
00017 v[2]=U(x,1);
00018 v[3]=U(x,2);
00019 U(x,0)=U(y,3);
00020 U(x,1)=U(y,0);
00021 U(x,2)=U(y,1);
00022 U(x,3)=U(y,2);
00023 U(y,0)=v[0];
00024 U(y,1)=v[1];
00025 U(y,2)=v[2];
00026 U(y,3)=v[3];
00027 }
00028 }
00029 }