-/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2006-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "xbt/dict.h"
#include "xbt/dynar.h"
#include "xbt/fifo.h"
-#include "simdag/simdag.h"
-#include "simdag/datatypes.h"
-#include "surf/solver.h"
+#include "simgrid/simdag.h"
#include "surf/surf.h"
#include "xbt/swag.h"
#include "xbt/mallocator.h"
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 xbt_lib_get_level(storage, SD_STORAGE_LEVEL);
+}
+
/* Task */
typedef struct SD_task {
s_xbt_swag_hookup_t state_hookup;
/* 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 */
{
return task->state_set == sd_global->running_task_set;
}
+
+/********** Storage **********/
+SD_storage_t __SD_storage_create(void *surf_storage, void *data);
+void __SD_storage_destroy(void *storage);
+
/********** Tracing **********/
/* declaration of instrumentation functions from sd_task_instr.c */
void TRACE_sd_task_create(SD_task_t task);