return l;
OLattice<T1> d;  if (offnodeP) {     typedef T1 * T1ptr; T1 **dest = new T1ptr[Layout::sitesOnNode()]; QMP_msgmem_t msg[2]; QMP_msghandle_t mh_a[2], mh;    if (srcenodes.size() != 1) QMP_error_exit("Map: for now only allow 1 destination node");  if (destnodes.size() != 1) QMP_error_exit("Map: for now only allow receives from 1 node");  int dstnum = destnodes_num[0]*sizeof(T1); int srcnum = srcenodes_num[0]*sizeof(T1); T1 *send_buf = (T1 *)(QMP_allocate_aligned_memory(dstnum)); T1 *recv_buf = (T1 *)(QMP_allocate_aligned_memory(srcnum));    const int my_node = Layout::nodeNumber(); for(int i=0, si=0, ri=0; i < Layout::sitesOnNode(); ++i) { if (dstnode[i] != my_node) send_buf[si++] = l.elem(i);  if (srcnode[i] != my_node) {   dest[i] = &(recv_buf[ri++]); } else {   dest[i] = &(const_cast<T1&>(l.elem(soffsets[i]))); } }  QMP_status_t err;    msg[0]  = QMP_declare_msgmem(recv_buf, srcnum); msg[1]  = QMP_declare_msgmem(send_buf, dstnum); mh_a[0] = QMP_declare_receive_from(msg[0], srcenodes[0], 0); mh_a[1] = QMP_declare_send_to(msg[1], destnodes[0], 0); mh      = QMP_declare_multiple(mh_a, 2);     if ((err = QMP_start(mh)) != QMP_SUCCESS) QMP_error_exit(QMP_error_string(err));     if ((err = QMP_wait(mh)) != QMP_SUCCESS) QMP_error_exit(QMP_error_string(err));    QMP_free_msghandle(mh_a[1]); QMP_free_msghandle(mh_a[0]); QMP_free_msghandle(mh); QMP_free_msgmem(msg[1]); QMP_free_msgmem(msg[0]);     for(int i=0; i < Layout::sitesOnNode(); ++i) {  d.elem(i) = *(dest[i]); }   QMP_free_aligned_memory(recv_buf); QMP_free_aligned_memory(send_buf); delete dest;   } else {     for(int i=0; i < Layout::sitesOnNode(); ++i) {  d.elem(i) = l.elem(soffsets[i]); } }    return d;
  operator()(const OScalar<T1> & l)    {      return l;    }