|
drake
1.0.0
|
#include <stdlib.h>#include <string.h>#include <drake/mapping.h>#include <drake/platform.h>#include <assert.h>#include "drawgraph-2.h"
Go to the source code of this file.
Functions | |
| mapping_t *pelib_alloc_collection() | mapping_t (size_t size) |
| int pelib_free() | mapping_t (mapping_t *solution) |
| int pelib_copy() | mapping_t (mapping_t source, mapping_t *copy) |
| int | drake_mapping_insert_task (mapping_t *mapping, processor_id pid, task_t *task) |
| Insert a new task to this mapping. | |
| int | drake_mapping_remove_task (mapping_t *mapping, task_id task) |
| Removes a task from this mapping. | |
| int | drake_mapping_find_processor_index (mapping_t *mapping, processor_id pid) |
| Finds the index of processor in the mapping processor array, from the processor's ID. | |
| processor_id | drake_mapping_find_processor (mapping_t *mapping, task_id tid) |
| Finds the processor (its processor_id) which handles the task pointed by the task_id parameter. | |
| int | drake_mapping_insert_processor (mapping_t *mapping, processor_t *processor) |
| Inserts a new processor in the mapping. | |
| int | drake_mapping_remove_processor (mapping_t *mapping, int processor_id) |
| Not implemented. Removes a processor from the mapping. | |
| int | drake_mapping_violations (mapping_t *mapping) |
| FILE *pelib_printf() | mapping_t (FILE *stream, mapping_t mapping) |
| char *pelib_string() | mapping_t (mapping_t mapping) |
| mapping_t * | drake_mapping_loadstr (mapping_t *mapping, char *str) |
| Reads a mapping from a string in the same format than produced by ilp solver. | |
| mapping_t * | drake_mapping_loadfilterstr (mapping_t *mapping, char *str, int(filter)(task_t *)) |
| mapping_t * | drake_mapping_loadfile (mapping_t *mapping, FILE *file) |
| Reads a mapping from the output of the ILP solver. | |
| mapping_t * | drake_mapping_loadfilterfile (mapping_t *mapping, FILE *file, int(filter)(task_t *)) |
| char * | drake_mapping_drawstr (mapping_t *mapping, char *str) |
| task_t * | drake_mapping_find_task (mapping_t *mapping, task_id id) |
| int | drake_mapping_draw (mapping_t *mapping, FILE *file) |
| Draws the mapping to a .fig file in the appropriate format. | |
| int drake_mapping_draw | ( | mapping_t * | mapping, |
| FILE * | file | ||
| ) |
| char* drake_mapping_drawstr | ( | mapping_t * | , |
| char * | |||
| ) |
| processor_id drake_mapping_find_processor | ( | mapping_t * | mapping, |
| task_id | tid | ||
| ) |
| int drake_mapping_find_processor_index | ( | mapping_t * | mapping, |
| processor_id | pid | ||
| ) |
| task_t* drake_mapping_find_task | ( | mapping_t * | mapping, |
| task_id | id | ||
| ) |
| int drake_mapping_insert_processor | ( | mapping_t * | mapping, |
| processor_t * | processor | ||
| ) |
| int drake_mapping_insert_task | ( | mapping_t * | mapping, |
| processor_id | pid, | ||
| task_t * | task | ||
| ) |
| mapping_t* drake_mapping_loadfile | ( | mapping_t * | mapping, |
| FILE * | ilp_mapping_file | ||
| ) |
Reads a mapping from the output of the ILP solver.
Initializes a mapping_t structure and fills it with a mapping file obtained from the ILP solver the parameter mapping should not be initialized, and the same pointer should receive the result of this function
| mapping | Mapping that will point to the data read |
| ilp_mapping_file | File from where to read the mapping calculated by the ilp solver |
| mapping_t* drake_mapping_loadfilterfile | ( | mapping_t * | mapping, |
| FILE * | ilp_mapping_file, | ||
| int(filter)(task_t *) | |||
| ) |
Similar to drake_mapping_readfile, but filter tasks according to a given user filter function
| mapping | Mapping that will point to the data read |
| ilp_mapping_file | File from where to read the mapping calculated by the ilp solver |
| filter | Pointer to a user function that returns 0 if the task should be kept, non zero otherwise. |
| mapping_t* drake_mapping_loadfilterstr | ( | mapping_t * | mapping, |
| char * | str, | ||
| int(filter)(task_t *) | |||
| ) |
Reads a mapping from a string similarly to drake_mapping_readfile(), and filter tasks according to filter function
| mapping | Mapping that will point to the data read |
| str | Mapping string obtained from the ILP solver |
| filter | Pointer to a user function that returns 0 if the task should be kept, non zero otherwise. |
| mapping_t* drake_mapping_loadstr | ( | mapping_t * | mapping, |
| char * | str | ||
| ) |
| int drake_mapping_remove_processor | ( | mapping_t * | mapping, |
| int | processor_id | ||
| ) |
| int drake_mapping_remove_task | ( | mapping_t * | mapping, |
| task_id | task | ||
| ) |
| int drake_mapping_violations | ( | mapping_t * | ) |