Updated on 2022-03-13 GMT+08:00

ATTR_ALL_VERIFY

Function Prototype

ATTR_ALL_VERIFY (x)

Function Description

Registers the operator verification function.

Parameter Description

Parameter

Input/Output

Type

Description

x

Input

-

Macro parameter, operator verification function

For example, call ATTR_ALL_VERIFY(FullConnectionVerify) to register the operator verification function FullConnectionVerify. FullConnectionVerify is declared in DECLARE_VERIFIER and defined in IMPLEMT_VERIFIER. For details, see Description of Macros DECLARE_VERIFIER and IMPLEMT_VERIFIER.

Return Value

None

Exception Handling

None

Restriction

None

Description of Macros DECLARE_VERIFIER and IMPLEMT_VERIFIER

Before registering the operator verification function, you need to declare the function in the DECLARE_VERIFIER macro and define the function in the IMPLEMT_VERIFIER macro.

  • Declaring the function
    DECLARE_VERIFIER(FullConnection, FullConnectionVerify)

    The expanded implementation of the DECLARE_VERIFIER macro is as follows:

    namespace op {
    class FullConnection;
    }
    static graphStatus FullConnectionVerify(op::FullConnection op);
  • Defining the function
    IMPLEMT_VERIFIER(FullConnection, FullConnectionVerify) {
    // Implementation details
    }

    The expanded implementation of the IMPLEMT_VERIFIER macro is as follows:

    static graphStatus FullConnectionVerify(op::FullConnection op){
    // Implementation details
    }