Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
also change the namespace of kernel/resource/{Action,Model}
[simgrid.git] / src / include / surf / surf.hpp
index 36ac477..84b8c16 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -6,7 +6,6 @@
 #ifndef SURF_SURF_H
 #define SURF_SURF_H
 
-#include "simgrid/datatypes.h"
 #include "simgrid/forward.h"
 #include "src/internal_config.h"
 #include "xbt/config.h"
 
 namespace simgrid {
 namespace surf {
-class Model;
 class CpuModel;
 class HostModel;
 class NetworkModel;
 class StorageModel;
 class NetworkCm02Link;
-class Action;
 }
 }
 
@@ -37,20 +34,10 @@ class Action;
  *  Generic data structure for a model. The hosts,
  *  the CPUs and the network links are examples of models.
  */
-typedef simgrid::surf::Model* surf_model_t;
 typedef simgrid::surf::CpuModel* surf_cpu_model_t;
 typedef simgrid::surf::HostModel* surf_host_model_t;
 typedef simgrid::surf::NetworkModel* surf_network_model_t;
 typedef simgrid::surf::StorageModel* surf_storage_model_t;
-/** @ingroup SURF_c_bindings
- *  \brief Action structure
- *
- *  Never create s_surf_action_t by yourself ! The actions are created
- *  on the fly when you call execute or communicate on a model.
- *
- *  \see e_surf_action_state_t
- */
-typedef simgrid::surf::Action* surf_action_t;
 
 SG_BEGIN_DECL()
 /* Actions and models are highly connected structures... */
@@ -86,7 +73,8 @@ XBT_PUBLIC(void) model_help(const char* category, s_surf_model_description_t* ta
  * @param model The model from which the action is extracted
  * @return An action in done state
  */
-XBT_PUBLIC(surf_action_t) surf_model_extract_done_action_set(surf_model_t model);
+XBT_PUBLIC(simgrid::kernel::resource::Action*)
+surf_model_extract_done_action_set(simgrid::kernel::resource::Model* model);
 
 /**
  * @brief Pop an action from the failed actions set
@@ -94,7 +82,8 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_done_action_set(surf_model_t model)
  * @param model The model from which the action is extracted
  * @return An action in failed state
  */
-XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t model);
+XBT_PUBLIC(simgrid::kernel::resource::Action*)
+surf_model_extract_failed_action_set(simgrid::kernel::resource::Model* model);
 
 /**
  * @brief Get the size of the running action set of a model
@@ -102,7 +91,7 @@ XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t mode
  * @param model The model
  * @return The size of the running action set
  */
-XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
+XBT_PUBLIC(int) surf_model_running_action_set_size(simgrid::kernel::resource::Model* model);
 
 /**
  * @brief [brief description]
@@ -111,15 +100,7 @@ XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
  * @param action The surf cpu action
  * @param bound [description]
  */
-XBT_PUBLIC(void) surf_cpu_action_set_bound(surf_action_t action, double bound);
-
-/**
- * @brief [brief description]
- * @details [long description]
- *
- * @param action The surf network action
- */
-XBT_PUBLIC(double) surf_network_action_get_latency_limited(surf_action_t action);
+XBT_PUBLIC(void) surf_cpu_action_set_bound(simgrid::kernel::resource::Action* action, double bound);
 
 /** @} */
 
@@ -397,12 +378,9 @@ XBT_PUBLIC(void) surf_exit();
 XBT_PUBLIC(void) parse_platform_file(const char* file);
 
 /********** Tracing **********/
-/* from surf_instr.c */
-void TRACE_surf_action(surf_action_t surf_action, const char* category);
 
 /* instr_routing.c */
 void instr_routing_define_callbacks();
-int instr_platform_traced();
 xbt_graph_t instr_routing_platform_graph();
 void instr_routing_platform_graph_export_graphviz(xbt_graph_t g, const char* filename);