AI-MXNetCAPI
view release on metacpan or search on metacpan
%module "AI::MXNetCAPI"
%rename("%(strip:[MX])s") "";
%include typemaps.i
%include mxnet_typemaps.i
%inline %{
#include <c_api.h>
// Taken as is from http://cpansearch.perl.org/src/COLEMINOR/Games-EternalLands-Binary-Float16-0.01/Float16.xs
/* This method is faster than the OpenEXR implementation (very often
* used, eg. in Ogre), with the additional benefit of rounding, inspired
* by James Tursa's half-precision code. */
static inline uint16_t _float_to_half(uint32_t x) {
XPUSHs(SWIG_NewPointerObj(SWIG_as_voidptr(handle), SWIGTYPE_p_MXNDArray, 0));
PUTBACK;
call_sv((SV*)callback, G_DISCARD);
}
}
%}
%init %{
/* These SWIG_TypeClientData() calls might break in the future, but
* %rename should work on these types before that happens. */
SWIG_TypeClientData(SWIGTYPE_p_MXNDArray, (void *)"NDArrayHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXFunction, (void *)"FunctionHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXAtomicSymbolCreator, (void *)"AtomicSymbolCreator");
SWIG_TypeClientData(SWIGTYPE_p_MXSymbol, (void *)"SymbolHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXExecutor, (void *)"ExecutorHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXDataIterCreator, (void *)"DataIterCreator");
SWIG_TypeClientData(SWIGTYPE_p_MXDataIter, (void *)"DataIterHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXKVStore, (void *)"KVStoreHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXRecordIO, (void *)"RecordIOHandle");
SWIG_TypeClientData(SWIGTYPE_p_MXRtc, (void *)"RtcHandle");
( run in 0.661 second using v1.01-cache-2.11-cpan-f29a10751f0 )