Commit e54f63b2 authored by Matthieu Dorier's avatar Matthieu Dorier

added cortex topology API

parent 8dee7714
......@@ -22,6 +22,11 @@
#include "codes/quickhash.h"
#include "codes/rc-stack.h"
#ifdef ENABLE_CORTEX
#include <cortex/cortex.h>
#include <cortex/topology.h>
#endif
#define CREDIT_SZ 8
#define MEAN_PROCESS 1.0
......@@ -3355,3 +3360,63 @@ struct model_net_method dragonfly_router_method =
.mn_trace_register = router_register_trace,
.mn_get_trace_type = dragonfly_get_trace_types,
};
#ifdef ENABLE_CORTEX
static double dragonfly_get_router_link_bandwidth(void* topo, router_id_t r1, router_id_t r2) {
// TODO
return -1.0;
}
static double dragonfly_get_compute_node_bandwidth(void* topo, cn_id_t node) {
// TODO
return -1.0;
}
static int dragonfly_get_router_neighbor_count(void* topo, router_id_t r) {
// TODO
return 0;
}
static void dragonfly_get_router_neighbor_list(void* topo, router_id_t r, router_id_t* neighbors) {
// TODO
}
static int dragonfly_get_router_location(void* topo, router_id_t r, int32_t* location, int size) {
// TODO
return 0;
}
static int dragonfly_get_compute_node_location(void* topo, cn_id_t node, int32_t* location, int size) {
// TODO
return 0;
}
static router_id_t dragonfly_get_router_from_compute_node(void* topo, cn_id_t node) {
// TODO
return -1;
}
static int dragonfly_get_router_compute_node_count(void* topo, router_id_t r) {
// TODO
return 0;
}
static void dragonfly_get_router_compute_node_list(void* topo, router_id_t r, cn_id_t* nodes) {
// TODO
}
cortex_topology dragonfly_cortex_topology = {
.internal = NULL,
.get_router_link_bandwidth = dragonfly_get_router_link_bandwidth,
.get_compute_node_bandwidth = dragonfly_get_compute_node_bandwidth,
.get_router_neighbor_count = dragonfly_get_router_neighbor_count,
.get_router_neighbor_list = dragonfly_get_router_neighbor_list,
.get_router_location = dragonfly_get_router_location,
.get_compute_node_location = dragonfly_get_compute_node_location,
.get_router_from_compute_node = dragonfly_get_router_from_compute_node,
.get_router_compute_node_count = dragonfly_get_router_compute_node_count,
.get_router_compute_node_list = dragonfly_get_router_compute_node_list,
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment