diff --git a/mindspore/ccsrc/minddata/dataset/api/execute.cc b/mindspore/ccsrc/minddata/dataset/api/execute.cc index bf34529fe9..548bb8866b 100644 --- a/mindspore/ccsrc/minddata/dataset/api/execute.cc +++ b/mindspore/ccsrc/minddata/dataset/api/execute.cc @@ -23,7 +23,7 @@ namespace mindspore { namespace dataset { namespace api { -Execute::Execute(const std::shared_ptr &op) : op_(std::move(op)) {} +Execute::Execute(std::shared_ptr op) : op_(std::move(op)) {} std::shared_ptr Execute::operator()(std::shared_ptr input) { // Build the op diff --git a/mindspore/ccsrc/minddata/dataset/include/execute.h b/mindspore/ccsrc/minddata/dataset/include/execute.h index c2028fbb12..53d6ee5572 100644 --- a/mindspore/ccsrc/minddata/dataset/include/execute.h +++ b/mindspore/ccsrc/minddata/dataset/include/execute.h @@ -30,10 +30,11 @@ class TensorOp; namespace api { +// class to run tensor operations in eager mode class Execute { public: /// \brief Constructor - explicit Execute(const std::shared_ptr &op); + explicit Execute(std::shared_ptr op); /// \brief callable function to execute the TensorOperation in eager mode /// \param[inout] input - the tensor to be transformed