78 {
79 int idx = blockIdx.x*blockDim.x +threadIdx.x;
80 int idy = blockIdx.y*blockDim.y +threadIdx.y;
81 if( (idx>idy) || (idx>=SecDim) || (idy>=SecDim) ) return;
82 dmatTot[idx+LDT*idy] = dComplexZero<>;
86
87 for(int trans1 = 0;trans1 < periodicity[idx]; ++trans1) {
88 Id1 = transSpin(representatives[idx],trans1,dloc,n);
89 locId1 = Id1%dimMatLoc;
90 for(int trans2 = 0;trans2 < periodicity[idy]; ++trans2) {
91 Id2 = transSpin(representatives[idy],trans2,dloc,n);
92 locId2 = Id2%dimMatLoc;
93 if( Id1/dimMatLoc != Id2/dimMatLoc ) continue;
94 theta = 2.0*M_PI*momentum*(trans2-trans1)/(
Real_t)n;
95 dmatTot[idx+LDT*idy] += dmatLoc[locId1+LDL*locId2]*
MAGMA_CEXP(theta);
96 }
97 }
98 dmatTot[idx+LDT*idy] /= sqrt( (
Real_t)periodicity[idx]*periodicity[idy] );
99 dmatTot[idy+LDT*idx] = conj(dmatTot[idx+LDT*idy]);
100}
__device__ Complex_t< double > MAGMA_CEXP(Real_t theta)
Definition generateRM.cuh:132
double Real_t
Definition mytypes.hpp:37
MKL_INT Integer_t
Definition mytypes.hpp:359