Dragon API Dragon v0.3.0 C++ OpSchema¶ class OpSchema¶ Class to record the schema of operator. Constructors¶ inline dragon::OpSchema::OpSchema()¶ Default constructor. inline dragon::OpSchema::OpSchema( const string &op_type, const string &file, const int line)¶ Constructor with the defined spec. Public Functions¶ AllowInplace¶ OpSchema &dragon::OpSchema::AllowInplace(set<pair<int, int>> inplace)¶ Set the rule to allow inplace with a group of indices. AllowInplace¶ OpSchema &dragon::OpSchema::AllowInplace(std::function<bool(int, int)> inplace)¶ Set the rule to allow inplace with a function. NumInputs¶ OpSchema &dragon::OpSchema::NumInputs(int n)¶ Set a fixed number of inputs. NumInputs¶ OpSchema &dragon::OpSchema::NumInputs( int min_num, int max_num)¶ Set the min and max number of inputs. NumOutputs¶ OpSchema &dragon::OpSchema::NumOutputs(int n)¶ Set a fixed number of outputs. NumOutputs¶ OpSchema &dragon::OpSchema::NumOutputs( int min_num, int max_num)¶ Set the min and max number of outputs. Verify¶ bool dragon::OpSchema::Verify(const OperatorDef &def) const¶ Check if the given def matches this schema.