mxnet 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+13/−1 lines, 2 files
Files
- mxnet.cabal +1/−1
- src/MXNet/Core/Base/Internal/Raw.chs +12/−0
mxnet.cabal view
@@ -1,5 +1,5 @@ name: mxnet-version: 0.1.0.0+version: 0.1.0.1 synopsis: MXNet interface in Haskell. description: MXNet interface in Haskell via CFFI. homepage: http://github.com/sighingnow/mxnet-haskell#readme
src/MXNet/Core/Base/Internal/Raw.chs view
@@ -857,15 +857,27 @@ , alloca- `NDArrayHandle' peek* -- ^ Handle to the underlying data NDArray. } -> `Int' #} +#ifdef mingw32_HOST_OS {#fun MXDataIterGetIndex as mxDataIterGetIndexImpl { id `DataIterHandle' -- ^ The handle pointer to the data iterator. , alloca- `Ptr CULLong' peek* -- ^ The output indices. , alloca- `CULLong' peekIntegral* -- ^ Size of output array. } -> `Int' #}+#else+{#fun MXDataIterGetIndex as mxDataIterGetIndexImpl+ { id `DataIterHandle' -- ^ The handle pointer to the data iterator.+ , alloca- `Ptr CULong' peek* -- ^ The output indices.+ , alloca- `CULong' peekIntegral* -- ^ Size of output array.+ } -> `Int' #}+#endif -- | Get the image index by array. mxDataIterGetIndex :: DataIterHandle -- ^ The handle pointer to the data iterator.+#ifdef mingw32_HOST_OS -> IO (Int, [CULLong]) -- ^ Output indices of the array.+#else+ -> IO (Int, [CULong]) -- ^ Output indices of the array.+#endif mxDataIterGetIndex creator = do (res, p, c) <- mxDataIterGetIndexImpl creator indices <- peekArray (fromIntegral c) p