!11113 dataset: minor fixes which resolve codedex CI CONST_POINTER_PARAM alarms

From: @cathwong
Reviewed-by: @nsyca
Signed-off-by: @nsyca
pull/11113/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit f076bc6524

@ -498,13 +498,13 @@ Status BatchOp::UnpackPadInfo(const PadInfo &pad_info,
}
// Visitor accept method for NodePass
Status BatchOp::Accept(NodePass *p, bool *modified) {
Status BatchOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<BatchOp>(), modified);
}
// Visitor pre-accept method for NodePass
Status BatchOp::PreAccept(NodePass *p, bool *modified) {
Status BatchOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->PreRunOnNode(shared_from_base<BatchOp>(), modified);
}

@ -197,13 +197,13 @@ class BatchOp : public ParallelOp {
// @param p - Pointer to the NodePass to be accepted.
// @param modified - Whether this node visit modified the pipeline.
// @return - Status of the node visit.
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
// Base-class override for NodePass visitor acceptor.
// @param p - Pointer to the NodePass to be accepted.
// @param modified - Whether this node visit modified the pipeline.
// @return - Status of the node visit.
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
// Op name getter
// @return Name of the current Op

@ -161,7 +161,7 @@ void BuildSentencePieceVocabOp::Next(std::string *sentence) {
}
// Pre-Visitor accept method for NodePass
Status BuildSentencePieceVocabOp::PreAccept(NodePass *p, bool *modified) {
Status BuildSentencePieceVocabOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call the pre-visitation
return p->PreRunOnNode(shared_from_base<BuildSentencePieceVocabOp>(), modified);
}

@ -169,7 +169,7 @@ class BuildSentencePieceVocabOp : public PipelineOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
private:
bool read_done_;

@ -231,7 +231,7 @@ void BuildVocabOp::Print(std::ostream &out, bool show_all) const {
}
// Pre-Visitor accept method for NodePass
Status BuildVocabOp::PreAccept(NodePass *p, bool *modified) {
Status BuildVocabOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call the pre-visitation
return p->PreRunOnNode(shared_from_base<BuildVocabOp>(), modified);
}

@ -172,7 +172,7 @@ class BuildVocabOp : public ParallelOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
private:
const int32_t interval_;

@ -135,7 +135,7 @@ Status CacheLookupOp::ComputeColMap() {
}
// Visitor accept method for NodePass
Status CacheLookupOp::Accept(NodePass *p, bool *modified) {
Status CacheLookupOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<CacheLookupOp>(), modified);
}

@ -107,7 +107,7 @@ class CacheLookupOp : public CacheBase, public SamplerRT {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
protected:
Status ComputeColMap() override;

@ -263,13 +263,13 @@ Status CacheMergeOp::Builder::Build(std::shared_ptr<CacheMergeOp> *ptr) {
}
// Pre-Visitor accept method for NodePass
Status CacheMergeOp::PreAccept(NodePass *p, bool *modified) {
Status CacheMergeOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call the pre-visitation
return p->PreRunOnNode(shared_from_base<CacheMergeOp>(), modified);
}
// Visitor accept method for NodePass
Status CacheMergeOp::Accept(NodePass *p, bool *modified) {
Status CacheMergeOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<CacheMergeOp>(), modified);
}

@ -174,13 +174,13 @@ class CacheMergeOp : public ParallelOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
/// \brief Base-class override for NodePass visitor acceptor
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
/// \brief Base-class override for eoe handling
/// \param worker_id

@ -226,13 +226,13 @@ Status CacheOp::EofReceived(int32_t worker_id) {
}
// Pre-Visitor accept method for NodePass
Status CacheOp::PreAccept(NodePass *p, bool *modified) {
Status CacheOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call the pre-visitation
return p->PreRunOnNode(shared_from_base<CacheOp>(), modified);
}
// Visitor accept method for NodePass
Status CacheOp::Accept(NodePass *p, bool *modified) {
Status CacheOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<CacheOp>(), modified);
}

@ -125,12 +125,12 @@ class CacheOp : public CacheBase, public RandomAccessOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
/// \brief Base-class override for NodePass visitor acceptor
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
/// \brief Base-class override for handling cases when an eof is received.
/// \param worker_id - The worker id
/// \return Status The status code returned

@ -191,7 +191,7 @@ Status ConcatOp::ComputeColMap() {
}
// Visitor pre-accept method for NodePass
Status ConcatOp::PreAccept(NodePass *p, bool *modified) {
Status ConcatOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->PreRunOnNode(shared_from_base<ConcatOp>(), modified);
}

@ -109,7 +109,7 @@ class ConcatOp : public PipelineOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
/// \brief Gets the number of classes
/// \param[out] num_classes the number of classes

@ -402,13 +402,13 @@ Status DatasetOp::ComputeColMap() {
return Status::OK();
}
Status DatasetOp::PreAccept(NodePass *p, bool *modified) {
Status DatasetOp::PreAccept(NodePass *p, bool *const modified) {
// DatasetOp is the base class of visitor target pre-visit.
// This method will only be called if its derived class does not implement one.
return p->PreRunOnNode(shared_from_this(), modified);
}
Status DatasetOp::Accept(NodePass *p, bool *modified) {
Status DatasetOp::Accept(NodePass *p, bool *const modified) {
// DatasetOp is the base class of visitor target.
// This method will only be called if its derived class does not implement one.
return p->RunOnNode(shared_from_this(), modified);

@ -326,14 +326,14 @@ class DatasetOp : public std::enable_shared_from_this<DatasetOp> {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
virtual Status PreAccept(NodePass *p, bool *modified);
virtual Status PreAccept(NodePass *p, bool *const modified);
/// \brief Base method for NodePass visit. Subclass needs to override this if it requires special node visit access.
/// Check "dataset/engine/opt/pass.h" for more details.
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
virtual Status Accept(NodePass *p, bool *modified);
virtual Status Accept(NodePass *p, bool *const modified);
/// Op name getter
/// \return Name of the current Op

@ -503,7 +503,7 @@ void DeviceQueueOp::Print(std::ostream &out, bool show_all) const {
}
// Visitor accept method for NodePass
Status DeviceQueueOp::Accept(NodePass *p, bool *modified) {
Status DeviceQueueOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<DeviceQueueOp>(), modified);
}

@ -171,7 +171,7 @@ class DeviceQueueOp : public PipelineOp {
// @param p - Pointer to the NodePass to be accepted.
// @param modified - Whether this node visit modified the pipeline.
// @return - Status of the node visit.
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
// Op name getter
// @return Name of the current Op

@ -105,13 +105,13 @@ Status EpochCtrlOp::EoeReceived(int32_t worker_id) {
}
// Pre-Visitor accept method for NodePass
Status EpochCtrlOp::PreAccept(NodePass *p, bool *modified) {
Status EpochCtrlOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call the pre-visitation
return p->PreRunOnNode(shared_from_base<EpochCtrlOp>(), modified);
}
// Visitor accept method for NodePass
Status EpochCtrlOp::Accept(NodePass *p, bool *modified) {
Status EpochCtrlOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call the pre-visitation
return p->RunOnNode(shared_from_base<EpochCtrlOp>(), modified);
}

@ -69,13 +69,13 @@ class EpochCtrlOp : public RepeatOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
/// \brief Base-class override for NodePass visitor acceptor
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
int64_t GetTreeRepeatCount() override;
};

@ -248,13 +248,13 @@ Status FilterOp::InvokePredicateFunc(const TensorRow &input, bool *out_predicate
}
// Visitor accept method for NodePass
Status FilterOp::Accept(NodePass *p, bool *modified) {
Status FilterOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<FilterOp>(), modified);
}
// Visitor pre-accept method for NodePass
Status FilterOp::PreAccept(NodePass *p, bool *modified) {
Status FilterOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->PreRunOnNode(shared_from_base<FilterOp>(), modified);
}

@ -125,13 +125,13 @@ class FilterOp : public ParallelOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
// Base-class override for NodePass visitor acceptor.
// @param p - Pointer to the NodePass to be accepted.
// @param modified - Whether this node visit modified the pipeline.
// @return - Status of the node visit.
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
// Op name getter
// @return Name of the current Op

@ -438,13 +438,13 @@ void MapOp::CreateFinalColMap(std::unordered_map<std::string, int32_t> *col_name
}
// Visitor accept method for NodePass
Status MapOp::Accept(NodePass *p, bool *modified) {
Status MapOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<MapOp>(), modified);
}
// Visitor pre-accept method for NodePass
Status MapOp::PreAccept(NodePass *p, bool *modified) {
Status MapOp::PreAccept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->PreRunOnNode(shared_from_base<MapOp>(), modified);
}

@ -181,13 +181,13 @@ class MapOp : public ParallelOp {
/// \param[in] p The node to visit
/// \param[out] modified Indicator if the node was modified
/// \return Status of the node visit
Status PreAccept(NodePass *p, bool *modified) override;
Status PreAccept(NodePass *p, bool *const modified) override;
/// \brief Base-class override for NodePass visitor acceptor.
/// \param[in] p Pointer to the NodePass to be accepted.
/// \param[out] modified Whether this node visit modified the pipeline.
/// \return - Status of the node visit.
Status Accept(NodePass *p, bool *modified) override;
Status Accept(NodePass *p, bool *const modified) override;
// Op name getter
// @return Name of the current Op

@ -130,7 +130,7 @@ Status ProjectOp::EoeReceived(int32_t worker_id) {
Status ProjectOp::EofReceived(int32_t worker_id) { return Status::OK(); }
// Visitor accept method for NodePass
Status ProjectOp::Accept(NodePass *p, bool *modified) {
Status ProjectOp::Accept(NodePass *p, bool *const modified) {
// Downcast shared pointer then call visitor
return p->RunOnNode(shared_from_base<ProjectOp>(), modified);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save