示例#1
0
void Compute::sendB() {
    int indexX = thisIndex.x;

    for(int i=0; i<num_chare_x; i++)
        if(i != indexX) {
            // use a local pointer for chares on the same processor
            Compute* c = compute(i, thisIndex.y, thisIndex.z).ckLocal();
            if(c != NULL)
                c->receiveB(indexX, &B[indexX*subBlockDimYx*blockDimZ], subBlockDimYx * blockDimZ);
            else
                compute(i, thisIndex.y, thisIndex.z).receiveB(indexX, &B[indexX*subBlockDimYx*blockDimZ], subBlockDimYx * blockDimZ);
        }
}
示例#2
0
void Compute::sendB() {
  int indexX = thisIndex.x;

  for(int i=0; i<num_chare_x; i++)
    if(i != indexX) {
#if USE_CKDIRECT
      CkDirect_put(&sHandles[i]);
#else
      // use a local pointer for chares on the same processor
      Compute* c = compute(i, thisIndex.y, thisIndex.z).ckLocal();
      if(c != NULL)
	c->receiveB(indexX, &B[indexX*subBlockDimYx*blockDimZ], subBlockDimYx * blockDimZ);
      else
	compute(i, thisIndex.y, thisIndex.z).receiveB(indexX, &B[indexX*subBlockDimYx*blockDimZ], subBlockDimYx * blockDimZ);
#endif
    }
}