std::string name_;
public:
-
/** Constructor
*
* @param name Flag name
XBT_PUBLIC void finalize();
XBT_PUBLIC void show_aliases();
XBT_PUBLIC void help();
-}
-}
+} // namespace config
+} // namespace simgrid
#endif
namespace xbt {
template <class F> class MainFunction {
-private:
F code_;
std::shared_ptr<const std::vector<std::string>> args_;
*/
template<class R, class... Args>
class Task<R(Args...)> {
-private:
-
// Placeholder for some class type:
struct whatever {};
}
private:
-
template<class F>
typename std::enable_if<canSBO<F>()>::type
init(F code)
template<class F, class... Args>
class TaskImpl {
-private:
F code_;
std::tuple<Args...> args_;
typedef decltype(simgrid::xbt::apply(std::move(code_), std::move(args_))) result_type;
process->resume();
}
-JNIEXPORT void
-JNICALL Java_org_simgrid_msg_Process_setAutoRestart (JNIEnv *env, jobject jprocess, jboolean jauto_restart) {
-
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_setAutoRestart(JNIEnv* env, jobject jprocess,
+ jboolean jauto_restart)
+{
msg_process_t process = jprocess_to_native(jprocess, env);
if (not process) {
jxbt_throw_notbound(env, "process", jprocess);
env->ReleaseStringUTFChars((jstring) jvalue, value_java);
env->ReleaseStringUTFChars((jstring) jname, name);
-
}
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Storage_getHost(JNIEnv * env,jobject jstorage) {
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_VM_getVMByName(JNIEnv* env, jclass cls, jstring jname)
{
-
/* get the C string from the java string */
if (jname == nullptr) {
jxbt_throw_null(env, "No VM can have a null name");
id = env->GetMethodID(cls, name, signature);
if (not id) {
-
jmethodID tostr_id = env->GetMethodID(cls, "getName", "()Ljava/lang/String;");
jstring jclassname = (jstring) env->CallObjectMethod(cls, tostr_id, nullptr);
const char *classname = env->GetStringUTFChars(jclassname, 0);
: container_(container), type_(type), timestamp_(timestamp), eventType_(eventType)
{
XBT_DEBUG("%s: event_type=%u, timestamp=%.*f", __func__, eventType_, TRACE_precision(), timestamp_);
- if (trace_format == simgrid::instr::TraceFormat::Paje) {
+ if (trace_format == TraceFormat::Paje) {
stream_ << std::fixed << std::setprecision(TRACE_precision());
stream_ << eventType_ << " " << timestamp_ << " " << type_->get_id() << " " << container_->get_id();
}
void PajeEvent::print()
{
- if (trace_format != simgrid::instr::TraceFormat::Paje)
+ if (trace_format != TraceFormat::Paje)
return;
XBT_DEBUG("Dump %s", stream_.str().c_str());
void NewEvent::print()
{
- if (trace_format != simgrid::instr::TraceFormat::Paje)
+ if (trace_format != TraceFormat::Paje)
return;
stream_ << " " << value->get_id();
void LinkEvent::print()
{
- if (trace_format != simgrid::instr::TraceFormat::Paje)
+ if (trace_format != TraceFormat::Paje)
return;
stream_ << " " << value_ << " " << endpoint_->get_id() << " " << key_;
void VariableEvent::print()
{
- if (trace_format != simgrid::instr::TraceFormat::Paje)
+ if (trace_format != TraceFormat::Paje)
return;
stream_ << " " << value_;
void StateEvent::print()
{
- if (trace_format == simgrid::instr::TraceFormat::Paje) {
-
+ if (trace_format == TraceFormat::Paje) {
if (value != nullptr) // PAJE_PopState Event does not need to have a value
stream_ << " " << value->get_id();
#endif
XBT_DEBUG("Dump %s", stream_.str().c_str());
tracing_file << stream_.str() << std::endl;
- } else if (trace_format == simgrid::instr::TraceFormat::Ti) {
+ } else if (trace_format == TraceFormat::Ti) {
if (extra_ == nullptr)
return;
container_name=std::to_string(stoi(container_name.erase(0, 5)) - 1);
}
#if HAVE_SMPI
- if (simgrid::config::get_value<bool>("smpi/trace-call-location")) {
+ if (config::get_value<bool>("smpi/trace-call-location")) {
stream_ << container_name << " location " << filename << " " << linenumber << std::endl ;
}
#endif
} else {
THROW_IMPOSSIBLE;
}
-
-}
-}
}
+} // namespace instr
+} // namespace simgrid
class XBT_PUBLIC ActivityImpl {
std::atomic_int_fast32_t refcount_{0};
+
public:
virtual ~ActivityImpl();
ActivityImpl() = default;
}
switch (simcall->call_) {
-
case SIMCALL_MUTEX_LOCK:
- simgrid::xbt::intrusive_erase(simcall_mutex_lock__get__mutex(simcall)->sleeping_, *simcall->issuer_);
+ xbt::intrusive_erase(simcall_mutex_lock__get__mutex(simcall)->sleeping_, *simcall->issuer_);
break;
case SIMCALL_COND_WAIT:
- simgrid::xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *simcall->issuer_);
+ xbt::intrusive_erase(simcall_cond_wait__get__cond(simcall)->sleeping_, *simcall->issuer_);
break;
case SIMCALL_COND_WAIT_TIMEOUT:
- simgrid::xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *simcall->issuer_);
+ xbt::intrusive_erase(simcall_cond_wait_timeout__get__cond(simcall)->sleeping_, *simcall->issuer_);
simcall_cond_wait_timeout__set__result(simcall, 1); // signal a timeout
break;
case SIMCALL_SEM_ACQUIRE:
- simgrid::xbt::intrusive_erase(simcall_sem_acquire__get__sem(simcall)->sleeping_, *simcall->issuer_);
+ xbt::intrusive_erase(simcall_sem_acquire__get__sem(simcall)->sleeping_, *simcall->issuer_);
break;
case SIMCALL_SEM_ACQUIRE_TIMEOUT:
- simgrid::xbt::intrusive_erase(simcall_sem_acquire_timeout__get__sem(simcall)->sleeping_, *simcall->issuer_);
+ xbt::intrusive_erase(simcall_sem_acquire_timeout__get__sem(simcall)->sleeping_, *simcall->issuer_);
simcall_sem_acquire_timeout__set__result(simcall, 1); // signal a timeout
break;
* global configuration
*/
class Governor {
-
-private:
simgrid::s4u::Host* const host_;
double sampling_rate_;
int min_pstate; //< Never use a pstate less than this one
LinkImpl::LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint)
: Resource(model, name, constraint), piface_(this)
{
-
if (name != "__loopback__")
xbt_assert(not s4u::Link::by_name_or_null(name), "Link '%s' declared several times in the platform.", name.c_str());
Metric latency_ = {0.0, 0, nullptr};
Metric bandwidth_ = {1.0, 0, nullptr};
-
};
/**********
NetworkNS3Action::NetworkNS3Action(Model* model, double totalBytes, s4u::Host* src, s4u::Host* dst)
: NetworkAction(model, totalBytes, false), src_(src), dst_(dst)
{
-
// If there is no other started actions, we need to move NS-3 forward to be sync with SimGrid
if (model->get_started_action_set()->size()==1){
while(double_positive(surf_get_clock() - ns3::Simulator::Now().GetSeconds(), sg_surf_precision)){
TEST_CASE("xbt::dict: dict data container", "dict")
{
-
SECTION("Basic usage: change, retrieve and traverse homogeneous dicts")
{
INFO("Traversal the null dictionary");
TEST_CASE("xbt::dynar: generic C vector", "dynar")
{
-
SECTION("Dynars of integers")
{
/* Vars_decl [doxygen cruft] */