the kernel :
void CSR(int i,unsigned int N,
unsigned int *xadj,unsigned int *adjncy,
double *dataxx,double *datayy,double *datazz,
double *Cspin,
double *CHDemag,double *CH)
{
if(i < N)
{
double dot[3]={0,0,0};
for(int n = xadj[i] ; n < xadj[i+1]; n++)
{
unsigned int neigh=adjncy[n];
printf("%d\n",n);
printf("%f,%f,%f\n",dataxx[n],datayy[n],datazz[n]);
double val[3] = {dataxx[n],datayy[n],datazz[n]};
for(unsigned int co = 0 ; co < 3 ; co++)
{
dot[co]+=(val[co]*Cspin[3*neigh+co]);
}
}
double a=CHDemag[3*i];
double b=CHDemag[3*i+1];
double c=CHDemag[3*i+2];
CH[3*i]=a+dot[0];
CH[3*i+1]=b+dot[1];
CH[3*i+2]=c+dot[2];
// CH[3*i]=CHDemag[3*i]+dot[0];
// CH[3*i+1]=CHDemag[3*i+1]+dot[1];
// CH[3*i+2]=CHDemag[3*i+2]+dot[2];
}
}
under the same code and the machine(except gpu)
titan v:490ms
rtx2080 :380ms
titan v’s double precision compatity may better than rtx2080ti
but the result doesn’t.
may i shoule compile the code to double precision using some arg ?
thank you.