From bda46f480f6f52e84b3da5b04e4e8ea6200b02d6 Mon Sep 17 00:00:00 2001 From: shenwei41 Date: Mon, 13 Jul 2020 19:26:49 +0800 Subject: [PATCH] Alarm modification --- mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h | 7 ++++--- mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h | 3 +++ mindspore/ccsrc/dataset/engine/perf/connector_throughput.h | 7 +++++-- mindspore/ccsrc/dataset/util/slice.h | 6 ++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h b/mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h index 7e4a89e3da..be1aaea645 100644 --- a/mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h +++ b/mindspore/ccsrc/dataset/engine/opt/pre/removal_nodes.h @@ -19,12 +19,10 @@ #include #include "dataset/engine/opt/pass.h" +#include "dataset/engine/opt/pre/removal_pass.h" namespace mindspore { namespace dataset { - -class RemovalPass; - /// \class RemovalNodes removal_nodes.h /// \brief This is a NodePass who's job is to identify which nodes should be removed. /// It works in conjunction with the removal_pass. @@ -46,6 +44,9 @@ class RemovalNodes : public NodePass { /// \return Status The error code return Status RunOnNode(std::shared_ptr node, bool *modified) override; + /// \brief Destructor + ~RemovalNodes() = default; + /// \brief Perform ShuffleOp removal check /// \param[in] node The node being visited /// \param[inout] modified Indicator if the node was changed at all diff --git a/mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h b/mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h index 6523ca69b2..6c1963b826 100644 --- a/mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h +++ b/mindspore/ccsrc/dataset/engine/opt/pre/removal_pass.h @@ -34,6 +34,9 @@ class RemovalPass : public TreePass { /// \brief Constructor RemovalPass(); + /// \brief Destructor + ~RemovalPass() = default; + /// \brief Runs a removal_nodes pass first to find out which nodes to remove, then removes them. /// \param[inout] tree The tree to operate on. /// \param[inout] Indicate of the tree was modified. diff --git a/mindspore/ccsrc/dataset/engine/perf/connector_throughput.h b/mindspore/ccsrc/dataset/engine/perf/connector_throughput.h index e873eb8315..4dbb4cdad7 100644 --- a/mindspore/ccsrc/dataset/engine/perf/connector_throughput.h +++ b/mindspore/ccsrc/dataset/engine/perf/connector_throughput.h @@ -26,12 +26,11 @@ #include "dataset/engine/perf/perf_data.h" #include "dataset/engine/perf/cyclic_array.h" #include "dataset/engine/datasetops/dataset_op.h" +#include "dataset/engine/execution_tree.h" using json = nlohmann::json; namespace mindspore { namespace dataset { -class ExecutionTree; - // Connector throughput samples the output connector size of each op in the pipeline. // For the description of the data structure see perf_buffer.h // It support JSON serialization for external usage. @@ -52,6 +51,10 @@ class ConnectorThroughput : public Sampling { timestamps_.AddSample(std::vector(1)); out_buffer_count_table_.AddSample(std::vector(n_nodes_)); } + + /// \brief Destructor + ~ConnectorThroughput() = default; + // Driver function for connector size sampling. // This function samples the connector size of every nodes within the ExecutionTree Status Sample() override; diff --git a/mindspore/ccsrc/dataset/util/slice.h b/mindspore/ccsrc/dataset/util/slice.h index 127df23cfa..b44f4d6a39 100644 --- a/mindspore/ccsrc/dataset/util/slice.h +++ b/mindspore/ccsrc/dataset/util/slice.h @@ -31,6 +31,10 @@ class ReadableSlice { public: ReadableSlice() : ptr_(nullptr), sz_(0) {} ReadableSlice(const void *ptr, size_t sz) : ptr_(ptr), sz_(sz) {} + + /// \brief Destructor + ~ReadableSlice() = default; + ReadableSlice(const ReadableSlice &src, off64_t offset, size_t len) { ptr_ = static_cast(src.GetPointer()) + offset; sz_ = len; @@ -89,6 +93,8 @@ class WritableSlice : public ReadableSlice { WritableSlice(const WritableSlice &src, off64_t offset, size_t len); WritableSlice(const WritableSlice &src, off64_t offset); WritableSlice(const WritableSlice &lhs) : ReadableSlice(lhs) { mutable_data_ = lhs.mutable_data_; } + /// \brief Destructor + ~WritableSlice() = default; WritableSlice &operator=(const WritableSlice &lhs) { if (this != &lhs) { mutable_data_ = lhs.mutable_data_;