X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6de03ecc4e630732984a0673512a5d15fd75e270..d19d875fd0b7da4e10227ee00bc2035b68f60f47:/src/simdag/private.h diff --git a/src/simdag/private.h b/src/simdag/private.h index 513dd1e2a6..8549aea672 100644 --- a/src/simdag/private.h +++ b/src/simdag/private.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2014. The SimGrid Team. +/* Copyright (c) 2006-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -10,13 +10,14 @@ #include "xbt/dict.h" #include "xbt/dynar.h" #include "xbt/fifo.h" -#include "simdag/simdag.h" -#include "simdag/datatypes.h" +#include "simgrid/simdag.h" #include "surf/surf.h" #include "xbt/swag.h" #include "xbt/mallocator.h" #include +SG_BEGIN_DECL() + /* Global variables */ typedef struct SD_global { @@ -48,13 +49,6 @@ typedef struct SD_global { extern SD_global_t sd_global; -/* Link */ -typedef struct SD_link { - void *surf_link; /* surf object */ - void *data; /* user data */ - e_SD_link_sharing_policy_t sharing_policy; -} s_SD_link_t; - /* Workstation */ typedef s_xbt_dictelm_t s_SD_workstation_t; typedef struct SD_workstation { @@ -65,16 +59,16 @@ typedef struct SD_workstation { SD_task_t current_task; /* only used in sequential mode */ } s_SD_workstation_priv_t, *SD_workstation_priv_t; -static inline SD_workstation_priv_t SD_workstation_priv(SD_workstation_t host){ - return xbt_lib_get_level(host, SD_HOST_LEVEL); -} - /* Storage */ typedef s_xbt_dictelm_t s_SD_storage_t; typedef struct SD_storage { void *data; /* user data */ + const char *host; } s_SD_storage_priv_t, *SD_storage_priv_t; +static inline SD_storage_priv_t SD_storage_priv(SD_storage_t storage){ + return (SD_storage_priv_t)xbt_lib_get_level(storage, SD_STORAGE_LEVEL); +} /* Task */ typedef struct SD_task { @@ -106,14 +100,12 @@ typedef struct SD_task { /* scheduling parameters (only exist in state SD_SCHEDULED) */ int workstation_nb; SD_workstation_t *workstation_list; /* surf workstations */ - double *computation_amount; - double *communication_amount; + double *flops_amount; + double *bytes_amount; double rate; -#ifdef HAVE_TRACING long long int counter; /* task unique identifier for instrumentation */ char *category; /* sd task category for instrumentation */ -#endif } s_SD_task_t; /* Task dependencies */ @@ -129,9 +121,6 @@ typedef struct SD_dependency { XBT_PUBLIC(xbt_swag_t) SD_simulate_swag(double how_long); /* could be public, but you need to see the internals of the SD_task_t to use it */ -SD_link_t __SD_link_create(void *surf_link, void *data); -#define __SD_link_destroy xbt_free_f - SD_workstation_t __SD_workstation_create(void *surf_workstation, void *data); void __SD_workstation_destroy(void *workstation); @@ -218,5 +207,6 @@ void TRACE_sd_task_execute_start(SD_task_t task); void TRACE_sd_task_execute_end(SD_task_t task); void TRACE_sd_task_destroy(SD_task_t task); +SG_END_DECL() #endif