#include #include #include #include #include CPS_START_NAMESPACE #ifndef USE_QMP #define QMP #endif void GlobalDataShift::Shift(int direction, int n_disp){ if (n_disp==0) return; SCUDir s_dir,r_dir; int a_disp; void *send_p,*recv_p,*temp_p; #ifndef USE_QMP if (n_disp>0){ a_disp = n_disp; s_dir = gjp_scu_dir[i*2]; r_dir = gjp_scu_dir[i*2+1]; } else { a_disp = -n_disp; s_dir = gjp_scu_dir[i*2+1]; r_dir = gjp_scu_dir[i*2]; } #else // int direction = i; int sflag; if (n_disp > 0) sflag = +1; else sflag = -1; #endif send_p = addr; recv_p = temp_buf; #ifndef USE_QMP SCUDirArgIR Send(send_p,s_dir,SCU_SEND,data_len); SCUDirArgIR Recv(recv_p,r_dir,SCU_REC,data_len); #else QMP_msgmem_t msgmem[2]; QMP_msghandle_t msghandle[2]; QMP_status_t status; QMP_msghandle_t multiple; #endif // sys_cacheflush(0); for(int i = 0;i