阿对对队的一次提交尝试(进行了小部分的代码评注) #8
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue