示例#1
0
  void cg_set_masks(ConnectionGeneratorDatum& cg, RangeSet& sources, RangeSet& targets)
  {
    std::vector<ConnectionGenerator::Mask> masks(Communicator::get_num_processes());
    cg_create_masks(&masks, sources, targets);

    cg->setMask(masks, Communicator::get_rank());
  }
示例#2
0
/**
 * Set the masks on the ConnectionGenerator cg. This function also
 * creates the masks from the given RangeSets sources and targets.
 *
 * \param cg The ConnectionGenerator to set the masks on
 * \param sources The source ranges to create the source masks from
 * \param targets The target ranges to create the target masks from
 */
void
cg_set_masks( ConnectionGeneratorDatum& cg, RangeSet& sources, RangeSet& targets )
{
  long np = kernel().mpi_manager.get_num_processes();
  std::vector< ConnectionGenerator::Mask > masks( np, ConnectionGenerator::Mask( 1, np ) );

  cg_create_masks( &masks, sources, targets );
  cg->setMask( masks, kernel().mpi_manager.get_rank() );
}