Program Listing for File pass_base.h

Return to documentation for file (include/converter/include/registry/pass_base.h)

#ifndef MINDSPORE_LITE_INCLUDE_REGISTRY_PASS_BASE_H_
#define MINDSPORE_LITE_INCLUDE_REGISTRY_PASS_BASE_H_

#include <memory>
#include <string>
#include "include/api/types.h"
#include "mindapi/ir/func_graph.h"

namespace mindspore {
namespace registry {
class MS_API PassBase {
 public:
  explicit PassBase(const std::string &name = "PassBase") : name_(name) {}

  virtual ~PassBase() = default;

  virtual bool Execute(const api::FuncGraphPtr &func_graph) = 0;

 private:
  const std::string name_;
};

using PassBasePtr = std::shared_ptr<PassBase>;
}  // namespace registry
}  // namespace mindspore
#endif  // MINDSPORE_LITE_INCLUDE_REGISTRY_PASS_BASE_H_