CHROMA
ord_cxmayf_kernel_generic.h
Go to the documentation of this file.
1 inline
2 void ord_cxmayf_kernel(int lo, int hi, int my_id, ord_cxmayf_arg* arg)
3 {
4  int atom=arg->atom;
5  int low = atom*lo;
6  int len = atom*(hi - lo);
7 
8  REAL32* x_ptr = &(arg->x_ptr[low]);
9  REAL32* y_ptr = &(arg->y_ptr[low]);
10 
11  REAL32 a_re = arg->a_re;
12  REAL32 a_im = arg->a_im;
13 
14  if( len%4 == 0) {
15  for(int count=0; count < len; count+=4) {
16  x_ptr[count] = x_ptr[count] - a_re*y_ptr[count];
17  x_ptr[count] += a_im*y_ptr[count+1];
18 
19  x_ptr[count+1] = x_ptr[count+1] - a_re*y_ptr[count+1];
20  x_ptr[count+1] -= a_im*y_ptr[count];
21 
22  x_ptr[count+2] = x_ptr[count+2] - a_re*y_ptr[count+2];
23  x_ptr[count+2] += a_im*y_ptr[count+3];
24  x_ptr[count+3] = x_ptr[count+3] - a_re*y_ptr[count+3];
25  x_ptr[count+3] -= a_im*y_ptr[count+2];
26 
27  }
28  }
29  else {
30  QDPIO::cout << "ord_cxmayf_kernel: len not divisible by 4" << std::endl;
31  QDP_abort(1);
32  }
33 
34 }
int count
Definition: octave.h:14
void ord_cxmayf_kernel(int lo, int hi, int my_id, ord_cxmayf_arg *arg)