runtime/realm/transfer/transfer.cc
// adds a memory path to the DAG, optionally skipping a final memcpy
adds a memory path to the DAG, optionally skipping a final memcpy
adds a memory path to the DAG optionally skipping a final memcpy
static int add_copy_path(std::vector<CopyRequest::XDTemplate>& xd_nodes,
			   std::vector<IBInfo>& ib_edges,
			   int start_edge,
			   const MemPathInfo& info,
			   bool skip_final_memcpy)
  {
    size_t hops = info.xd_kinds.size();
    if(skip_final_memcpy &&
       (info.xd_kinds[hops - 1] == XFER_MEM_CPY))
      hops -= 1;
    if(hops == 0) {
      return start_edge;
    }
    size_t xd_base = xd_nodes.size();
    size_t ib_base = ib_edges.size();
    xd_nodes.resize(xd_base + hops);
    ib_edges.resize(ib_base + hops);
    for(size_t i = 0; i < hops; i++) {
      xd_nodes[xd_base + i].set_simple(info.xd_target_nodes[i],
				       info.xd_kinds[i],
				       (i == 0) ? start_edge :
				                  (ib_base + i - 1),
				       ib_base + i);
      ib_edges[ib_base + i].set(info.path[i + 1],
				65536); 
    }
    return (ib_base + hops - 1);
  }
static int add_copy_path ( std :: vector < CopyRequest :: XDTemplate > & xd_nodes , std :: vector < IBInfo > & ib_edges , int start_edge , const MemPathInfo & info , bool skip_final_memcpy ) { size_t hops = info . xd_kinds . size ( ) ; if ( skip_final_memcpy && ( info . xd_kinds [ hops - 1 ] == XFER_MEM_CPY ) ) hops -= 1 ; if ( hops == 0 ) { return start_edge ; } size_t xd_base = xd_nodes . size ( ) ; size_t ib_base = ib_edges . size ( ) ; xd_nodes . resize ( xd_base + hops ) ; ib_edges . resize ( ib_base + hops ) ; for ( size_t i = 0 ; i < hops ; i ++ ) { xd_nodes [ xd_base + i ] . set_simple ( info . xd_target_nodes [ i ] , info . xd_kinds [ i ] , ( i == 0 ) ? start_edge : ( ib_base + i - 1 ) , ib_base + i ) ; ib_edges [ ib_base + i ] . set ( info . path [ i + 1 ] , 65536 ) ; } return ( ib_base + hops - 1 ) ; }
adds a memory path to the DAG, optionally skipping a final memcpy
adds a memory path to the DAG optionally skipping a final memcpy
// no xd's needed at all - return input edge as output // TODO: pick size? // last edge we created is the output