RegOpLibInit
Applicable Products
All processors
Header File/Library File
- Header file: #include <register/op_lib_register.h>
- Library file: libregister.so
Function Usage
Registers the initialization function of the custom operator dynamic library.
Prototype
1 | OpLibRegister &RegOpLibInit(OpLibInitFunc func) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
func |
Input |
Custom initialization function to be registered. The type is OpLibInitFunc. using OpLibInitFunc = uint32_t (*)(ge::AscendString&); |
Returns
Object of class OpLibRegister, which registers the OpLibInitFunc function.
Restrictions
None
Example
1 2 3 4 5 6 | uint32_t Init(ge::AscendString&) { // init func return 0; } REGISTER_OP_LIB (vendor_1).RegOpLibInit (Init); // Register the initialization function Init of the vendor vendor_1. |
Parent topic: OpLibRegister