Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
give SimDag the ability to retrieve the amount of cores per host
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 5 Apr 2014 20:17:45 +0000 (22:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 5 Apr 2014 20:17:45 +0000 (22:17 +0200)
include/simdag/simdag.h
src/simdag/sd_workstation.c

index eee8f60..31ed69d 100644 (file)
@@ -83,6 +83,7 @@ XBT_PUBLIC(int) SD_route_get_size(SD_workstation_t src,
 XBT_PUBLIC(double) SD_workstation_get_power(SD_workstation_t workstation);
 XBT_PUBLIC(double) SD_workstation_get_available_power(SD_workstation_t
                                                       workstation);
 XBT_PUBLIC(double) SD_workstation_get_power(SD_workstation_t workstation);
 XBT_PUBLIC(double) SD_workstation_get_available_power(SD_workstation_t
                                                       workstation);
+XBT_PUBLIC(int) SD_workstation_get_cores(SD_workstation_t workstation);
 XBT_PUBLIC(e_SD_workstation_access_mode_t)
     SD_workstation_get_access_mode(SD_workstation_t workstation);
 XBT_PUBLIC(void) SD_workstation_set_access_mode(SD_workstation_t
 XBT_PUBLIC(e_SD_workstation_access_mode_t)
     SD_workstation_get_access_mode(SD_workstation_t workstation);
 XBT_PUBLIC(void) SD_workstation_set_access_mode(SD_workstation_t
index 108e640..911d596 100644 (file)
@@ -281,6 +281,15 @@ double SD_workstation_get_power(SD_workstation_t workstation)
 {
   return surf_workstation_get_speed(workstation, 1.0);
 }
 {
   return surf_workstation_get_speed(workstation, 1.0);
 }
+/**
+ * \brief Returns the amount of cores of a workstation
+ *
+ * \param workstation a workstation
+ * \return the amount of cores of this workstation
+ */
+int SD_workstation_get_cores(SD_workstation_t workstation) {
+  return surf_workstation_get_core(workstation);
+}
 
 /**
  * \brief Returns the proportion of available power in a workstation
 
 /**
  * \brief Returns the proportion of available power in a workstation