mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 04:37:05 +01:00
Introduce view objects that can safely be copied to GPU for access
This commit is contained in:
@ -30,7 +30,6 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
#include <Grid/Grid.h>
|
||||
|
||||
using namespace Grid;
|
||||
;
|
||||
|
||||
#define POWER10
|
||||
|
||||
@ -84,10 +83,11 @@ int main (int argc, char ** argv)
|
||||
pickCheckerboard(Odd,Uo,U);
|
||||
|
||||
// std::cout<<GridLogMessage << U<<std::endl;
|
||||
std::cout<<GridLogMessage<< U <<std::endl;
|
||||
std::cout<<GridLogMessage << "U " <<norm2(U)<<std::endl;
|
||||
std::cout<<GridLogMessage << "Ue " <<norm2(Ue)<<std::endl;
|
||||
std::cout<<GridLogMessage << "Uo " <<norm2(Uo)<<std::endl;
|
||||
|
||||
|
||||
TComplex cm;
|
||||
TComplex cmeo;
|
||||
for(int dir=0;dir<Nd;dir++){
|
||||
|
@ -547,7 +547,7 @@ int main(int argc, char **argv) {
|
||||
coor[1]++) {
|
||||
for (coor[0] = 0; coor[0] < latt_size[0] / mpi_layout[0];
|
||||
coor[0]++) {
|
||||
std::complex<Grid::Real> diff;
|
||||
Complex diff;
|
||||
|
||||
std::vector<int> shiftcoor = coor;
|
||||
shiftcoor[dir] = (shiftcoor[dir] + shift + latt_size[dir]) %
|
||||
|
@ -89,9 +89,11 @@ int main (int argc, char ** argv)
|
||||
// replicate across fifth dimension
|
||||
////////////////////////////////////
|
||||
LatticeGaugeField Umu5d(FGrid);
|
||||
auto umu5d = Umu5d.View();
|
||||
auto umu = Umu.View();
|
||||
for(int ss=0;ss<Umu.Grid()->oSites();ss++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
Umu5d[Ls*ss+s] = Umu[ss];
|
||||
umu5d[Ls*ss+s] = umu[ss];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user