My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
dfg_instantiation.c File Reference

Instantiation of a dfg on a runtime. More...

#include "logging.h"
#include "local_msu.h"
#include "dfg.h"
#include "routing.h"

Go to the source code of this file.

Functions

static int add_dfg_route_endpoints (int route_id, struct dfg_route_endpoint **endpoints, int n_endpoints)
 Adds the provided endpoints to the route with the provided route_id More...
 
static int spawn_dfg_routes (struct dfg_route **routes, int n_routes)
 Creates the given routes on the runtime. More...
 
static int add_all_dfg_route_endpoints (struct dfg_route **routes, int n_routes)
 Adds all of the endpoints for the provided routes to the provided routes. More...
 
static int add_dfg_routes_to_msu (struct local_msu *msu, struct dfg_route **routes, int n_routes)
 Subscribes the MSU to the provided routes. More...
 
static int spawn_dfg_msus (struct worker_thread *thread, struct dfg_msu **msus, int n_msus)
 Creates all of the MSUs on the provided worker thread. More...
 
static int spawn_dfg_threads (struct dfg_thread **threads, int n_threads)
 Creates all of the provided threads (including MSUs) on the current runtime. More...
 
int init_dfg_msu_types (struct dfg_msu_type **msu_types, int n_msu_types)
 Runs the runtime initilization function for the given MSU types. More...
 
int instantiate_dfg_runtime (struct dfg_runtime *rt)
 Instantiates the MSUs, routes, and threads on the specified runtime. More...
 

Detailed Description

Instantiation of a dfg on a runtime.

Definition in file dfg_instantiation.c.

Function Documentation

static int add_all_dfg_route_endpoints ( struct dfg_route **  routes,
int  n_routes 
)
static

Adds all of the endpoints for the provided routes to the provided routes.

Definition at line 79 of file dfg_instantiation.c.

static int add_dfg_route_endpoints ( int  route_id,
struct dfg_route_endpoint **  endpoints,
int  n_endpoints 
)
static

Adds the provided endpoints to the route with the provided route_id

Definition at line 33 of file dfg_instantiation.c.

static int add_dfg_routes_to_msu ( struct local_msu msu,
struct dfg_route **  routes,
int  n_routes 
)
static

Subscribes the MSU to the provided routes.

Definition at line 95 of file dfg_instantiation.c.

int init_dfg_msu_types ( struct dfg_msu_type **  msu_types,
int  n_msu_types 
)

Runs the runtime initilization function for the given MSU types.

Parameters
msu_typeslist of pointers to MSU types
n_msu_typesSize of msu_types
Returns
0 on success, -1 on error

Definition at line 160 of file dfg_instantiation.c.

int instantiate_dfg_runtime ( struct dfg_runtime rt)

Instantiates the MSUs, routes, and threads on the specified runtime.

Definition at line 174 of file dfg_instantiation.c.

static int spawn_dfg_msus ( struct worker_thread thread,
struct dfg_msu **  msus,
int  n_msus 
)
static

Creates all of the MSUs on the provided worker thread.

Definition at line 111 of file dfg_instantiation.c.

static int spawn_dfg_routes ( struct dfg_route **  routes,
int  n_routes 
)
static

Creates the given routes on the runtime.

Definition at line 63 of file dfg_instantiation.c.

static int spawn_dfg_threads ( struct dfg_thread **  threads,
int  n_threads 
)
static

Creates all of the provided threads (including MSUs) on the current runtime.

Definition at line 138 of file dfg_instantiation.c.