32 #define NNVM_DLL __declspec(dllexport) 34 #define NNVM_DLL __declspec(dllimport) 37 #define NNVM_DLL __attribute__((visibility("default"))) 77 const char*** out_array);
113 const char **real_name,
114 const char **description,
116 const char ***arg_names,
117 const char ***arg_type_infos,
118 const char ***arg_descriptions,
119 const char **return_type);
210 const char** values);
220 int recursive_option,
254 const char ***out_str_array);
264 const char ***out_str_array);
356 const char* json_value);
372 const char** json_out,
399 const char** pass_names,
406 #endif // NNVM_C_API_H_ void * GraphHandle
handle to Graph
Definition: c_api.h:48
void * SymbolHandle
handle to a symbol that can be bind as operator
Definition: c_api.h:74
NNVM_DLL int NNSymbolListInputNames(SymbolHandle symbol, int option, nn_uint *out_size, const char ***out_str_array)
List input names in the symbol.
NNVM_DLL int NNSymbolListAttrs(SymbolHandle symbol, int recursive_option, nn_uint *out_size, const char ***out)
Get all attributes from symbol, including all descendents.
NNVM_DLL int NNListUniqueOps(nn_uint *out_size, OpHandle **out_array)
list all the available operators. This won't include the alias, use ListAllNames instead to get all a...
NNVM_DLL int NNSymbolGetInternals(SymbolHandle symbol, SymbolHandle *out)
Get a symbol that contains all the internals.
NNVM_DLL int NNSymbolGetOutput(SymbolHandle symbol, nn_uint index, SymbolHandle *out)
Get index-th outputs of the symbol.
NNVM_DLL int NNGraphGetSymbol(GraphHandle graph, SymbolHandle *symbol)
Get a new symbol from the graph.
NNVM_DLL int NNSymbolPrint(SymbolHandle symbol, const char **out_str)
Print the content of symbol, used for debug.
NNVM_DLL int NNSymbolListOutputNames(SymbolHandle symbol, nn_uint *out_size, const char ***out_str_array)
List returns names in the symbol.
NNVM_DLL int NNGraphCreate(SymbolHandle symbol, GraphHandle *graph)
create a graph handle from symbol
NNVM_DLL int NNGetOpInfo(OpHandle op, const char **real_name, const char **description, nn_uint *num_doc_args, const char ***arg_names, const char ***arg_type_infos, const char ***arg_descriptions, const char **return_type)
Get the detailed information about atomic symbol.
NNVM_DLL int NNSymbolCreateAtomicSymbol(OpHandle op, nn_uint num_param, const char **keys, const char **vals, SymbolHandle *out)
Create an AtomicSymbol functor.
#define NNVM_DLL
NNVM_DLL prefix for windows.
Definition: c_api.h:37
NNVM_DLL int NNGraphApplyPasses(GraphHandle src, nn_uint num_pass, const char **pass_names, GraphHandle *dst)
Apply passes on the src graph.
NNVM_DLL int NNGraphSetJSONAttr(GraphHandle handle, const char *key, const char *json_value)
Get Set a attribute in json format. This feature allows pass graph attributes back and forth in reaso...
NNVM_DLL int NNListAllOpNames(nn_uint *out_size, const char ***out_array)
list all the available operator names, include entries.
NNVM_DLL int NNGetOpHandle(const char *op_name, OpHandle *op_out)
Get operator handle given name.
NNVM_DLL int NNAddControlDeps(SymbolHandle handle, SymbolHandle src_dep)
Add src_dep to the handle as control dep.
NNVM_DLL void NNAPISetLastError(const char *msg)
Set the last error message needed by C API.
NNVM_DLL int NNGraphFree(GraphHandle handle)
free the graph handle
NNVM_DLL int NNSymbolFree(SymbolHandle symbol)
Free the symbol handle.
NNVM_DLL const char * NNGetLastError(void)
return str message of the last error all function in this file will return 0 when success and -1 when...
unsigned int nn_uint
manually define unsigned int
Definition: c_api.h:41
NNVM_DLL int NNSymbolCreateVariable(const char *name, SymbolHandle *out)
Create a Variable Symbol.
NNVM_DLL int NNSymbolCopy(SymbolHandle symbol, SymbolHandle *out)
Copy the symbol to another handle.
NNVM_DLL int NNGraphSetNodeEntryListAttr_(GraphHandle handle, const char *key, SymbolHandle list)
Set a attribute whose type is std::vector<NodeEntry> in c++ This feature allows pass List of symbolic...
NNVM_DLL int NNSymbolGetNumOutputs(SymbolHandle symbol, nn_uint *output_count)
Supply number of outputs of the symbol.
NNVM_DLL int NNSymbolCompose(SymbolHandle sym, const char *name, nn_uint num_args, const char **keys, SymbolHandle *args)
Compose the symbol on other symbols.
NNVM_DLL int NNSymbolSetAttrs(SymbolHandle symbol, nn_uint num_param, const char **keys, const char **values)
Set string attribute from symbol. NOTE: Setting attribute to a symbol can affect the semantics(mutabl...
NNVM_DLL int NNSymbolCreateGroup(nn_uint num_symbols, SymbolHandle *symbols, SymbolHandle *out)
Create a Symbol by grouping list of symbols together.
NNVM_DLL int NNGraphGetJSONAttr(GraphHandle handle, const char *key, const char **json_out, int *success)
Get a serialized attrirbute from graph. This feature allows pass graph attributes back and forth in r...
NNVM_DLL int NNSymbolGetChildren(SymbolHandle symbol, SymbolHandle *out)
Get a symbol that contains only direct children.
NNVM_DLL int NNSymbolGetAttr(SymbolHandle symbol, const char *key, const char **out, int *success)
Get string attribute from symbol.
NNVM_DLL int NNSymbolListInputVariables(SymbolHandle symbol, int option, nn_uint *out_size, SymbolHandle **out_sym_array)
List inputs variables in the symbol.
void * OpHandle
handle to a function that takes param and creates symbol
Definition: c_api.h:44