阿对对队的一次提交尝试(进行了小部分的代码评注) #8

Closed
zzy34407230 wants to merge 37 commits from zzy34407230/mindspore2022:master into master
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 3254568adf - Show all commits

View File

@ -28,8 +28,14 @@ Graph::~Graph() {}
Graph::Graph(std::nullptr_t) : graph_data_(nullptr) {}
/// \brief Overload the operator to determine if the graph model (the object pointed to by graph_data) fails to load.
/// If it fails to load, graph_data_==nullptr, and this method returns True.
/// Due to the possibility that the Graph object(this pointer) may be constant, and C++ rules dictate that only pointers to constants can be used to store the address of constant objects, the const keyword is used to modify the this pointer.
bool Graph::operator==(std::nullptr_t) const { return graph_data_ == nullptr; }
/// \brief Overload the operator to determine whether the graph model (the object pointed to by graph_data) is loaded successfully.
/// If it is loaded successfully, graph_data_ != nullptr, and this method returns True.
/// Due to the possibility that the Graph object(this pointer) may be constant, and C++ rules dictate that only pointers to constants can be used to store the address of constant objects, the const keyword is used to modify the this pointer.
bool Graph::operator!=(std::nullptr_t) const { return graph_data_ != nullptr; }
ModelType Graph::ModelType() const {

View File

@ -26,7 +26,7 @@
#include "ir/func_graph.h"
namespace mindspore {
class Graph::GraphData {
class Graph::GraphData {/// Define the inner class GraphData of Graph.
public:
GraphData();