Ejemplo n.º 1
0
void Compute::sendA() {
    int indexZ = thisIndex.z;

    for(int k=0; k<num_chare_z; k++)
        if(k != indexZ) {
            // use a local pointer for chares on the same processor
            Compute* c = compute(thisIndex.x, thisIndex.y, k).ckLocal();
            if(c != NULL)
                c->receiveA(indexZ, &A[indexZ*subBlockDimXz*blockDimY], subBlockDimXz * blockDimY);
            else
                compute(thisIndex.x, thisIndex.y, k).receiveA(indexZ, &A[indexZ*subBlockDimXz*blockDimY], subBlockDimXz * blockDimY);
        }
}
Ejemplo n.º 2
0
void Compute::sendA() {
  int indexZ = thisIndex.z;

  for(int k=0; k<num_chare_z; k++)
    if(k != indexZ) {
#if USE_CKDIRECT
      CkDirect_put(&sHandles[num_chare_x + num_chare_y + k]);
#else
      // use a local pointer for chares on the same processor
      Compute* c = compute(thisIndex.x, thisIndex.y, k).ckLocal();
      if(c != NULL)
	c->receiveA(indexZ, &A[indexZ*subBlockDimXz*blockDimY], subBlockDimXz * blockDimY);
      else
	compute(thisIndex.x, thisIndex.y, k).receiveA(indexZ, &A[indexZ*subBlockDimXz*blockDimY], subBlockDimXz * blockDimY);
#endif
    }
}