diff --git a/include/Module/Module.hpp b/include/Module/Module.hpp index 299f473..c1a139f 100644 --- a/include/Module/Module.hpp +++ b/include/Module/Module.hpp @@ -21,6 +21,8 @@ namespace spu { namespace module { +class Stateful; +class Stateless; /*! * \class Module * @@ -30,6 +32,9 @@ class Module : public tools::Interface_clone , public tools::Interface_get_set_n_frames { + friend Stateful; + friend Stateless; + protected: size_t n_frames; /*!< Number of frames to process in this Module */ size_t n_frames_per_wave; @@ -44,11 +49,13 @@ class Module public: std::vector> tasks; + protected: /*! * \brief Constructor. */ explicit Module(); + public: /*! * \brief Destructor. */ @@ -96,7 +103,7 @@ class Module bool is_stateful() const; bool is_clonable() const; - protected: + private: void deep_copy(const Module& m); void set_name(const std::string& name); @@ -261,7 +268,6 @@ class Module void set_single_wave(const bool enable_single_wave); - private: void _set_n_frames_per_wave(const size_t n_frames_per_wave); void _set_n_frames(const size_t n_frames); }; diff --git a/include/Module/Adaptor/Adaptor.hpp b/include/Module/Stateful/Adaptor/Adaptor.hpp similarity index 95% rename from include/Module/Adaptor/Adaptor.hpp rename to include/Module/Stateful/Adaptor/Adaptor.hpp index ffda07e..b1313b6 100644 --- a/include/Module/Adaptor/Adaptor.hpp +++ b/include/Module/Stateful/Adaptor/Adaptor.hpp @@ -12,7 +12,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Sequence/Sequence.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" @@ -71,7 +71,7 @@ enum class pull_1 : size_t } class Adaptor - : public Module + : public Stateful , public tools::Interface_waiting { friend runtime::Sequence; // Sequence is friend to enable the no copy mode (0 copy) @@ -111,7 +111,7 @@ class Adaptor inline Adaptor(const std::vector& n_elmts, const std::vector& datatype, const size_t buffer_size); - using Module::deep_copy; + using Stateful::deep_copy; virtual void deep_copy(const Adaptor& m); inline bool is_full(const size_t id); inline bool is_empty(const size_t id); @@ -134,7 +134,7 @@ class Adaptor } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Adaptor/Adaptor.hxx" +#include "Module/Stateful/Adaptor/Adaptor.hxx" #endif #endif /* ADAPTOR_HPP_ */ diff --git a/include/Module/Adaptor/Adaptor.hxx b/include/Module/Stateful/Adaptor/Adaptor.hxx similarity index 98% rename from include/Module/Adaptor/Adaptor.hxx rename to include/Module/Stateful/Adaptor/Adaptor.hxx index d78eb36..4be1706 100644 --- a/include/Module/Adaptor/Adaptor.hxx +++ b/include/Module/Stateful/Adaptor/Adaptor.hxx @@ -2,7 +2,7 @@ #include #include -#include "Module/Adaptor/Adaptor.hpp" +#include "Module/Stateful/Adaptor/Adaptor.hpp" #include "Tools/Exception/exception.hpp" #include "Tools/compute_bytes.h" @@ -12,7 +12,7 @@ namespace module { Adaptor::Adaptor(const size_t n_elmts, const std::type_index datatype, const size_t buffer_size) - : Module() + : Stateful() , n_elmts(1, n_elmts) , n_bytes(1, tools::compute_bytes(n_elmts, datatype)) , datatype(1, datatype) @@ -65,7 +65,7 @@ Adaptor::Adaptor(const size_t n_elmts, const std::type_index datatype, const siz Adaptor::Adaptor(const std::vector& n_elmts, const std::vector& datatype, const size_t buffer_size) - : Module() + : Stateful() , n_elmts(n_elmts) , n_bytes(tools::compute_bytes(n_elmts, datatype)) , datatype(datatype) diff --git a/include/Module/Adaptor/Adaptor_1_to_n.hpp b/include/Module/Stateful/Adaptor/Adaptor_1_to_n.hpp similarity index 95% rename from include/Module/Adaptor/Adaptor_1_to_n.hpp rename to include/Module/Stateful/Adaptor/Adaptor_1_to_n.hpp index c902de8..b84d095 100644 --- a/include/Module/Adaptor/Adaptor_1_to_n.hpp +++ b/include/Module/Stateful/Adaptor/Adaptor_1_to_n.hpp @@ -14,7 +14,7 @@ #include #include -#include "Module/Adaptor/Adaptor.hpp" +#include "Module/Stateful/Adaptor/Adaptor.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" @@ -71,7 +71,7 @@ class Adaptor_1_to_n : public Adaptor } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Adaptor/Adaptor_1_to_n.hxx" +#include "Module/Stateful/Adaptor/Adaptor_1_to_n.hxx" #endif #endif /* ADAPTOR_1_TO_N_HPP_ */ diff --git a/include/Module/Adaptor/Adaptor_1_to_n.hxx b/include/Module/Stateful/Adaptor/Adaptor_1_to_n.hxx similarity index 98% rename from include/Module/Adaptor/Adaptor_1_to_n.hxx rename to include/Module/Stateful/Adaptor/Adaptor_1_to_n.hxx index 4e7e4c3..54d03e4 100644 --- a/include/Module/Adaptor/Adaptor_1_to_n.hxx +++ b/include/Module/Stateful/Adaptor/Adaptor_1_to_n.hxx @@ -1,7 +1,7 @@ #include #include -#include "Module/Adaptor/Adaptor_1_to_n.hpp" +#include "Module/Stateful/Adaptor/Adaptor_1_to_n.hpp" #include "Tools/Exception/exception.hpp" namespace spu diff --git a/include/Module/Adaptor/Adaptor_n_to_1.hpp b/include/Module/Stateful/Adaptor/Adaptor_n_to_1.hpp similarity index 95% rename from include/Module/Adaptor/Adaptor_n_to_1.hpp rename to include/Module/Stateful/Adaptor/Adaptor_n_to_1.hpp index a5a66ad..f63538f 100644 --- a/include/Module/Adaptor/Adaptor_n_to_1.hpp +++ b/include/Module/Stateful/Adaptor/Adaptor_n_to_1.hpp @@ -14,7 +14,7 @@ #include #include -#include "Module/Adaptor/Adaptor.hpp" +#include "Module/Stateful/Adaptor/Adaptor.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" @@ -71,7 +71,7 @@ class Adaptor_n_to_1 : public Adaptor } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Adaptor/Adaptor_n_to_1.hxx" +#include "Module/Stateful/Adaptor/Adaptor_n_to_1.hxx" #endif #endif /* ADAPTOR_N_TO_1_HPP_ */ diff --git a/include/Module/Adaptor/Adaptor_n_to_1.hxx b/include/Module/Stateful/Adaptor/Adaptor_n_to_1.hxx similarity index 98% rename from include/Module/Adaptor/Adaptor_n_to_1.hxx rename to include/Module/Stateful/Adaptor/Adaptor_n_to_1.hxx index a459830..4d3d44e 100644 --- a/include/Module/Adaptor/Adaptor_n_to_1.hxx +++ b/include/Module/Stateful/Adaptor/Adaptor_n_to_1.hxx @@ -1,7 +1,7 @@ #include #include -#include "Module/Adaptor/Adaptor_n_to_1.hpp" +#include "Module/Stateful/Adaptor/Adaptor_n_to_1.hpp" #include "Tools/Exception/exception.hpp" namespace spu diff --git a/include/Module/Binaryop/Binaryop.hpp b/include/Module/Stateful/Binaryop/Binaryop.hpp similarity index 97% rename from include/Module/Binaryop/Binaryop.hpp rename to include/Module/Stateful/Binaryop/Binaryop.hpp index d02724a..8a7becd 100644 --- a/include/Module/Binaryop/Binaryop.hpp +++ b/include/Module/Stateful/Binaryop/Binaryop.hpp @@ -9,7 +9,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" #include "Tools/Math/binaryop.h" @@ -47,7 +47,7 @@ enum class performf : size_t } template BOP> -class Binaryop : public Module +class Binaryop : public Stateful { public: inline runtime::Task& operator[](const bop::tsk t); @@ -150,7 +150,7 @@ using Binaryop_eq = Binaryop>; } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Binaryop/Binaryop.hxx" +#include "Module/Stateful/Binaryop/Binaryop.hxx" #endif #endif /* BINARYOP_HPP_ */ diff --git a/include/Module/Binaryop/Binaryop.hxx b/include/Module/Stateful/Binaryop/Binaryop.hxx similarity index 99% rename from include/Module/Binaryop/Binaryop.hxx rename to include/Module/Stateful/Binaryop/Binaryop.hxx index 119956c..9252bcd 100644 --- a/include/Module/Binaryop/Binaryop.hxx +++ b/include/Module/Stateful/Binaryop/Binaryop.hxx @@ -1,4 +1,4 @@ -#include "Module/Binaryop/Binaryop.hpp" +#include "Module/Stateful/Binaryop/Binaryop.hpp" namespace spu { @@ -35,7 +35,7 @@ Binaryop::operator[](const std::string& tsk_sck) template BOP> Binaryop::Binaryop(const size_t n_in0, const size_t n_in1) - : Module() + : Stateful() , n_elmts(n_in0 > n_in1 ? n_in0 : n_in1) { const std::string name = "Binaryop"; diff --git a/include/Module/Controller/Controller.hpp b/include/Module/Stateful/Controller/Controller.hpp similarity index 91% rename from include/Module/Controller/Controller.hpp rename to include/Module/Stateful/Controller/Controller.hpp index 9434cb5..551b988 100644 --- a/include/Module/Controller/Controller.hpp +++ b/include/Module/Stateful/Controller/Controller.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Tools/Interface/Interface_reset.hpp" namespace spu @@ -34,7 +34,7 @@ enum class control : size_t } class Controller - : public Module + : public Stateful , public tools::Interface_reset { public: @@ -67,7 +67,7 @@ class Controller } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Controller/Controller.hxx" +#include "Module/Stateful/Controller/Controller.hxx" #endif #endif /* CONTROLLER_HPP_ */ diff --git a/include/Module/Controller/Controller.hxx b/include/Module/Stateful/Controller/Controller.hxx similarity index 92% rename from include/Module/Controller/Controller.hxx rename to include/Module/Stateful/Controller/Controller.hxx index 94c1392..22af77c 100644 --- a/include/Module/Controller/Controller.hxx +++ b/include/Module/Stateful/Controller/Controller.hxx @@ -1,6 +1,6 @@ #include -#include "Module/Controller/Controller.hpp" +#include "Module/Stateful/Controller/Controller.hpp" namespace spu { diff --git a/include/Module/Controller/Controller_cyclic/Controller_cyclic.hpp b/include/Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.hpp similarity index 92% rename from include/Module/Controller/Controller_cyclic/Controller_cyclic.hpp rename to include/Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.hpp index 67d2837..562b233 100644 --- a/include/Module/Controller/Controller_cyclic/Controller_cyclic.hpp +++ b/include/Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Controller/Controller.hpp" +#include "Module/Stateful/Controller/Controller.hpp" namespace spu { diff --git a/include/Module/Controller/Controller_limit/Controller_limit.hpp b/include/Module/Stateful/Controller/Controller_limit/Controller_limit.hpp similarity index 91% rename from include/Module/Controller/Controller_limit/Controller_limit.hpp rename to include/Module/Stateful/Controller/Controller_limit/Controller_limit.hpp index e1519ac..30a820c 100644 --- a/include/Module/Controller/Controller_limit/Controller_limit.hpp +++ b/include/Module/Stateful/Controller/Controller_limit/Controller_limit.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Controller/Controller.hpp" +#include "Module/Stateful/Controller/Controller.hpp" namespace spu { diff --git a/include/Module/Controller/Controller_static/Controller_static.hpp b/include/Module/Stateful/Controller/Controller_static/Controller_static.hpp similarity index 90% rename from include/Module/Controller/Controller_static/Controller_static.hpp rename to include/Module/Stateful/Controller/Controller_static/Controller_static.hpp index ae565e8..00f37b3 100644 --- a/include/Module/Controller/Controller_static/Controller_static.hpp +++ b/include/Module/Stateful/Controller/Controller_static/Controller_static.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Controller/Controller.hpp" +#include "Module/Stateful/Controller/Controller.hpp" namespace spu { diff --git a/include/Module/Delayer/Delayer.hpp b/include/Module/Stateful/Delayer/Delayer.hpp similarity index 91% rename from include/Module/Delayer/Delayer.hpp rename to include/Module/Stateful/Delayer/Delayer.hpp index 140efc6..34af21c 100644 --- a/include/Module/Delayer/Delayer.hpp +++ b/include/Module/Stateful/Delayer/Delayer.hpp @@ -5,7 +5,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" namespace spu { @@ -36,7 +36,7 @@ enum class produce : uint8_t } template -class Delayer : public Module +class Delayer : public Stateful { public: inline runtime::Task& operator[](const dly::tsk t); @@ -66,6 +66,6 @@ class Delayer : public Module } } -#include "Module/Delayer/Delayer.hxx" +#include "Module/Stateful/Delayer/Delayer.hxx" #endif /* DELAYER_HPP_ */ diff --git a/include/Module/Delayer/Delayer.hxx b/include/Module/Stateful/Delayer/Delayer.hxx similarity index 93% rename from include/Module/Delayer/Delayer.hxx rename to include/Module/Stateful/Delayer/Delayer.hxx index 603717e..34b0631 100644 --- a/include/Module/Delayer/Delayer.hxx +++ b/include/Module/Stateful/Delayer/Delayer.hxx @@ -1,4 +1,4 @@ -#include "Module/Delayer/Delayer.hpp" +#include "Module/Stateful/Delayer/Delayer.hpp" namespace spu { diff --git a/include/Module/Finalizer/Finalizer.hpp b/include/Module/Stateful/Finalizer/Finalizer.hpp similarity index 93% rename from include/Module/Finalizer/Finalizer.hpp rename to include/Module/Stateful/Finalizer/Finalizer.hpp index 4a21918..cd59635 100644 --- a/include/Module/Finalizer/Finalizer.hpp +++ b/include/Module/Stateful/Finalizer/Finalizer.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Tools/Interface/Interface_reset.hpp" @@ -36,7 +36,7 @@ enum class finalize : size_t template class Finalizer - : public Module + : public Stateful , public tools::Interface_reset { public: @@ -73,7 +73,7 @@ class Finalizer } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Finalizer/Finalizer.hxx" +#include "Module/Stateful/Finalizer/Finalizer.hxx" #endif #endif /* FINALIZER_HPP_ */ diff --git a/include/Module/Finalizer/Finalizer.hxx b/include/Module/Stateful/Finalizer/Finalizer.hxx similarity index 93% rename from include/Module/Finalizer/Finalizer.hxx rename to include/Module/Stateful/Finalizer/Finalizer.hxx index a1b60f0..a0cf3bb 100644 --- a/include/Module/Finalizer/Finalizer.hxx +++ b/include/Module/Stateful/Finalizer/Finalizer.hxx @@ -1,4 +1,4 @@ -#include "Module/Finalizer/Finalizer.hpp" +#include "Module/Stateful/Finalizer/Finalizer.hpp" namespace spu { diff --git a/include/Module/Incrementer/Incrementer.hpp b/include/Module/Stateful/Incrementer/Incrementer.hpp similarity index 91% rename from include/Module/Incrementer/Incrementer.hpp rename to include/Module/Stateful/Incrementer/Incrementer.hpp index 1b9834a..d4d6f95 100644 --- a/include/Module/Incrementer/Incrementer.hpp +++ b/include/Module/Stateful/Incrementer/Incrementer.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" namespace spu { @@ -40,7 +40,7 @@ enum class incrementf : size_t } template -class Incrementer : public Module +class Incrementer : public Stateful { public: inline runtime::Task& operator[](const inc::tsk t); @@ -76,7 +76,7 @@ class Incrementer : public Module } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Incrementer/Incrementer.hxx" +#include "Module/Stateful/Incrementer/Incrementer.hxx" #endif #endif /* INCREMENTER_HPP_ */ diff --git a/include/Module/Incrementer/Incrementer.hxx b/include/Module/Stateful/Incrementer/Incrementer.hxx similarity index 95% rename from include/Module/Incrementer/Incrementer.hxx rename to include/Module/Stateful/Incrementer/Incrementer.hxx index 604e8fd..d70e8cf 100644 --- a/include/Module/Incrementer/Incrementer.hxx +++ b/include/Module/Stateful/Incrementer/Incrementer.hxx @@ -1,4 +1,4 @@ -#include "Module/Incrementer/Incrementer.hpp" +#include "Module/Stateful/Incrementer/Incrementer.hpp" namespace spu { diff --git a/include/Module/Initializer/Initializer.hpp b/include/Module/Stateful/Initializer/Initializer.hpp similarity index 91% rename from include/Module/Initializer/Initializer.hpp rename to include/Module/Stateful/Initializer/Initializer.hpp index d6d3011..94e35c3 100644 --- a/include/Module/Initializer/Initializer.hpp +++ b/include/Module/Stateful/Initializer/Initializer.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" namespace spu { @@ -32,7 +32,7 @@ enum class initialize : size_t } template -class Initializer : public Module +class Initializer : public Stateful { public: inline runtime::Task& operator[](const ini::tsk t); @@ -66,7 +66,7 @@ class Initializer : public Module } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Initializer/Initializer.hxx" +#include "Module/Stateful/Initializer/Initializer.hxx" #endif #endif /* INITIALIZER_HPP_ */ diff --git a/include/Module/Initializer/Initializer.hxx b/include/Module/Stateful/Initializer/Initializer.hxx similarity index 93% rename from include/Module/Initializer/Initializer.hxx rename to include/Module/Stateful/Initializer/Initializer.hxx index 705fcd7..32a5c96 100644 --- a/include/Module/Initializer/Initializer.hxx +++ b/include/Module/Stateful/Initializer/Initializer.hxx @@ -3,7 +3,7 @@ #include #include -#include "Module/Initializer/Initializer.hpp" +#include "Module/Stateful/Initializer/Initializer.hpp" namespace spu { diff --git a/include/Module/Iterator/Iterator.hpp b/include/Module/Stateful/Iterator/Iterator.hpp similarity index 92% rename from include/Module/Iterator/Iterator.hpp rename to include/Module/Stateful/Iterator/Iterator.hpp index 23e04e4..edd236c 100644 --- a/include/Module/Iterator/Iterator.hpp +++ b/include/Module/Stateful/Iterator/Iterator.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Tools/Interface/Interface_reset.hpp" namespace spu @@ -34,7 +34,7 @@ enum class iterate : size_t } class Iterator - : public Module + : public Stateful , public tools::Interface_reset { public: @@ -68,7 +68,7 @@ class Iterator } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Iterator/Iterator.hxx" +#include "Module/Stateful/Iterator/Iterator.hxx" #endif #endif /* ITERATOR_HPP_ */ diff --git a/include/Module/Iterator/Iterator.hxx b/include/Module/Stateful/Iterator/Iterator.hxx similarity index 93% rename from include/Module/Iterator/Iterator.hxx rename to include/Module/Stateful/Iterator/Iterator.hxx index 6930f1f..927896f 100644 --- a/include/Module/Iterator/Iterator.hxx +++ b/include/Module/Stateful/Iterator/Iterator.hxx @@ -3,7 +3,7 @@ #include #include -#include "Module/Iterator/Iterator.hpp" +#include "Module/Stateful/Iterator/Iterator.hpp" namespace spu { diff --git a/include/Module/Probe/Latency/Probe_latency.hpp b/include/Module/Stateful/Probe/Latency/Probe_latency.hpp similarity index 94% rename from include/Module/Probe/Latency/Probe_latency.hpp rename to include/Module/Stateful/Probe/Latency/Probe_latency.hpp index ed35c24..1f0b6c6 100644 --- a/include/Module/Probe/Latency/Probe_latency.hpp +++ b/include/Module/Stateful/Probe/Latency/Probe_latency.hpp @@ -10,7 +10,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Probe/Occurrence/Probe_occurrence.hpp b/include/Module/Stateful/Probe/Occurrence/Probe_occurrence.hpp similarity index 94% rename from include/Module/Probe/Occurrence/Probe_occurrence.hpp rename to include/Module/Stateful/Probe/Occurrence/Probe_occurrence.hpp index 379b250..79112e6 100644 --- a/include/Module/Probe/Occurrence/Probe_occurrence.hpp +++ b/include/Module/Stateful/Probe/Occurrence/Probe_occurrence.hpp @@ -10,7 +10,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Probe/Probe.hpp b/include/Module/Stateful/Probe/Probe.hpp similarity index 97% rename from include/Module/Probe/Probe.hpp rename to include/Module/Stateful/Probe/Probe.hpp index b213845..a947c92 100644 --- a/include/Module/Probe/Probe.hpp +++ b/include/Module/Stateful/Probe/Probe.hpp @@ -12,7 +12,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" #include "Tools/Interface/Interface_reset.hpp" @@ -45,7 +45,7 @@ enum class probe_noin : uint8_t } class AProbe - : public Module + : public Stateful , public tools::Interface_reset { protected: @@ -126,7 +126,7 @@ class Probe : public AProbe } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Probe/Probe.hxx" +#include "Module/Stateful/Probe/Probe.hxx" #endif #endif /* PROBE_HPP_ */ diff --git a/include/Module/Probe/Probe.hxx b/include/Module/Stateful/Probe/Probe.hxx similarity index 99% rename from include/Module/Probe/Probe.hxx rename to include/Module/Stateful/Probe/Probe.hxx index 8c73f33..e8769db 100644 --- a/include/Module/Probe/Probe.hxx +++ b/include/Module/Stateful/Probe/Probe.hxx @@ -1,6 +1,6 @@ #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" #include "Tools/Exception/exception.hpp" namespace spu diff --git a/include/Module/Probe/Stream/Probe_stream.hpp b/include/Module/Stateful/Probe/Stream/Probe_stream.hpp similarity index 94% rename from include/Module/Probe/Stream/Probe_stream.hpp rename to include/Module/Stateful/Probe/Stream/Probe_stream.hpp index 6954387..4d7f01d 100644 --- a/include/Module/Probe/Stream/Probe_stream.hpp +++ b/include/Module/Stateful/Probe/Stream/Probe_stream.hpp @@ -10,7 +10,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Probe/Throughput/Probe_throughput.hpp b/include/Module/Stateful/Probe/Throughput/Probe_throughput.hpp similarity index 96% rename from include/Module/Probe/Throughput/Probe_throughput.hpp rename to include/Module/Stateful/Probe/Throughput/Probe_throughput.hpp index f192a73..330dbcf 100644 --- a/include/Module/Probe/Throughput/Probe_throughput.hpp +++ b/include/Module/Stateful/Probe/Throughput/Probe_throughput.hpp @@ -10,7 +10,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Probe/Time/Probe_time.hpp b/include/Module/Stateful/Probe/Time/Probe_time.hpp similarity index 94% rename from include/Module/Probe/Time/Probe_time.hpp rename to include/Module/Stateful/Probe/Time/Probe_time.hpp index 641e4f5..758596d 100644 --- a/include/Module/Probe/Time/Probe_time.hpp +++ b/include/Module/Stateful/Probe/Time/Probe_time.hpp @@ -10,7 +10,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Probe/Timestamp/Probe_timestamp.hpp b/include/Module/Stateful/Probe/Timestamp/Probe_timestamp.hpp similarity index 94% rename from include/Module/Probe/Timestamp/Probe_timestamp.hpp rename to include/Module/Stateful/Probe/Timestamp/Probe_timestamp.hpp index 986129f..cb15ff7 100644 --- a/include/Module/Probe/Timestamp/Probe_timestamp.hpp +++ b/include/Module/Stateful/Probe/Timestamp/Probe_timestamp.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Probe/Value/Probe_value.hpp b/include/Module/Stateful/Probe/Value/Probe_value.hpp similarity index 93% rename from include/Module/Probe/Value/Probe_value.hpp rename to include/Module/Stateful/Probe/Value/Probe_value.hpp index 2f21712..21c883f 100644 --- a/include/Module/Probe/Value/Probe_value.hpp +++ b/include/Module/Stateful/Probe/Value/Probe_value.hpp @@ -9,7 +9,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" namespace spu { diff --git a/include/Module/Reducer/Reducer.hpp b/include/Module/Stateful/Reducer/Reducer.hpp similarity index 95% rename from include/Module/Reducer/Reducer.hpp rename to include/Module/Stateful/Reducer/Reducer.hpp index bdf85e1..82e4d21 100644 --- a/include/Module/Reducer/Reducer.hpp +++ b/include/Module/Stateful/Reducer/Reducer.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Tools/Math/binaryop.h" namespace spu @@ -36,7 +36,7 @@ enum class reduce : size_t } template BOP> -class Reducer : public Module +class Reducer : public Stateful { public: inline runtime::Task& operator[](const red::tsk t); @@ -88,7 +88,7 @@ using Reducer_max = Reducer; } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Reducer/Reducer.hxx" +#include "Module/Stateful/Reducer/Reducer.hxx" #endif #endif /* REDUCER_HPP_ */ diff --git a/include/Module/Reducer/Reducer.hxx b/include/Module/Stateful/Reducer/Reducer.hxx similarity index 98% rename from include/Module/Reducer/Reducer.hxx rename to include/Module/Stateful/Reducer/Reducer.hxx index ec43be2..2a508ae 100644 --- a/include/Module/Reducer/Reducer.hxx +++ b/include/Module/Stateful/Reducer/Reducer.hxx @@ -1,4 +1,4 @@ -#include "Module/Reducer/Reducer.hpp" +#include "Module/Stateful/Reducer/Reducer.hpp" namespace spu { @@ -28,7 +28,7 @@ Reducer::operator[](const std::string& tsk_sck) template BOP> Reducer::Reducer(const size_t n_elmts) - : Module() + : Stateful() , n_elmts(n_elmts) { const std::string name = "Reducer"; diff --git a/include/Module/Relayer/Relayer.hpp b/include/Module/Stateful/Relayer/Relayer.hpp similarity index 92% rename from include/Module/Relayer/Relayer.hpp rename to include/Module/Stateful/Relayer/Relayer.hpp index 1767e53..6bbf722 100644 --- a/include/Module/Relayer/Relayer.hpp +++ b/include/Module/Stateful/Relayer/Relayer.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" namespace spu { @@ -40,7 +40,7 @@ enum class relayf : size_t } template -class Relayer : public Module +class Relayer : public Stateful { public: inline runtime::Task& operator[](const rly::tsk t); @@ -76,7 +76,7 @@ class Relayer : public Module } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Relayer/Relayer.hxx" +#include "Module/Stateful/Relayer/Relayer.hxx" #endif #endif /* RELAYER_HPP_ */ diff --git a/include/Module/Relayer/Relayer.hxx b/include/Module/Stateful/Relayer/Relayer.hxx similarity index 95% rename from include/Module/Relayer/Relayer.hxx rename to include/Module/Stateful/Relayer/Relayer.hxx index cd2e99c..4796afc 100644 --- a/include/Module/Relayer/Relayer.hxx +++ b/include/Module/Stateful/Relayer/Relayer.hxx @@ -1,4 +1,4 @@ -#include "Module/Relayer/Relayer.hpp" +#include "Module/Stateful/Relayer/Relayer.hpp" namespace spu { diff --git a/include/Module/Set/Set.hpp b/include/Module/Stateful/Set/Set.hpp similarity index 85% rename from include/Module/Set/Set.hpp rename to include/Module/Stateful/Set/Set.hpp index ad0cb22..7fa3a30 100644 --- a/include/Module/Set/Set.hpp +++ b/include/Module/Stateful/Set/Set.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" namespace spu { @@ -27,7 +27,7 @@ enum class tsk : size_t }; } -class Set : public Module +class Set : public Stateful { std::shared_ptr sequence_cloned; runtime::Sequence* sequence_extern; @@ -48,14 +48,14 @@ class Set : public Module virtual void set_n_frames(const size_t n_frames); protected: - using Module::deep_copy; + using Stateful::deep_copy; virtual void deep_copy(const Set& m); }; } } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Set/Set.hxx" +#include "Module/Stateful/Set/Set.hxx" #endif #endif /* SET_HPP_ */ diff --git a/include/Module/Set/Set.hxx b/include/Module/Stateful/Set/Set.hxx similarity index 77% rename from include/Module/Set/Set.hxx rename to include/Module/Stateful/Set/Set.hxx index fe05f2e..71ed09a 100644 --- a/include/Module/Set/Set.hxx +++ b/include/Module/Stateful/Set/Set.hxx @@ -1,4 +1,4 @@ -#include "Module/Set/Set.hpp" +#include "Module/Stateful/Set/Set.hpp" namespace spu { diff --git a/include/Module/Sink/NO/Sink_NO.hpp b/include/Module/Stateful/Sink/NO/Sink_NO.hpp similarity index 93% rename from include/Module/Sink/NO/Sink_NO.hpp rename to include/Module/Stateful/Sink/NO/Sink_NO.hpp index dc3a7a2..789e663 100644 --- a/include/Module/Sink/NO/Sink_NO.hpp +++ b/include/Module/Stateful/Sink/NO/Sink_NO.hpp @@ -5,7 +5,7 @@ #ifndef SINK_NO_HPP #define SINK_NO_HPP -#include "Module/Sink/Sink.hpp" +#include "Module/Stateful/Sink/Sink.hpp" namespace spu { diff --git a/include/Module/Sink/Sink.hpp b/include/Module/Stateful/Sink/Sink.hpp similarity index 94% rename from include/Module/Sink/Sink.hpp rename to include/Module/Stateful/Sink/Sink.hpp index 1e8b5bc..3dd1031 100644 --- a/include/Module/Sink/Sink.hpp +++ b/include/Module/Stateful/Sink/Sink.hpp @@ -9,7 +9,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" #include "Tools/Interface/Interface_reset.hpp" @@ -45,7 +45,7 @@ enum class send_count : size_t template class Sink - : public Module + : public Stateful , public tools::Interface_reset { public: @@ -87,6 +87,6 @@ class Sink } } -#include "Module/Sink/Sink.hxx" +#include "Module/Stateful/Sink/Sink.hxx" #endif /* SINK_HPP */ diff --git a/include/Module/Sink/Sink.hxx b/include/Module/Stateful/Sink/Sink.hxx similarity index 98% rename from include/Module/Sink/Sink.hxx rename to include/Module/Stateful/Sink/Sink.hxx index 94e0354..ae41a43 100644 --- a/include/Module/Sink/Sink.hxx +++ b/include/Module/Stateful/Sink/Sink.hxx @@ -1,7 +1,7 @@ #include #include -#include "Module/Sink/Sink.hpp" +#include "Module/Stateful/Sink/Sink.hpp" #include "Tools/Exception/exception.hpp" namespace spu @@ -39,7 +39,7 @@ Sink::operator[](const std::string& tsk_sck) template Sink::Sink(const int max_data_size) - : Module() + : Stateful() , max_data_size(max_data_size) { const std::string name = "Sink"; diff --git a/include/Module/Sink/User/Sink_user_binary.hpp b/include/Module/Stateful/Sink/User/Sink_user_binary.hpp similarity index 95% rename from include/Module/Sink/User/Sink_user_binary.hpp rename to include/Module/Stateful/Sink/User/Sink_user_binary.hpp index e819d9f..7c96c45 100644 --- a/include/Module/Sink/User/Sink_user_binary.hpp +++ b/include/Module/Stateful/Sink/User/Sink_user_binary.hpp @@ -10,7 +10,7 @@ #include #include -#include "Module/Sink/Sink.hpp" +#include "Module/Stateful/Sink/Sink.hpp" namespace spu { diff --git a/include/Module/Sleeper/Sleeper.hpp b/include/Module/Stateful/Sleeper/Sleeper.hpp similarity index 88% rename from include/Module/Sleeper/Sleeper.hpp rename to include/Module/Stateful/Sleeper/Sleeper.hpp index 6bc6932..c22b32f 100644 --- a/include/Module/Sleeper/Sleeper.hpp +++ b/include/Module/Stateful/Sleeper/Sleeper.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" namespace spu { @@ -30,7 +30,7 @@ enum class sleep : size_t } } -class Sleeper : public Module +class Sleeper : public Stateful { public: inline runtime::Task& operator[](const slp::tsk t); @@ -57,7 +57,7 @@ class Sleeper : public Module } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Sleeper/Sleeper.hxx" +#include "Module/Stateful/Sleeper/Sleeper.hxx" #endif #endif /* SLEEPER_HPP_ */ diff --git a/include/Module/Sleeper/Sleeper.hxx b/include/Module/Stateful/Sleeper/Sleeper.hxx similarity index 89% rename from include/Module/Sleeper/Sleeper.hxx rename to include/Module/Stateful/Sleeper/Sleeper.hxx index c4a4edd..358bf71 100644 --- a/include/Module/Sleeper/Sleeper.hxx +++ b/include/Module/Stateful/Sleeper/Sleeper.hxx @@ -1,4 +1,4 @@ -#include "Module/Sleeper/Sleeper.hpp" +#include "Module/Stateful/Sleeper/Sleeper.hpp" namespace spu { diff --git a/include/Module/Source/AZCW/Source_AZCW.hpp b/include/Module/Stateful/Source/AZCW/Source_AZCW.hpp similarity index 90% rename from include/Module/Source/AZCW/Source_AZCW.hpp rename to include/Module/Stateful/Source/AZCW/Source_AZCW.hpp index a5b8d6a..482b7d1 100644 --- a/include/Module/Source/AZCW/Source_AZCW.hpp +++ b/include/Module/Stateful/Source/AZCW/Source_AZCW.hpp @@ -5,7 +5,7 @@ #ifndef SOURCE_AZCW_HPP_ #define SOURCE_AZCW_HPP_ -#include "Module/Source/Source.hpp" +#include "Module/Stateful/Source/Source.hpp" namespace spu { diff --git a/include/Module/Source/Random/Source_random.hpp b/include/Module/Stateful/Source/Random/Source_random.hpp similarity index 94% rename from include/Module/Source/Random/Source_random.hpp rename to include/Module/Stateful/Source/Random/Source_random.hpp index a046635..49e3cee 100644 --- a/include/Module/Source/Random/Source_random.hpp +++ b/include/Module/Stateful/Source/Random/Source_random.hpp @@ -7,7 +7,7 @@ #include -#include "Module/Source/Source.hpp" +#include "Module/Stateful/Source/Source.hpp" namespace spu { diff --git a/include/Module/Source/Source.hpp b/include/Module/Stateful/Source/Source.hpp similarity index 95% rename from include/Module/Source/Source.hpp rename to include/Module/Stateful/Source/Source.hpp index d93d474..13963a8 100644 --- a/include/Module/Source/Source.hpp +++ b/include/Module/Stateful/Source/Source.hpp @@ -9,7 +9,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" #include "Tools/Interface/Interface_is_done.hpp" @@ -41,7 +41,7 @@ enum class generate : size_t template class Source - : public Module + : public Stateful , public tools::Interface_set_seed , public tools::Interface_is_done , public tools::Interface_reset @@ -90,7 +90,7 @@ class Source } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Source/Source.hxx" +#include "Module/Stateful/Source/Source.hxx" #endif #endif /* SOURCE_HPP_ */ diff --git a/include/Module/Source/Source.hxx b/include/Module/Stateful/Source/Source.hxx similarity index 98% rename from include/Module/Source/Source.hxx rename to include/Module/Stateful/Source/Source.hxx index c1263f8..fddcb09 100644 --- a/include/Module/Source/Source.hxx +++ b/include/Module/Stateful/Source/Source.hxx @@ -1,7 +1,7 @@ #include #include -#include "Module/Source/Source.hpp" +#include "Module/Stateful/Source/Source.hpp" #include "Tools/Exception/exception.hpp" namespace spu @@ -32,7 +32,7 @@ Source::operator[](const std::string& tsk_sck) template Source::Source(const int max_data_size) - : Module() + : Stateful() , max_data_size(max_data_size) { const std::string name = "Source"; diff --git a/include/Module/Source/User/Source_user.hpp b/include/Module/Stateful/Source/User/Source_user.hpp similarity index 95% rename from include/Module/Source/User/Source_user.hpp rename to include/Module/Stateful/Source/User/Source_user.hpp index 94ed90b..5c4e0f5 100644 --- a/include/Module/Source/User/Source_user.hpp +++ b/include/Module/Stateful/Source/User/Source_user.hpp @@ -8,7 +8,7 @@ #include #include -#include "Module/Source/Source.hpp" +#include "Module/Stateful/Source/Source.hpp" namespace spu { diff --git a/include/Module/Source/User/Source_user_binary.hpp b/include/Module/Stateful/Source/User/Source_user_binary.hpp similarity index 95% rename from include/Module/Source/User/Source_user_binary.hpp rename to include/Module/Stateful/Source/User/Source_user_binary.hpp index 6db3366..65928e1 100644 --- a/include/Module/Source/User/Source_user_binary.hpp +++ b/include/Module/Stateful/Source/User/Source_user_binary.hpp @@ -6,7 +6,7 @@ #include #include -#include "Module/Source/Source.hpp" +#include "Module/Stateful/Source/Source.hpp" namespace spu { diff --git a/include/Module/Stateful/Stateful.hpp b/include/Module/Stateful/Stateful.hpp new file mode 100644 index 0000000..0e7d6a5 --- /dev/null +++ b/include/Module/Stateful/Stateful.hpp @@ -0,0 +1,56 @@ +/*! + * \file + * \brief Class module::Stateful. + */ +#ifndef STATEFUL_HPP_ +#define STATEFUL_HPP_ + +#include + +#include "Module/Module.hpp" +#include "Runtime/Task/Task.hpp" + +namespace spu +{ +namespace module +{ + +class Stateful : public Module +{ + public: + Stateful(); + virtual ~Stateful() = default; + + protected: + using module::Module::deep_copy; + + using module::Module::set_name; + using module::Module::set_short_name; + + using module::Module::create_task; + using module::Module::create_tsk; + + using module::Module::create_sck_fwd; + using module::Module::create_sck_in; + using module::Module::create_sck_out; + using module::Module::create_socket_fwd; + using module::Module::create_socket_in; + using module::Module::create_socket_out; + + using module::Module::create_2d_sck_fwd; + using module::Module::create_2d_sck_in; + using module::Module::create_2d_sck_out; + using module::Module::create_2d_socket_fwd; + using module::Module::create_2d_socket_in; + using module::Module::create_2d_socket_out; + + using module::Module::create_cdl; + using module::Module::create_codelet; + using module::Module::register_timer; + using module::Module::set_n_frames_per_wave; + using module::Module::set_single_wave; +}; +} +} + +#endif /* STATEFUL_HPP_ */ diff --git a/include/Module/Switcher/Switcher.hpp b/include/Module/Stateful/Switcher/Switcher.hpp similarity index 95% rename from include/Module/Switcher/Switcher.hpp rename to include/Module/Stateful/Switcher/Switcher.hpp index ed11838..c9e96b3 100644 --- a/include/Module/Switcher/Switcher.hpp +++ b/include/Module/Stateful/Switcher/Switcher.hpp @@ -11,7 +11,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Sequence/Sequence.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" @@ -32,7 +32,7 @@ enum class tsk : size_t } class Switcher - : public Module + : public Stateful , public tools::Interface_reset { friend runtime::Sequence; // Sequence is friend to enable the no copy mode (0 copy) @@ -89,7 +89,7 @@ class Switcher } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Switcher/Switcher.hxx" +#include "Module/Stateful/Switcher/Switcher.hxx" #endif #endif /* SWITCHER_HPP_ */ diff --git a/include/Module/Switcher/Switcher.hxx b/include/Module/Stateful/Switcher/Switcher.hxx similarity index 98% rename from include/Module/Switcher/Switcher.hxx rename to include/Module/Stateful/Switcher/Switcher.hxx index 266d4e4..38bde55 100644 --- a/include/Module/Switcher/Switcher.hxx +++ b/include/Module/Stateful/Switcher/Switcher.hxx @@ -2,7 +2,7 @@ #include #include -#include "Module/Switcher/Switcher.hpp" +#include "Module/Stateful/Switcher/Switcher.hpp" #include "Tools/Exception/exception.hpp" #include "Tools/compute_bytes.h" @@ -34,7 +34,7 @@ Switcher::Switcher(const size_t n_data_sockets, const std::type_index datatype_commute, const size_t n_elmts_select, const std::type_index datatype_select) - : Module() + : Stateful() , n_data_sockets(n_data_sockets) , n_elmts_commute(n_elmts_commute) , n_elmts_select(n_elmts_select) diff --git a/include/Module/Unaryop/Unaryop.hpp b/include/Module/Stateful/Unaryop/Unaryop.hpp similarity index 96% rename from include/Module/Unaryop/Unaryop.hpp rename to include/Module/Stateful/Unaryop/Unaryop.hpp index 690c7cc..34ec55d 100644 --- a/include/Module/Unaryop/Unaryop.hpp +++ b/include/Module/Stateful/Unaryop/Unaryop.hpp @@ -9,7 +9,7 @@ #include #include -#include "Module/Module.hpp" +#include "Module/Stateful/Stateful.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" #include "Tools/Math/unaryop.h" @@ -39,7 +39,7 @@ enum class perform : size_t } template UOP> -class Unaryop : public Module +class Unaryop : public Stateful { public: inline runtime::Task& operator[](const uop::tsk t); @@ -99,7 +99,7 @@ using Unaryop_sign = Unaryop>; } #ifndef DOXYGEN_SHOULD_SKIP_THIS -#include "Module/Unaryop/Unaryop.hxx" +#include "Module/Stateful/Unaryop/Unaryop.hxx" #endif #endif /* UNARYOP_HPP_ */ diff --git a/include/Module/Unaryop/Unaryop.hxx b/include/Module/Stateful/Unaryop/Unaryop.hxx similarity index 98% rename from include/Module/Unaryop/Unaryop.hxx rename to include/Module/Stateful/Unaryop/Unaryop.hxx index ce0fd78..c0de3b3 100644 --- a/include/Module/Unaryop/Unaryop.hxx +++ b/include/Module/Stateful/Unaryop/Unaryop.hxx @@ -1,4 +1,4 @@ -#include "Module/Unaryop/Unaryop.hpp" +#include "Module/Stateful/Unaryop/Unaryop.hpp" namespace spu { @@ -28,7 +28,7 @@ Unaryop::operator[](const std::string& tsk_sck) template UOP> Unaryop::Unaryop(const size_t n_elmts) - : Module() + : Stateful() , n_elmts(n_elmts) { const std::string name = "Unaryop"; diff --git a/include/Module/Stateless/Stateless.hpp b/include/Module/Stateless/Stateless.hpp index 811ef22..bc81294 100644 --- a/include/Module/Stateless/Stateless.hpp +++ b/include/Module/Stateless/Stateless.hpp @@ -15,7 +15,7 @@ namespace spu namespace module { -class Stateless : public Module +class Stateless final : public Module { public: Stateless(); diff --git a/include/Runtime/Pipeline/Pipeline.hpp b/include/Runtime/Pipeline/Pipeline.hpp index 20bca3a..256bf77 100644 --- a/include/Runtime/Pipeline/Pipeline.hpp +++ b/include/Runtime/Pipeline/Pipeline.hpp @@ -11,7 +11,7 @@ #include #include -#include "Module/Adaptor/Adaptor.hpp" +#include "Module/Stateful/Adaptor/Adaptor.hpp" #include "Runtime/Sequence/Sequence.hpp" #include "Tools/Interface/Interface_get_set_n_frames.hpp" diff --git a/include/Runtime/Sequence/Sequence.hxx b/include/Runtime/Sequence/Sequence.hxx index 97e832f..2255ce8 100644 --- a/include/Runtime/Sequence/Sequence.hxx +++ b/include/Runtime/Sequence/Sequence.hxx @@ -1,6 +1,6 @@ #include -#include "Module/Set/Set.hpp" +#include "Module/Stateful/Set/Set.hpp" #include "Runtime/Sequence/Sequence.hpp" namespace spu diff --git a/include/streampu.hpp b/include/streampu.hpp index 8e0014a..c201b8a 100644 --- a/include/streampu.hpp +++ b/include/streampu.hpp @@ -9,116 +9,119 @@ #ifndef STREAMPU_HPP #define STREAMPU_HPP +#ifndef MODULE_HPP_ +#include +#endif #ifndef ADAPTOR_1_TO_N_HPP_ -#include +#include #endif #ifndef ADAPTOR_HPP_ -#include +#include #endif #ifndef ADAPTOR_N_TO_1_HPP_ -#include +#include #endif #ifndef BINARYOP_HPP_ -#include +#include #endif #ifndef CONTROLLER_CYCLIC_HPP_ -#include +#include #endif #ifndef CONTROLLER_HPP_ -#include +#include #endif #ifndef CONTROLLER_LIMIT_HPP_ -#include +#include #endif #ifndef CONTROLLER_STATIC_HPP_ -#include +#include #endif #ifndef DELAYER_HPP_ -#include +#include #endif #ifndef FINALIZER_HPP_ -#include +#include #endif #ifndef INCREMENTER_HPP_ -#include +#include #endif #ifndef INITIALIZER_HPP_ -#include +#include #endif #ifndef ITERATOR_HPP_ -#include -#endif -#ifndef MODULE_HPP_ -#include +#include #endif #ifndef PROBE_LATENCY_HPP_ -#include +#include #endif #ifndef PROBE_OCCURRENCE_HPP_ -#include +#include #endif #ifndef PROBE_HPP_ -#include +#include #endif #ifndef PROBE_STREAM_HPP_ -#include +#include #endif #ifndef PROBE_THROUGHPUT_HPP_ -#include +#include #endif #ifndef PROBE_TIME_HPP_ -#include +#include #endif #ifndef PROBE_TIMESTAMP_HPP_ -#include +#include #endif #ifndef PROBE_VALUE_HPP_ -#include +#include #endif #ifndef REDUCER_HPP_ -#include +#include #endif #ifndef RELAYER_HPP_ -#include +#include #endif #ifndef SET_HPP_ -#include +#include #endif #ifndef SINK_NO_HPP -#include +#include #endif #ifndef SINK_HPP -#include +#include #endif #ifndef SINK_USER_BINARY_HPP -#include +#include #endif #ifndef SLEEPER_HPP_ -#include +#include #endif #ifndef SOURCE_AZCW_HPP_ -#include +#include #endif #ifndef SOURCE_RANDOM_HPP_ -#include +#include #endif #ifndef SOURCE_HPP_ -#include +#include #endif #ifndef SOURCE_USER_BINARY_HPP_ -#include +#include #endif #ifndef SOURCE_USER_HPP_ -#include +#include #endif -#ifndef STATELESS_HPP_ -#include +#ifndef STATEFUL_HPP_ +#include #endif #ifndef SWITCHER_HPP_ -#include +#include #endif #ifndef UNARYOP_HPP_ -#include +#include +#endif +#ifndef STATELESS_HPP_ +#include #endif #ifndef PIPELINE_HPP_ #include diff --git a/src/Module/Adaptor/Adaptor.cpp b/src/Module/Stateful/Adaptor/Adaptor.cpp similarity index 98% rename from src/Module/Adaptor/Adaptor.cpp rename to src/Module/Stateful/Adaptor/Adaptor.cpp index 8ddb65b..2b311ae 100644 --- a/src/Module/Adaptor/Adaptor.cpp +++ b/src/Module/Stateful/Adaptor/Adaptor.cpp @@ -1,4 +1,4 @@ -#include "Module/Adaptor/Adaptor.hpp" +#include "Module/Stateful/Adaptor/Adaptor.hpp" using namespace spu; using namespace spu::module; @@ -22,7 +22,7 @@ Adaptor::clone() const void Adaptor::deep_copy(const Adaptor& m) { - Module::deep_copy(m); + Stateful::deep_copy(m); int id = -1; for (size_t i = 0; i < this->buffer->size(); i++) diff --git a/src/Module/Adaptor/Adaptor_1_to_n.cpp b/src/Module/Stateful/Adaptor/Adaptor_1_to_n.cpp similarity index 98% rename from src/Module/Adaptor/Adaptor_1_to_n.cpp rename to src/Module/Stateful/Adaptor/Adaptor_1_to_n.cpp index 8bdfae4..7ce00e4 100644 --- a/src/Module/Adaptor/Adaptor_1_to_n.cpp +++ b/src/Module/Stateful/Adaptor/Adaptor_1_to_n.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Adaptor/Adaptor_1_to_n.hpp" +#include "Module/Stateful/Adaptor/Adaptor_1_to_n.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Adaptor/Adaptor_n_to_1.cpp b/src/Module/Stateful/Adaptor/Adaptor_n_to_1.cpp similarity index 98% rename from src/Module/Adaptor/Adaptor_n_to_1.cpp rename to src/Module/Stateful/Adaptor/Adaptor_n_to_1.cpp index 4b07d57..84468eb 100644 --- a/src/Module/Adaptor/Adaptor_n_to_1.cpp +++ b/src/Module/Stateful/Adaptor/Adaptor_n_to_1.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Adaptor/Adaptor_n_to_1.hpp" +#include "Module/Stateful/Adaptor/Adaptor_n_to_1.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Controller/Controller.cpp b/src/Module/Stateful/Controller/Controller.cpp similarity index 95% rename from src/Module/Controller/Controller.cpp rename to src/Module/Stateful/Controller/Controller.cpp index 20ff620..e22bb31 100644 --- a/src/Module/Controller/Controller.cpp +++ b/src/Module/Stateful/Controller/Controller.cpp @@ -1,12 +1,12 @@ #include -#include "Module/Controller/Controller.hpp" +#include "Module/Stateful/Controller/Controller.hpp" using namespace spu; using namespace spu::module; Controller::Controller(const size_t init_path) - : Module() + : Stateful() , init_path(init_path) , path(init_path) { diff --git a/src/Module/Controller/Controller_cyclic/Controller_cyclic.cpp b/src/Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.cpp similarity index 92% rename from src/Module/Controller/Controller_cyclic/Controller_cyclic.cpp rename to src/Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.cpp index 2975f9a..2eabf35 100644 --- a/src/Module/Controller/Controller_cyclic/Controller_cyclic.cpp +++ b/src/Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Controller/Controller_cyclic/Controller_cyclic.hpp" +#include "Module/Stateful/Controller/Controller_cyclic/Controller_cyclic.hpp" using namespace spu; using namespace spu::module; diff --git a/src/Module/Controller/Controller_limit/Controller_limit.cpp b/src/Module/Stateful/Controller/Controller_limit/Controller_limit.cpp similarity index 90% rename from src/Module/Controller/Controller_limit/Controller_limit.cpp rename to src/Module/Stateful/Controller/Controller_limit/Controller_limit.cpp index 35611b6..d6353e7 100644 --- a/src/Module/Controller/Controller_limit/Controller_limit.cpp +++ b/src/Module/Stateful/Controller/Controller_limit/Controller_limit.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Controller/Controller_limit/Controller_limit.hpp" +#include "Module/Stateful/Controller/Controller_limit/Controller_limit.hpp" using namespace spu; using namespace spu::module; diff --git a/src/Module/Controller/Controller_static/Controller_static.cpp b/src/Module/Stateful/Controller/Controller_static/Controller_static.cpp similarity index 86% rename from src/Module/Controller/Controller_static/Controller_static.cpp rename to src/Module/Stateful/Controller/Controller_static/Controller_static.cpp index 9d1edeb..dd55721 100644 --- a/src/Module/Controller/Controller_static/Controller_static.cpp +++ b/src/Module/Stateful/Controller/Controller_static/Controller_static.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Controller/Controller_static/Controller_static.hpp" +#include "Module/Stateful/Controller/Controller_static/Controller_static.hpp" using namespace spu; using namespace spu::module; diff --git a/src/Module/Delayer/Delayer.cpp b/src/Module/Stateful/Delayer/Delayer.cpp similarity index 98% rename from src/Module/Delayer/Delayer.cpp rename to src/Module/Stateful/Delayer/Delayer.cpp index 4edf30e..eb9e17c 100644 --- a/src/Module/Delayer/Delayer.cpp +++ b/src/Module/Stateful/Delayer/Delayer.cpp @@ -1,14 +1,14 @@ #include #include -#include "Module/Delayer/Delayer.hpp" +#include "Module/Stateful/Delayer/Delayer.hpp" using namespace spu; using namespace spu::module; template Delayer::Delayer(const size_t size, const D init_val) - : Module() + : Stateful() , size(size) , init_val(init_val) , data(this->size * this->n_frames, init_val) diff --git a/src/Module/Finalizer/Finalizer.cpp b/src/Module/Stateful/Finalizer/Finalizer.cpp similarity index 98% rename from src/Module/Finalizer/Finalizer.cpp rename to src/Module/Stateful/Finalizer/Finalizer.cpp index 764fad8..5b3915c 100644 --- a/src/Module/Finalizer/Finalizer.cpp +++ b/src/Module/Stateful/Finalizer/Finalizer.cpp @@ -1,14 +1,14 @@ #include #include -#include "Module/Finalizer/Finalizer.hpp" +#include "Module/Stateful/Finalizer/Finalizer.hpp" using namespace spu; using namespace spu::module; template Finalizer::Finalizer(const size_t n_elmts, const size_t history_size) - : Module() + : Stateful() , data(history_size, std::vector>(this->get_n_frames(), std::vector(n_elmts, 0))) , next_stream_id(0) { diff --git a/src/Module/Incrementer/Incrementer.cpp b/src/Module/Stateful/Incrementer/Incrementer.cpp similarity index 98% rename from src/Module/Incrementer/Incrementer.cpp rename to src/Module/Stateful/Incrementer/Incrementer.cpp index f446267..d73cf65 100644 --- a/src/Module/Incrementer/Incrementer.cpp +++ b/src/Module/Stateful/Incrementer/Incrementer.cpp @@ -1,14 +1,14 @@ #include #include -#include "Module/Incrementer/Incrementer.hpp" +#include "Module/Stateful/Incrementer/Incrementer.hpp" using namespace spu; using namespace spu::module; template Incrementer::Incrementer(const size_t n_elmts, const size_t ns) - : Module() + : Stateful() , n_elmts(n_elmts) , ns(ns) { diff --git a/src/Module/Initializer/Initializer.cpp b/src/Module/Stateful/Initializer/Initializer.cpp similarity index 98% rename from src/Module/Initializer/Initializer.cpp rename to src/Module/Stateful/Initializer/Initializer.cpp index f82613f..af6eeca 100644 --- a/src/Module/Initializer/Initializer.cpp +++ b/src/Module/Stateful/Initializer/Initializer.cpp @@ -4,14 +4,14 @@ #include #include -#include "Module/Initializer/Initializer.hpp" +#include "Module/Stateful/Initializer/Initializer.hpp" using namespace spu; using namespace spu::module; template Initializer::Initializer(const size_t n_elmts) - : Module() + : Stateful() , init_data(this->get_n_frames(), std::vector(n_elmts, 0)) { const std::string name = "Initializer"; diff --git a/src/Module/Iterator/Iterator.cpp b/src/Module/Stateful/Iterator/Iterator.cpp similarity index 96% rename from src/Module/Iterator/Iterator.cpp rename to src/Module/Stateful/Iterator/Iterator.cpp index 8fe378a..1cd2476 100644 --- a/src/Module/Iterator/Iterator.cpp +++ b/src/Module/Stateful/Iterator/Iterator.cpp @@ -3,13 +3,13 @@ #include #include -#include "Module/Iterator/Iterator.hpp" +#include "Module/Stateful/Iterator/Iterator.hpp" using namespace spu; using namespace spu::module; Iterator::Iterator(const size_t limit) - : Module() + : Stateful() , limit(limit) , counter(0) { diff --git a/src/Module/Probe/Latency/Probe_latency.cpp b/src/Module/Stateful/Probe/Latency/Probe_latency.cpp similarity index 96% rename from src/Module/Probe/Latency/Probe_latency.cpp rename to src/Module/Stateful/Probe/Latency/Probe_latency.cpp index e828135..d23d1da 100644 --- a/src/Module/Probe/Latency/Probe_latency.cpp +++ b/src/Module/Stateful/Probe/Latency/Probe_latency.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Probe/Latency/Probe_latency.hpp" +#include "Module/Stateful/Probe/Latency/Probe_latency.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Probe/Occurrence/Probe_occurrence.cpp b/src/Module/Stateful/Probe/Occurrence/Probe_occurrence.cpp similarity index 95% rename from src/Module/Probe/Occurrence/Probe_occurrence.cpp rename to src/Module/Stateful/Probe/Occurrence/Probe_occurrence.cpp index a43dd7d..a4d12dc 100644 --- a/src/Module/Probe/Occurrence/Probe_occurrence.cpp +++ b/src/Module/Stateful/Probe/Occurrence/Probe_occurrence.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Probe/Occurrence/Probe_occurrence.hpp" +#include "Module/Stateful/Probe/Occurrence/Probe_occurrence.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Probe/Probe.cpp b/src/Module/Stateful/Probe/Probe.cpp similarity index 94% rename from src/Module/Probe/Probe.cpp rename to src/Module/Stateful/Probe/Probe.cpp index a1b0cd8..0313917 100644 --- a/src/Module/Probe/Probe.cpp +++ b/src/Module/Stateful/Probe/Probe.cpp @@ -1,10 +1,10 @@ -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" using namespace spu; using namespace spu::module; AProbe::AProbe() - : Module() + : Stateful() , reporter(nullptr) { } diff --git a/src/Module/Probe/Stream/Probe_stream.cpp b/src/Module/Stateful/Probe/Stream/Probe_stream.cpp similarity index 95% rename from src/Module/Probe/Stream/Probe_stream.cpp rename to src/Module/Stateful/Probe/Stream/Probe_stream.cpp index a2b369a..356596d 100644 --- a/src/Module/Probe/Stream/Probe_stream.cpp +++ b/src/Module/Stateful/Probe/Stream/Probe_stream.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Probe/Stream/Probe_stream.hpp" +#include "Module/Stateful/Probe/Stream/Probe_stream.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Probe/Throughput/Probe_throughput.cpp b/src/Module/Stateful/Probe/Throughput/Probe_throughput.cpp similarity index 97% rename from src/Module/Probe/Throughput/Probe_throughput.cpp rename to src/Module/Stateful/Probe/Throughput/Probe_throughput.cpp index 5607c19..53eb562 100644 --- a/src/Module/Probe/Throughput/Probe_throughput.cpp +++ b/src/Module/Stateful/Probe/Throughput/Probe_throughput.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Probe/Throughput/Probe_throughput.hpp" +#include "Module/Stateful/Probe/Throughput/Probe_throughput.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Probe/Time/Probe_time.cpp b/src/Module/Stateful/Probe/Time/Probe_time.cpp similarity index 96% rename from src/Module/Probe/Time/Probe_time.cpp rename to src/Module/Stateful/Probe/Time/Probe_time.cpp index 61d2f12..185e800 100644 --- a/src/Module/Probe/Time/Probe_time.cpp +++ b/src/Module/Stateful/Probe/Time/Probe_time.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Probe/Time/Probe_time.hpp" +#include "Module/Stateful/Probe/Time/Probe_time.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Probe/Timestamp/Probe_timestamp.cpp b/src/Module/Stateful/Probe/Timestamp/Probe_timestamp.cpp similarity index 96% rename from src/Module/Probe/Timestamp/Probe_timestamp.cpp rename to src/Module/Stateful/Probe/Timestamp/Probe_timestamp.cpp index 660582e..3204677 100644 --- a/src/Module/Probe/Timestamp/Probe_timestamp.cpp +++ b/src/Module/Stateful/Probe/Timestamp/Probe_timestamp.cpp @@ -3,7 +3,7 @@ #include #include -#include "Module/Probe/Timestamp/Probe_timestamp.hpp" +#include "Module/Stateful/Probe/Timestamp/Probe_timestamp.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Probe/Value/Probe_value.cpp b/src/Module/Stateful/Probe/Value/Probe_value.cpp similarity index 97% rename from src/Module/Probe/Value/Probe_value.cpp rename to src/Module/Stateful/Probe/Value/Probe_value.cpp index 97aafa0..1cde6e0 100644 --- a/src/Module/Probe/Value/Probe_value.cpp +++ b/src/Module/Stateful/Probe/Value/Probe_value.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Probe/Value/Probe_value.hpp" +#include "Module/Stateful/Probe/Value/Probe_value.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Relayer/Relayer.cpp b/src/Module/Stateful/Relayer/Relayer.cpp similarity index 98% rename from src/Module/Relayer/Relayer.cpp rename to src/Module/Stateful/Relayer/Relayer.cpp index 87510be..303af6d 100644 --- a/src/Module/Relayer/Relayer.cpp +++ b/src/Module/Stateful/Relayer/Relayer.cpp @@ -1,14 +1,14 @@ #include #include -#include "Module/Relayer/Relayer.hpp" +#include "Module/Stateful/Relayer/Relayer.hpp" using namespace spu; using namespace spu::module; template Relayer::Relayer(const size_t n_elmts, const size_t ns) - : Module() + : Stateful() , n_elmts(n_elmts) , ns(ns) { diff --git a/src/Module/Set/Set.cpp b/src/Module/Stateful/Set/Set.cpp similarity index 99% rename from src/Module/Set/Set.cpp rename to src/Module/Stateful/Set/Set.cpp index 9d92634..3bedc9a 100644 --- a/src/Module/Set/Set.cpp +++ b/src/Module/Stateful/Set/Set.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Set/Set.hpp" +#include "Module/Stateful/Set/Set.hpp" #include "Runtime/Sequence/Sequence.hpp" #include "Tools/Exception/exception.hpp" @@ -9,14 +9,14 @@ using namespace spu; using namespace spu::module; Set::Set(runtime::Sequence& sequence) - : Module() + : Stateful() , sequence_extern(&sequence) { this->init(); } Set::Set(const runtime::Sequence& sequence) - : Module() + : Stateful() , sequence_cloned(sequence.clone()) , sequence_extern(nullptr) { @@ -180,7 +180,7 @@ Set::clone() const void Set::deep_copy(const Set& m) { - Module::deep_copy(m); + Stateful::deep_copy(m); if (m.sequence_cloned != nullptr) this->sequence_cloned.reset(m.sequence_cloned->clone()); else diff --git a/src/Module/Sink/NO/Sink_NO.cpp b/src/Module/Stateful/Sink/NO/Sink_NO.cpp similarity index 96% rename from src/Module/Sink/NO/Sink_NO.cpp rename to src/Module/Stateful/Sink/NO/Sink_NO.cpp index 3fa116c..4eeca27 100644 --- a/src/Module/Sink/NO/Sink_NO.cpp +++ b/src/Module/Stateful/Sink/NO/Sink_NO.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Sink/NO/Sink_NO.hpp" +#include "Module/Stateful/Sink/NO/Sink_NO.hpp" using namespace spu; using namespace spu::module; diff --git a/src/Module/Sink/User/Sink_user_binary.cpp b/src/Module/Stateful/Sink/User/Sink_user_binary.cpp similarity index 98% rename from src/Module/Sink/User/Sink_user_binary.cpp rename to src/Module/Stateful/Sink/User/Sink_user_binary.cpp index 70890ed..69649e2 100644 --- a/src/Module/Sink/User/Sink_user_binary.cpp +++ b/src/Module/Stateful/Sink/User/Sink_user_binary.cpp @@ -2,7 +2,7 @@ #include #include -#include "Module/Sink/User/Sink_user_binary.hpp" +#include "Module/Stateful/Sink/User/Sink_user_binary.hpp" #include "Tools/Algo/Bit_packer/Bit_packer.hpp" #include "Tools/Exception/exception.hpp" diff --git a/src/Module/Sleeper/Sleeper.cpp b/src/Module/Stateful/Sleeper/Sleeper.cpp similarity index 95% rename from src/Module/Sleeper/Sleeper.cpp rename to src/Module/Stateful/Sleeper/Sleeper.cpp index 930899a..6dd2dac 100644 --- a/src/Module/Sleeper/Sleeper.cpp +++ b/src/Module/Stateful/Sleeper/Sleeper.cpp @@ -2,13 +2,13 @@ #include #include -#include "Module/Sleeper/Sleeper.hpp" +#include "Module/Stateful/Sleeper/Sleeper.hpp" using namespace spu; using namespace spu::module; Sleeper::Sleeper(const size_t ns) - : Module() + : Stateful() , ns(ns) { const std::string name = "Sleeper"; diff --git a/src/Module/Source/AZCW/Source_AZCW.cpp b/src/Module/Stateful/Source/AZCW/Source_AZCW.cpp similarity index 95% rename from src/Module/Source/AZCW/Source_AZCW.cpp rename to src/Module/Stateful/Source/AZCW/Source_AZCW.cpp index 7475669..432896b 100644 --- a/src/Module/Source/AZCW/Source_AZCW.cpp +++ b/src/Module/Stateful/Source/AZCW/Source_AZCW.cpp @@ -1,6 +1,6 @@ #include -#include "Module/Source/AZCW/Source_AZCW.hpp" +#include "Module/Stateful/Source/AZCW/Source_AZCW.hpp" using namespace spu::module; diff --git a/src/Module/Source/Random/Source_random.cpp b/src/Module/Stateful/Source/Random/Source_random.cpp similarity index 96% rename from src/Module/Source/Random/Source_random.cpp rename to src/Module/Stateful/Source/Random/Source_random.cpp index 4ea9a03..1c76474 100644 --- a/src/Module/Source/Random/Source_random.cpp +++ b/src/Module/Stateful/Source/Random/Source_random.cpp @@ -1,4 +1,4 @@ -#include "Module/Source/Random/Source_random.hpp" +#include "Module/Stateful/Source/Random/Source_random.hpp" using namespace spu::module; diff --git a/src/Module/Source/User/Source_user.cpp b/src/Module/Stateful/Source/User/Source_user.cpp similarity index 98% rename from src/Module/Source/User/Source_user.cpp rename to src/Module/Stateful/Source/User/Source_user.cpp index 087c68b..b298d5f 100644 --- a/src/Module/Source/User/Source_user.cpp +++ b/src/Module/Stateful/Source/User/Source_user.cpp @@ -1,7 +1,7 @@ #include #include -#include "Module/Source/User/Source_user.hpp" +#include "Module/Stateful/Source/User/Source_user.hpp" #include "Tools/Exception/exception.hpp" using namespace spu; diff --git a/src/Module/Source/User/Source_user_binary.cpp b/src/Module/Stateful/Source/User/Source_user_binary.cpp similarity index 98% rename from src/Module/Source/User/Source_user_binary.cpp rename to src/Module/Stateful/Source/User/Source_user_binary.cpp index 67d6c49..df745fb 100644 --- a/src/Module/Source/User/Source_user_binary.cpp +++ b/src/Module/Stateful/Source/User/Source_user_binary.cpp @@ -1,4 +1,4 @@ -#include "Module/Source/User/Source_user_binary.hpp" +#include "Module/Stateful/Source/User/Source_user_binary.hpp" #include "Tools/Algo/Bit_packer/Bit_packer.hpp" #include "Tools/Exception/exception.hpp" diff --git a/src/Module/Stateful/Stateful.cpp b/src/Module/Stateful/Stateful.cpp new file mode 100644 index 0000000..7a2471b --- /dev/null +++ b/src/Module/Stateful/Stateful.cpp @@ -0,0 +1,9 @@ +#include "Module/Stateful/Stateful.hpp" + +using namespace spu; +using namespace spu::module; + +Stateful::Stateful() + : Module() +{ +} diff --git a/src/Module/Switcher/Switcher.cpp b/src/Module/Stateful/Switcher/Switcher.cpp similarity index 83% rename from src/Module/Switcher/Switcher.cpp rename to src/Module/Stateful/Switcher/Switcher.cpp index f4d5121..6404402 100644 --- a/src/Module/Switcher/Switcher.cpp +++ b/src/Module/Stateful/Switcher/Switcher.cpp @@ -1,4 +1,4 @@ -#include "Module/Switcher/Switcher.hpp" +#include "Module/Stateful/Switcher/Switcher.hpp" using namespace spu; using namespace spu::module; diff --git a/src/Runtime/Pipeline/Pipeline.cpp b/src/Runtime/Pipeline/Pipeline.cpp index 6c05074..45c9a33 100644 --- a/src/Runtime/Pipeline/Pipeline.cpp +++ b/src/Runtime/Pipeline/Pipeline.cpp @@ -4,9 +4,8 @@ #include #include -#include "Module/Adaptor/Adaptor.hpp" -#include "Module/Adaptor/Adaptor_1_to_n.hpp" -#include "Module/Adaptor/Adaptor_n_to_1.hpp" +#include "Module/Stateful/Adaptor/Adaptor_1_to_n.hpp" +#include "Module/Stateful/Adaptor/Adaptor_n_to_1.hpp" #include "Runtime/Pipeline/Pipeline.hpp" #include "Tools/Exception/exception.hpp" #include "Tools/Interface/Interface_waiting.hpp" diff --git a/src/Runtime/Sequence/Sequence.cpp b/src/Runtime/Sequence/Sequence.cpp index ea2104d..2e462f6 100644 --- a/src/Runtime/Sequence/Sequence.cpp +++ b/src/Runtime/Sequence/Sequence.cpp @@ -8,10 +8,10 @@ #include #include -#include "Module/Adaptor/Adaptor.hpp" #include "Module/Module.hpp" -#include "Module/Probe/Probe.hpp" -#include "Module/Switcher/Switcher.hpp" +#include "Module/Stateful/Adaptor/Adaptor.hpp" +#include "Module/Stateful/Probe/Probe.hpp" +#include "Module/Stateful/Switcher/Switcher.hpp" #include "Runtime/Sequence/Sequence.hpp" #include "Runtime/Socket/Socket.hpp" #include "Runtime/Task/Task.hpp" diff --git a/src/Tools/Reporter/Probe/Reporter_probe.cpp b/src/Tools/Reporter/Probe/Reporter_probe.cpp index fdf2dd1..3c69034 100644 --- a/src/Tools/Reporter/Probe/Reporter_probe.cpp +++ b/src/Tools/Reporter/Probe/Reporter_probe.cpp @@ -2,7 +2,7 @@ #include #include -#include "Module/Probe/Probe.hpp" +#include "Module/Stateful/Probe/Probe.hpp" #include "Tools/Reporter/Probe/Reporter_probe.hpp"