示例#1
0
void Compute::sendC() {
    int indexY = thisIndex.y;
    for(int j=0; j<num_chare_y; j++) {
        if(j != indexY) {
            // use a local pointer for chares on the same processor
            Compute *c = compute(thisIndex.x, j, thisIndex.z).ckLocal();
            if(c != NULL)
                c->receiveC(&C[j*subBlockDimXy*blockDimZ], subBlockDimXy * blockDimZ, 1);
            else
                compute(thisIndex.x, j, thisIndex.z).receiveC(&C[j*subBlockDimXy*blockDimZ], subBlockDimXy * blockDimZ, 1);
        }
    }
}
示例#2
0
void Compute::sendC() {
  int indexY = thisIndex.y;
  for(int j=0; j<num_chare_y; j++) {
    if(j != indexY) {
#if USE_CKDIRECT
      CkDirect_put(&sHandles[num_chare_x + j]);
#else
      // use a local pointer for chares on the same processor
      Compute *c = compute(thisIndex.x, j, thisIndex.z).ckLocal();
      if(c != NULL)
	c->receiveC(&C[j*subBlockDimXy*blockDimZ], subBlockDimXy * blockDimZ, 1);
      else
	compute(thisIndex.x, j, thisIndex.z).receiveC(&C[j*subBlockDimXy*blockDimZ], subBlockDimXy * blockDimZ, 1);
#endif
    }
  }
}