提交 0746bffb 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!3056 Alarm modification

Merge pull request !3056 from shenwei41/sw_master
......@@ -19,12 +19,10 @@
#include <memory>
#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<CacheOp> 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
......
......@@ -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.
......
......@@ -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<TimePoint>(1));
out_buffer_count_table_.AddSample(std::vector<int64_t>(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;
......
......@@ -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<const char *>(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_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册