AI-NNVMCAPI

 view release on metacpan or  search on metacpan

nnvm.i  view on Meta::CPAN

/*! \brief manually define unsigned int */
typedef unsigned int nn_uint;
/*! \brief handle to a function that takes param and creates symbol */
typedef NNOp *OpHandle;
/*! \brief handle to a symbol that can be bind as operator */
typedef NNSymbol *SymbolHandle;
/*! \brief handle to Graph */
typedef NNGraph *GraphHandle;
/*!
 * \brief Set the last error message needed by C API
 * \param msg The error message to set.
 */
void NNAPISetLastError(const char* msg);
/*!
 * \brief return str message of the last error
 *  all function in this file will return 0 when success
 *  and -1 when an error occured,
 *  NNGetLastError can be called to retrieve the error
 *
 *  this function is threadsafe and can be called by different thread
 *  \return error info

nnvm.i  view on Meta::CPAN

 */
int NNSymbolGetAttr(SymbolHandle in,
                             const char* key,
                             const char** out,
                             int *out);
/*!
 * \brief Set string attribute from symbol.
 *  NOTE: Setting attribute to a symbol can affect the semantics(mutable/immutable) of symbolic graph.
 *
 *  Safe recommendaton: use  immutable graph
 *  - Only allow set attributes during creation of new symbol as optional parameter
 *
 *  Mutable graph (be careful about the semantics):
 *  - Allow set attr at any point.
 *  - Mutating an attribute of some common node of two graphs can cause confusion from user.
 *
 * \param symbol the source symbol
 * \param num_param Number of parameters to set.
 * \param keys The keys of the attribute
 * \param values The value to be set
 * \return 0 when success, -1 when failure happens
 */
int NNSymbolSetAttrs(SymbolHandle in,
                              nn_uint num_param,
                              const char** keys,
                              const char** vals);
/*!
 * \brief Get all attributes from symbol, including all descendents.
 * \param symbol the source symbol
 * \param recursive_option 0 for recursive, 1 for shallow.



( run in 0.470 second using v1.01-cache-2.11-cpan-49f99fa48dc )