A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework a bit and typo fixes
[simgrid.git]
/
examples
/
s4u
/
io-storage-raw
/
s4u-io-storage-raw.cpp
diff --git
a/examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp
b/examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp
index
7ab871b
..
d076f87
100644
(file)
--- a/
examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp
+++ b/
examples/s4u/io-storage-raw/s4u-io-storage-raw.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017
-2019
. 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. */
/* 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. */
@@
-12,18
+12,18
@@
XBT_LOG_NEW_DEFAULT_CATEGORY(storage, "Messages specific for this simulation");
static void host()
{
/* - Display information on the disks mounted by the current host */
static void host()
{
/* - Display information on the disks mounted by the current host */
- XBT_INFO("*** Storage info on %s ***", simgrid::s4u::Host::current()->get
C
name());
+ XBT_INFO("*** Storage info on %s ***", simgrid::s4u::Host::current()->get
_c
name());
/* - Retrieve all mount points of current host */
std::unordered_map<std::string, simgrid::s4u::Storage*> const& storage_list =
/* - Retrieve all mount points of current host */
std::unordered_map<std::string, simgrid::s4u::Storage*> const& storage_list =
- simgrid::s4u::Host::current()->get
MountedS
torages();
+ simgrid::s4u::Host::current()->get
_mounted_s
torages();
/* - For each disk mounted on host, display disk name and mount point */
for (auto const& kv : storage_list)
/* - For each disk mounted on host, display disk name and mount point */
for (auto const& kv : storage_list)
- XBT_INFO("Storage name: %s, mount name: %s", kv.second->get
C
name(), kv.first.c_str());
+ XBT_INFO("Storage name: %s, mount name: %s", kv.second->get
_c
name(), kv.first.c_str());
/* - Write 200,000 bytes on Disk4 */
/* - Write 200,000 bytes on Disk4 */
- simgrid::s4u::Storage* storage = simgrid::s4u::Storage::by
N
ame("Disk4");
+ simgrid::s4u::Storage* storage = simgrid::s4u::Storage::by
_n
ame("Disk4");
sg_size_t write = storage->write(200000);
XBT_INFO("Wrote %llu bytes on 'Disk4'", write);
sg_size_t write = storage->write(200000);
XBT_INFO("Wrote %llu bytes on 'Disk4'", write);
@@
-34,12
+34,12
@@
static void host()
/* - Attach some user data to disk1 */
XBT_INFO("*** Get/set data for storage element: Disk4 ***");
/* - Attach some user data to disk1 */
XBT_INFO("*** Get/set data for storage element: Disk4 ***");
- std::string* data = static_cast<std::string*>(storage->get
User
data());
+ std::string* data = static_cast<std::string*>(storage->get
_
data());
XBT_INFO("Get storage data: '%s'", data ? data->c_str() : "No user data");
XBT_INFO("Get storage data: '%s'", data ? data->c_str() : "No user data");
- storage->set
User
data(new std::string("Some user data"));
- data = static_cast<std::string*>(storage->get
User
data());
+ storage->set
_
data(new std::string("Some user data"));
+ data = static_cast<std::string*>(storage->get
_
data());
XBT_INFO("Set and get data: '%s'", data->c_str());
delete data;
}
XBT_INFO("Set and get data: '%s'", data->c_str());
delete data;
}
@@
-47,12
+47,12
@@
static void host()
int main(int argc, char** argv)
{
simgrid::s4u::Engine e(&argc, argv);
int main(int argc, char** argv)
{
simgrid::s4u::Engine e(&argc, argv);
- e.load
P
latform(argv[1]);
+ e.load
_p
latform(argv[1]);
- simgrid::s4u::Actor::create
Actor
("", simgrid::s4u::Host::by_name("denise"), host);
+ simgrid::s4u::Actor::create("", simgrid::s4u::Host::by_name("denise"), host);
e.run();
e.run();
- XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get
C
lock());
+ XBT_INFO("Simulated time: %g", simgrid::s4u::Engine::get
_c
lock());
return 0;
}
return 0;
}