Log.write("ContiguousSpaceDriver.send: numTiles=", allTileNum); Log.writeln(", tiles.length=", tiles.length); Log.flush(); */
* Log.write("ContiguousSpaceDriver.send: numTiles=", allTileNum); * Log.writeln(", tiles.length=", tiles.length); Log.flush(); */
  private void send (int event) {    /*    Log.write("ContiguousSpaceDriver.send: numTiles=", allTileNum);    Log.writeln(", tiles.length=", tiles.length);    Log.flush();    */    // start the communication    space.startComm();    int numTiles = allTileNum;    // (1) Scalar Used Space stream    // send the stream data    space.stream(SS_SCALAR_USED_SPACE_STREAM, numTiles);    for (int i = 0; i < numTiles; ++i) {      // Presentation style is not PRESENTATION_PLUS so we can check      if (Assert.VERIFY_ASSERTIONS)        if (tiles[i].scalarUsedSpace > scalarUsedSpaceStream.getMaxValue()) {	  Log.write("Bad value for ContiguousSpaceDriver Scalar Used Space stream: ");	  Log.write(tiles[i].scalarUsedSpace);	  Log.writeln(" max=", scalarUsedSpaceStream.getMaxValue());	  // Assert._assert(false);	}      space.streamIntValue(tiles[i].scalarUsedSpace);    }    space.streamEnd();    // send the summary data    space.summary(SS_SCALAR_USED_SPACE_STREAM, 2 /*items to send*/);    space.summaryValue(totalScalarUsedSpace);    space.summaryValue(subspace.getEnd().diff(subspace.getStart()).toInt());    space.summaryEnd();    // (2) Array Used Space stream    space.stream(SS_ARRAY_USED_SPACE_STREAM, numTiles);    for (int i = 0; i < numTiles; ++i) {      // Presentation style is not PRESENTATION_PLUS so we can check      if (Assert.VERIFY_ASSERTIONS)        if (tiles[i].arrayUsedSpace > arrayUsedSpaceStream.getMaxValue()) {	  Log.write("Bad value for ContiguousSpaceDriver Array Used Space stream: ");	  Log.write(tiles[i].arrayUsedSpace);	  Log.writeln(" max=",  arrayUsedSpaceStream.getMaxValue());	  // Assert._assert(false);	}      space.streamIntValue(tiles[i].arrayUsedSpace);    }    space.streamEnd();    space.summary(SS_ARRAY_USED_SPACE_STREAM, 2);    space.summaryValue(totalArrayUsedSpace);    space.summaryValue(subspace.getEnd().diff(subspace.getStart()).toInt());    space.summaryEnd();    // (3) Scalar Objects stream    space.stream(SS_SCALAR_OBJECTS_STREAM, numTiles);    for (int i = 0; i < numTiles; ++i) {      // Presentation style is PRESENTATION_PLUS so we cannot check max value      space.streamShortValue(tiles[i].scalarObjects);    }    space.streamEnd();    space.summary(SS_SCALAR_OBJECTS_STREAM, 1);    space.summaryValue(totalScalarObjects);    space.summaryEnd();    // (4) Array Objects stream    space.stream(SS_ARRAY_OBJECTS_STREAM, numTiles);    for (int i = 0; i < numTiles; ++i) {      // Presentation style is PRESENTATION_PLUS so we cannot check max value      space.streamShortValue(tiles[i].arrayObjects);    }    space.streamEnd();    space.summary(SS_ARRAY_OBJECTS_STREAM, 1);    space.summaryValue(totalArrayObjects);    space.summaryEnd();    // send the control info    int numBlocks = subspace.getBlockNum();    controlValues(tiles, AbstractTile.CONTROL_USED,		  subspace.getFirstIndex(),		  numBlocks);    if (numBlocks < numTiles)      controlValues(tiles, AbstractTile.CONTROL_UNUSED,		  subspace.getFirstIndex() + numBlocks,		  numTiles - numBlocks);    space.controlEnd(numTiles, tiles);    // send the space info and end    Offset size = subspace.getEnd().diff(subspace.getStart());    sendSpaceInfoAndEndComm(size);  }