macsim/src/node.c
// Destroy the NoC
// Must preserve the Noc Type !
Destroy the NoC
Must preserve the Noc Type !
Destroy the NoC Must preserve the Noc Type !
void noc_destroy_all(node_t *nodes[], rank_t max_rank)
{
    rank_t i;
    unsigned nt = nodes[0]->noc_type;
    for (i=0; i<max_rank; i++) {
        node_t *n = nodes[i];
        switch(n->noc_type){
            case NT_fixedlat:   fixedlat_destroy(n); break;
            case NT_pnbe0:      pnbe0_destroy(n); break;
            case NT_pnbe1:      pnbe1_destroy(n); break;
            case NT_pnbe2:      pnbe2_destroy(n); break;
            case NT_caerus:     caerus_destroy(n); break;
            case NT_pnoa:       pnoa_destroy(n); break;
            case NT_pnaa:       pnaa_destroy(n); break;
            case NT_pnjm0:      pnjm0_destroy(n); break;
            case NT_pnconfig:   pnconfig_destroy(n); break;
            case NT_minbd:      minbd_destroy(n); break;
            case NT_perfect:    perfect_destroy(n); break;
            case NT_debug:      debug_destroy(n); break;
            case NT_manhattan:  manhattan_destroy(n); break;
            default:            fatal("Unknown NoC type %d", n->noc_type);
        }
    }
    switch(nt) {
        case NT_pnjm0:          pnjm0_print_stat(); break;
        case NT_pnconfig:       pnconfig_print_stat(); break;
        case NT_minbd:          minbd_print_stat(); break;
    }
}
void noc_destroy_all ( node_t * nodes [ ] , rank_t max_rank ) { rank_t i ; unsigned nt = nodes [ 0 ] -> noc_type ; for ( i = 0 ; i < max_rank ; i ++ ) { node_t * n = nodes [ i ] ; switch ( n -> noc_type ) { case NT_fixedlat : fixedlat_destroy ( n ) ; break ; case NT_pnbe0 : pnbe0_destroy ( n ) ; break ; case NT_pnbe1 : pnbe1_destroy ( n ) ; break ; case NT_pnbe2 : pnbe2_destroy ( n ) ; break ; case NT_caerus : caerus_destroy ( n ) ; break ; case NT_pnoa : pnoa_destroy ( n ) ; break ; case NT_pnaa : pnaa_destroy ( n ) ; break ; case NT_pnjm0 : pnjm0_destroy ( n ) ; break ; case NT_pnconfig : pnconfig_destroy ( n ) ; break ; case NT_minbd : minbd_destroy ( n ) ; break ; case NT_perfect : perfect_destroy ( n ) ; break ; case NT_debug : debug_destroy ( n ) ; break ; case NT_manhattan : manhattan_destroy ( n ) ; break ; default : fatal ( " " , n -> noc_type ) ; } } switch ( nt ) { case NT_pnjm0 : pnjm0_print_stat ( ) ; break ; case NT_pnconfig : pnconfig_print_stat ( ) ; break ; case NT_minbd : minbd_print_stat ( ) ; break ; } }
Destroy the NoC
Must preserve the Noc Type !
Destroy the NoC Must preserve the Noc Type !
//            case NT_paternoster_skeleton:       paternoster_destroy(n); break; //            case NT_gs_one_to_one:              gs_one_to_one_destroy(n); break; //            case NT_gs_one_to_one_dyn:          gs_one_to_one_dyn_destroy(n); break; // print statistics