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
docs: start writing the S4U part
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Io.hpp
diff --git
a/include/simgrid/s4u/Io.hpp
b/include/simgrid/s4u/Io.hpp
index
ea92b92
..
b47c7e7
100644
(file)
--- a/
include/simgrid/s4u/Io.hpp
+++ b/
include/simgrid/s4u/Io.hpp
@@
-10,18
+10,27
@@
#include <simgrid/s4u/Activity.hpp>
#include <atomic>
#include <simgrid/s4u/Activity.hpp>
#include <atomic>
+#include <string>
namespace simgrid {
namespace s4u {
namespace simgrid {
namespace s4u {
+/** I/O Activity, representing the asynchronous disk access.
+ *
+ * They are generated from simgrid::s4u::Storage::read() and simgrid::s4u::Storage::write().
+ */
+
class XBT_PUBLIC Io : public Activity {
class XBT_PUBLIC Io : public Activity {
- Io() : Activity() {}
+public:
+ enum class OpType { READ, WRITE };
+
+private:
+ explicit Io(sg_size_t size, OpType type) : Activity(), size_(size), type_(type) {}
public:
friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Io* i);
friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Io* i);
public:
friend XBT_PUBLIC void intrusive_ptr_release(simgrid::s4u::Io* i);
friend XBT_PUBLIC void intrusive_ptr_add_ref(simgrid::s4u::Io* i);
- friend Storage; // Factory of IOs
+ friend
simgrid::s4u::
Storage; // Factory of IOs
- enum class OpType { READ, WRITE };
~Io() = default;
Activity* start() override;
~Io() = default;
Activity* start() override;
@@
-31,7
+40,6
@@
public:
double get_remaining() override;
sg_size_t get_performed_ioops();
double get_remaining() override;
sg_size_t get_performed_ioops();
- IoPtr set_io_type(OpType type);
private:
sg_size_t size_ = 0;
private:
sg_size_t size_ = 0;