diff --git a/exe/Main.hs b/exe/Main.hs
new file mode 100644
--- /dev/null
+++ b/exe/Main.hs
@@ -0,0 +1,4 @@
+
+
+main :: IO ()
+main = putStrLn "all backpack requirements satisfied!"
diff --git a/hasktorch-signatures.cabal b/hasktorch-signatures.cabal
new file mode 100644
--- /dev/null
+++ b/hasktorch-signatures.cabal
@@ -0,0 +1,166 @@
+cabal-version: 2.2
+-- * * * * * * * * * * * * WARNING * * * * * * * * * * * *
+-- This file has been AUTO-GENERATED by dhall-to-cabal.
+--
+-- Do not edit it by hand, because your changes will be over-written!
+--
+-- Instead, edit the source Dhall file, namely
+-- 'signatures/hasktorch-signatures.dhall', and re-generate this file by running
+-- 'dhall-to-cabal -- signatures/hasktorch-signatures.dhall > hasktorch-signatures.cabal'.
+-- * * * * * * * * * * * * WARNING * * * * * * * * * * * *
+name: hasktorch-signatures
+version: 0.0.1.0
+license: BSD-3-Clause
+maintainer: Sam Stites <fnz@fgvgrf.vb>, Austin Huang <nhfgvau@nyhz.zvg.rqh> - cipher:ROT13
+author: Hasktorch dev team
+homepage: https://github.com/hasktorch/hasktorch#readme
+bug-reports: https://github.com/hasktorch/hasktorch/issues
+synopsis: Backpack signatures for Tensor operations
+description:
+    Backpack signature files to glue FFI backends to Hasktorch
+category: Tensors, Machine Learning, AI
+build-type: Simple
+
+source-repository head
+    type: git
+    location: https://github.com/hasktorch/hasktorch
+
+library
+    signatures: Torch.Sig.NN
+                Torch.Sig.Storage
+                Torch.Sig.Storage.Copy
+                Torch.Sig.Tensor
+                Torch.Sig.Tensor.Copy
+                Torch.Sig.Tensor.Index
+                Torch.Sig.Tensor.Masked
+                Torch.Sig.Tensor.Math
+                Torch.Sig.Tensor.Math.Blas
+                Torch.Sig.Tensor.Math.Compare
+                Torch.Sig.Tensor.Math.CompareT
+                Torch.Sig.Tensor.Math.Floating
+                Torch.Sig.Tensor.Math.Lapack
+                Torch.Sig.Tensor.Math.Pairwise
+                Torch.Sig.Tensor.Math.Pointwise
+                Torch.Sig.Tensor.Math.Pointwise.Floating
+                Torch.Sig.Tensor.Math.Pointwise.Signed
+                Torch.Sig.Tensor.Math.Reduce
+                Torch.Sig.Tensor.Math.Reduce.Floating
+                Torch.Sig.Tensor.Math.Scan
+                Torch.Sig.Tensor.Mode
+                Torch.Sig.Tensor.ScatterGather
+                Torch.Sig.Tensor.Sort
+                Torch.Sig.Tensor.TopK
+                Torch.Sig.Types.NN
+                Torch.Sig.Tensor.Random.TH
+                Torch.Sig.Tensor.Math.Random.TH
+                Torch.Sig.Tensor.Random.THC
+    hs-source-dirs: src
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures-types (==0.0.1 || >0.0.1) && <0.0.2
+
+library hasktorch-partial-floating
+    reexported-modules: Torch.Undefined.Tensor.Math.Random.TH,
+                        Torch.Undefined.Tensor.Random.TH,
+                        Torch.Undefined.Tensor.Random.THC
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-signatures-partial (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures-support (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures -any
+
+library hasktorch-partial-signed
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-signatures-partial (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures-support (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures -any
+    mixins: hasktorch-signatures requires (Torch.Sig.NN as Torch.Undefined.NN, Torch.Sig.Types.NN as Torch.Undefined.Types.NN, Torch.Sig.Tensor.Math.Blas as Torch.Undefined.Tensor.Math.Blas, Torch.Sig.Tensor.Math.Floating as Torch.Undefined.Tensor.Math.Floating, Torch.Sig.Tensor.Math.Lapack as Torch.Undefined.Tensor.Math.Lapack, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.Undefined.Tensor.Math.Pointwise.Floating, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.Undefined.Tensor.Math.Reduce.Floating, Torch.Sig.Tensor.Math.Random.TH as Torch.Undefined.Tensor.Math.Random.TH, Torch.Sig.Tensor.Random.TH as Torch.Undefined.Tensor.Random.TH, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Tensor.Random.THC)
+
+library hasktorch-partial-unsigned
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-signatures-partial (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures-support (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-signatures -any
+    mixins: hasktorch-signatures requires (Torch.Sig.NN as Torch.Undefined.NN, Torch.Sig.Types.NN as Torch.Undefined.Types.NN, Torch.Sig.Tensor.Math.Blas as Torch.Undefined.Tensor.Math.Blas, Torch.Sig.Tensor.Math.Floating as Torch.Undefined.Tensor.Math.Floating, Torch.Sig.Tensor.Math.Lapack as Torch.Undefined.Tensor.Math.Lapack, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.Undefined.Tensor.Math.Pointwise.Floating, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.Undefined.Tensor.Math.Reduce.Floating, Torch.Sig.Tensor.Math.Random.TH as Torch.Undefined.Tensor.Math.Random.TH, Torch.Sig.Tensor.Random.TH as Torch.Undefined.Tensor.Random.TH, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Tensor.Random.THC, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.Undefined.Tensor.Math.Pointwise.Signed)
+
+executable isdefinite-unsigned-th
+    main-is: Main.hs
+    hs-source-dirs: exe
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-ffi-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-partial-unsigned -any
+    mixins: hasktorch-partial-unsigned requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Byte, Torch.Sig.Storage as Torch.FFI.TH.Byte.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Byte.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Byte.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Byte.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Byte.TensorMath),
+            hasktorch-partial-unsigned requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Char, Torch.Sig.Storage as Torch.FFI.TH.Char.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Char.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Char.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Char.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Char.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Char.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Char.TensorMath)
+
+executable isdefinite-unsigned-thc
+    main-is: Main.hs
+    hs-source-dirs: exe
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-ffi-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-partial-unsigned -any
+    mixins: hasktorch-partial-unsigned requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Byte, Torch.Sig.Storage as Torch.FFI.THC.Byte.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Byte.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Byte.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Byte.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Byte.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Byte.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Byte.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Byte.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Byte.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Byte.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Byte.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Byte.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Byte.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Byte.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Byte.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Byte.TensorTopK),
+            hasktorch-partial-unsigned requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Char, Torch.Sig.Storage as Torch.FFI.THC.Char.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Char.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Char.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Char.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Char.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Char.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Char.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Char.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Char.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Char.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Char.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Char.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Char.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Char.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Char.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Char.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Char.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Char.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Char.TensorTopK)
+
+executable isdefinite-signed-th
+    main-is: Main.hs
+    hs-source-dirs: exe
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-ffi-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-partial-signed -any
+    mixins: hasktorch-partial-signed requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Short, Torch.Sig.Storage as Torch.FFI.TH.Short.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Short.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Short.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Short.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Short.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Short.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Short.TensorMath),
+            hasktorch-partial-signed requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Int, Torch.Sig.Storage as Torch.FFI.TH.Int.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Int.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Int.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Int.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Int.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Int.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Int.TensorMath),
+            hasktorch-partial-signed requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Long, Torch.Sig.Storage as Torch.FFI.TH.Long.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Long.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Long.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Long.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Long.TensorMath)
+
+executable isdefinite-signed-thc
+    main-is: Main.hs
+    hs-source-dirs: exe
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-ffi-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-partial-signed -any
+    mixins: hasktorch-partial-signed requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Short, Torch.Sig.Storage as Torch.FFI.THC.Short.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Short.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Short.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Short.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Short.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Short.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Short.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Short.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Short.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Short.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Short.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Short.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Short.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Short.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Short.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Short.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Short.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Short.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Short.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Short.TensorMathPointwise),
+            hasktorch-partial-signed requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Int, Torch.Sig.Storage as Torch.FFI.THC.Int.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Int.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Int.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Int.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Int.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Int.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Int.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Int.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Int.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Int.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Int.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Int.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Int.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Int.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Int.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Int.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Int.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Int.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Int.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Int.TensorMathPointwise),
+            hasktorch-partial-signed requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Long, Torch.Sig.Storage as Torch.FFI.THC.Long.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Long.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Long.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Long.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Long.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Long.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Long.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Long.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Long.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Long.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Long.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Long.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Long.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Long.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Long.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Long.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Long.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Long.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Long.TensorMathPointwise)
+
+executable isdefinite-floating-th
+    main-is: Main.hs
+    hs-source-dirs: exe
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-ffi-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-partial-floating -any
+    mixins: hasktorch-partial-floating (Torch.Undefined.Tensor.Random.THC as Torch.Undefined.Float.Tensor.Random.THC) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Float, Torch.Sig.Storage as Torch.FFI.TH.Float.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Float.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Float.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Float.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Float.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Float.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Floating as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Blas as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Lapack as Torch.FFI.TH.Float.TensorLapack, Torch.Sig.NN as Torch.FFI.TH.NN.Float, Torch.Sig.Types.NN as Torch.Types.TH, Torch.Sig.Tensor.Math.Random.TH as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Random.TH as Torch.FFI.TH.Float.TensorRandom, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Float.Tensor.Random.THC),
+            hasktorch-partial-floating (Torch.Undefined.Tensor.Random.THC as Torch.Undefined.Double.Tensor.Random.THC) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Double, Torch.Sig.Storage as Torch.FFI.TH.Double.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Double.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Double.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Double.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Double.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Double.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Floating as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Blas as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Lapack as Torch.FFI.TH.Double.TensorLapack, Torch.Sig.NN as Torch.FFI.TH.NN.Double, Torch.Sig.Types.NN as Torch.Types.TH, Torch.Sig.Tensor.Math.Random.TH as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Random.TH as Torch.FFI.TH.Double.TensorRandom, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Double.Tensor.Random.THC)
+
+executable isdefinite-floating-thc
+    main-is: Main.hs
+    hs-source-dirs: exe
+    default-language: Haskell2010
+    build-depends:
+        base (==4.7 || >4.7) && <5,
+        hasktorch-ffi-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-types-thc (==0.0.1 || >0.0.1) && <0.0.2,
+        hasktorch-partial-floating -any
+    mixins: hasktorch-partial-floating (Torch.Undefined.Tensor.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Random.TH, Torch.Undefined.Tensor.Math.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Double, Torch.Sig.Storage as Torch.FFI.THC.Double.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Double.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Double.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Double.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Double.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Double.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Double.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Double.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Double.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Double.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Double.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Double.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Double.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Double.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Double.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Double.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Double.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Double.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Double.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Double.TensorMathPointwise, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.FFI.THC.Double.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.FFI.THC.Double.TensorMathReduce, Torch.Sig.Tensor.Math.Floating as Torch.FFI.THC.Double.TensorMath, Torch.Sig.Tensor.Math.Blas as Torch.FFI.THC.Double.TensorMathBlas, Torch.Sig.Tensor.Math.Lapack as Torch.FFI.THC.Double.TensorMathMagma, Torch.Sig.NN as Torch.FFI.THC.NN.Double, Torch.Sig.Types.NN as Torch.Types.THC, Torch.Sig.Tensor.Math.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH, Torch.Sig.Tensor.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Random.TH, Torch.Sig.Tensor.Random.THC as Torch.FFI.THC.Double.TensorRandom)
+
diff --git a/src/Torch/Sig/NN.hsig b/src/Torch/Sig/NN.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/NN.hsig
@@ -0,0 +1,250 @@
+-------------------------------------------------------------------------------
+-- |
+-- Module    :  Torch.Sig.NN
+-- Copyright :  (c) Sam Stites 2017
+-- License   :  BSD3
+-- Maintainer:  sam@stites.io
+-- Stability :  experimental
+-- Portability: non-portable
+--
+-- Signatures for Torch's Neural Network libraries (THNN and THCUNN). These are
+-- mapped directly to FFI calls.
+-------------------------------------------------------------------------------
+signature Torch.Sig.NN where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.NN
+import Torch.Sig.Types.Global
+
+c_Abs_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Abs_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_AbsCriterion_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_AbsCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_BCECriterion_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> Ptr CTensor -> CBool -> IO ()
+c_BCECriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> Ptr CTensor -> CBool -> IO ()
+c_ELU_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> IO ()
+c_ELU_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_DistKLDivCriterion_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_DistKLDivCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_GatedLinear_updateOutput     :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_GatedLinear_updateGradInput  :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_HardTanh_updateOutput        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> IO ()
+c_HardTanh_updateGradInput     :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> IO ()
+c_Im2Col_updateOutput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_Im2Col_updateGradInput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_Col2Im_updateOutput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_Col2Im_updateGradInput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_L1Cost_updateOutput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_L1Cost_updateGradInput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_LeakyReLU_updateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> CBool -> IO ()
+c_LeakyReLU_updateGradInput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CBool -> IO ()
+c_GRUFused_updateOutput        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_GRUFused_updateGradInput     :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_LSTMFused_updateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_LSTMFused_updateGradInput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_LogSigmoid_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_LogSigmoid_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_LogSoftMax_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDim -> IO ()
+c_LogSoftMax_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDim -> IO ()
+c_MarginCriterion_updateOutput        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CDouble -> IO ()
+c_MarginCriterion_updateGradInput     :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CDouble -> IO ()
+c_SoftMarginCriterion_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_SoftMarginCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_MSECriterion_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_MSECriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_PReLU_updateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_PReLU_updateGradInput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_PReLU_accGradParameters  :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+c_RReLU_updateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> CBool -> Ptr CNNGenerator -> IO ()
+c_RReLU_updateGradInput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> CBool -> IO ()
+c_Sigmoid_updateOutput     :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Sigmoid_updateGradInput  :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_SmoothL1Criterion_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_SmoothL1Criterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_SoftMax_updateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDim -> IO ()
+c_SoftMax_updateGradInput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDim -> IO ()
+c_SoftPlus_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_SoftPlus_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_SoftShrink_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+c_SoftShrink_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+c_SparseLinear_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_SparseLinear_accGradParameters        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_SparseLinear_zeroGradParameters       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_SparseLinear_updateParameters         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+c_SparseLinear_legacyUpdateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_SparseLinear_legacyAccGradParameters  :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_Sqrt_updateOutput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+c_Sqrt_updateGradInput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Square_updateOutput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Square_updateGradInput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Tanh_updateOutput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Tanh_updateGradInput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_Threshold_updateOutput    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> IO ()
+c_Threshold_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> CBool -> IO ()
+c_TemporalConvolution_updateOutput                   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_TemporalConvolution_updateGradInput                :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_TemporalConvolution_accGradParameters              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CDouble -> IO ()
+c_TemporalRowConvolution_updateOutput                :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CBool -> IO ()
+c_TemporalRowConvolution_updateGradInput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CBool -> IO ()
+c_TemporalRowConvolution_accGradParameters           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CBool -> CDouble -> IO ()
+c_TemporalUpSamplingNearest_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_TemporalUpSamplingNearest_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_TemporalUpSamplingLinear_updateOutput              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_TemporalUpSamplingLinear_updateGradInput           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_BatchNormalization_updateOutput                    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CDouble -> CDouble -> IO ()
+c_BatchNormalization_backward                        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CDouble -> CDouble -> IO ()
+c_SpatialConvolutionMM_updateOutput                  :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialConvolutionMM_updateGradInput               :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialConvolutionMM_accGradParameters             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_SpatialConvolutionLocal_updateOutput               :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_SpatialConvolutionLocal_updateGradInput            :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_SpatialConvolutionLocal_accGradParameters          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CLLong -> CLLong -> CLLong -> CLLong -> CDouble -> IO ()
+c_SpatialAdaptiveAveragePooling_updateOutput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_SpatialAdaptiveAveragePooling_updateGradInput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_SpatialAveragePooling_updateOutput                 :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> CBool -> IO ()
+c_SpatialAveragePooling_updateGradInput              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> CBool -> IO ()
+c_SpatialFullConvolution_updateOutput                :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialFullConvolution_updateGradInput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialFullConvolution_accGradParameters           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_SpatialDilatedConvolution_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialDilatedConvolution_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialDilatedConvolution_accGradParameters        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_SpatialFullDilatedConvolution_updateOutput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialFullDilatedConvolution_updateGradInput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialFullDilatedConvolution_accGradParameters    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_SpatialSubSampling_updateOutput                    :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialSubSampling_updateGradInput                 :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialSubSampling_accGradParameters               :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_SpatialUpSamplingNearest_updateOutput              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_SpatialUpSamplingNearest_updateGradInput           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_SpatialUpSamplingBilinear_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_SpatialUpSamplingBilinear_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialGridSamplerBilinear_updateOutput            :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_SpatialGridSamplerBilinear_updateGradInput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_VolumetricGridSamplerBilinear_updateOutput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_VolumetricGridSamplerBilinear_updateGradInput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_VolumetricAveragePooling_updateOutput              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> CBool -> IO ()
+c_VolumetricAveragePooling_updateGradInput           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> CBool -> IO ()
+c_VolumetricConvolution_updateOutput                 :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricConvolution_updateGradInput              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricConvolution_accGradParameters            :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_VolumetricFullConvolution_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricFullConvolution_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricFullConvolution_accGradParameters        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_VolumetricDilatedConvolution_updateOutput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricDilatedConvolution_updateGradInput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricDilatedConvolution_accGradParameters     :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_VolumetricFullDilatedConvolution_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricFullDilatedConvolution_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricFullDilatedConvolution_accGradParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+c_VolumetricAdaptiveAveragePooling_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricAdaptiveAveragePooling_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_SpatialReflectionPadding_updateOutput              :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialReflectionPadding_updateGradInput           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialReplicationPadding_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_SpatialReplicationPadding_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_FeatureLPPooling_updateOutput                      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> CInt -> CInt -> CBool -> IO ()
+c_FeatureLPPooling_updateGradInput                   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CInt -> CInt -> CBool -> IO ()
+c_VolumetricReplicationPadding_updateOutput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricReplicationPadding_updateGradInput       :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricUpSamplingNearest_updateOutput           :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_VolumetricUpSamplingNearest_updateGradInput        :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_VolumetricUpSamplingTrilinear_updateOutput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricUpSamplingTrilinear_updateGradInput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_TemporalReflectionPadding_updateOutput             :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_TemporalReflectionPadding_updateGradInput          :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_TemporalReplicationPadding_updateOutput            :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_TemporalReplicationPadding_updateGradInput         :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+
+
+c_ClassNLLCriterion_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CBool -> Ptr CTensor -> Ptr CTensor -> CLLong -> CBool -> IO ()
+c_ClassNLLCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> Ptr CTensor -> Ptr CTensor -> CLLong -> CBool -> IO ()
+c_SpatialClassNLLCriterion_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CBool -> Ptr CTensor -> Ptr CTensor -> CLLong -> CBool -> IO ()
+c_SpatialClassNLLCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> Ptr CTensor -> Ptr CTensor -> CLLong -> CBool -> IO ()
+c_MultiLabelMarginCriterion_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_MultiLabelMarginCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CBool -> IO ()
+c_MultiMarginCriterion_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CBool -> CInt -> Ptr CTensor -> CDouble -> CBool -> IO ()
+c_MultiMarginCriterion_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> CBool -> CInt -> Ptr CTensor -> CDouble -> CBool -> IO ()
+
+c_IndexLinear_updateOutput :: Ptr CNNState -> Ptr CIndexTensor -> CLLong -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_IndexLinear_accGradParameters :: Ptr CNNState -> Ptr CIndexTensor -> CLLong -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_IndexLinear_accUpdateGradParameters :: Ptr CNNState -> Ptr CIndexTensor -> CLLong -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+c_IndexLinear_updateParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> CLLong -> CDouble -> CDouble -> IO ()
+
+c_TemporalMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> IO ()
+c_TemporalMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> IO ()
+
+
+c_SpatialAdaptiveMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> IO ()
+c_SpatialAdaptiveMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> IO ()
+
+c_SpatialFractionalMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+c_SpatialFractionalMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> Ptr CIndexTensor -> IO ()
+
+
+c_SpatialMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+c_SpatialMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+
+c_SpatialDilatedMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+c_SpatialDilatedMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+
+c_SpatialMaxUnpooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> IO ()
+c_SpatialMaxUnpooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> IO ()
+
+c_VolumetricFractionalMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+c_VolumetricFractionalMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> Ptr CIndexTensor -> IO ()
+
+c_VolumetricMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+c_VolumetricMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+
+c_VolumetricDilatedMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+c_VolumetricDilatedMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CBool -> IO ()
+
+c_VolumetricMaxUnpooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricMaxUnpooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+
+c_VolumetricAdaptiveMaxPooling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> CInt -> CInt -> CInt -> IO ()
+c_VolumetricAdaptiveMaxPooling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> IO ()
+
+-- c_LookupTable_accGradParameters
+--   :: Ptr CNNState
+--   -> Ptr CIndexTensor
+--   -> Ptr CTensor
+--   -> Ptr CTensor
+--   -> Ptr CIndexTensor
+--   -> Ptr CIndexTensor   <<<< this is CTensor in THNN
+--   -> Ptr CIndexTensor
+--   -> CBool
+--   -> CInt
+--   -> CDouble
+--   -> IO ()
+c_LookupTable_renorm :: Ptr CNNState -> Ptr CIndexTensor -> Ptr CTensor -> CDouble -> CDouble -> IO ()
+
+{- THCUNN parsed:
+c_LookupTableBag_updateOutput :: Ptr CState -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CDoubleTensor -> Ptr CDoubleTensor -> Ptr CIndexTensor -> CInt -> Ptr CIndexTensor -> IO ()
+
+c_LookupTableBag_accGradParameters :: Ptr CState -> Ptr CIndexTensor -> Ptr CDoubleTensor -> Ptr CDoubleTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CIndexTensor -> CBool -> CInt -> Ptr CIndexTensor -> CDouble -> IO ()
+-}
+
+
+-- * THNN only
+-- c_unfolded_acc  :: Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+-- c_unfolded_copy :: Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+-- c_VolumetricConvolutionMM_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+-- c_VolumetricConvolutionMM_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO ()
+-- c_VolumetricConvolutionMM_accGradParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+-- c_TemporalSubSampling_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+-- c_TemporalSubSampling_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+-- c_TemporalSubSampling_accGradParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CDouble -> IO ()
+-- c_SpatialFullConvolutionMap_updateOutput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+-- c_SpatialFullConvolutionMap_updateGradInput :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> IO ()
+-- c_SpatialFullConvolutionMap_accGradParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> CInt -> CDouble -> IO ()
+-- c_HardShrink_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+-- c_HardShrink_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+-- c_Linear_updateOutput      :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+-- c_Linear_updateGradInput   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+-- c_Linear_accGradParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
+-- c_SparseLinear_legacyZeroGradParameters :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+-- c_SparseLinear_legacyUpdateParameters   :: Ptr CNNState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CDouble -> IO ()
diff --git a/src/Torch/Sig/Storage.hsig b/src/Torch/Sig/Storage.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Storage.hsig
@@ -0,0 +1,34 @@
+signature Torch.Sig.Storage where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_data                    :: Ptr CState -> Ptr CStorage -> IO (Ptr CReal)
+c_size                    :: Ptr CState -> Ptr CStorage -> IO CPtrdiff
+c_set                     :: Ptr CState -> Ptr CStorage -> CPtrdiff -> CReal -> IO ()
+c_get                     :: Ptr CState -> Ptr CStorage -> CPtrdiff -> IO CReal
+c_new                     :: Ptr CState -> IO (Ptr CStorage)
+c_newWithSize             :: Ptr CState -> CPtrdiff -> IO (Ptr CStorage)
+c_newWithSize1            :: Ptr CState -> CReal -> IO (Ptr CStorage)
+c_newWithSize2            :: Ptr CState -> CReal -> CReal -> IO (Ptr CStorage)
+c_newWithSize3            :: Ptr CState -> CReal -> CReal -> CReal -> IO (Ptr CStorage)
+c_newWithSize4            :: Ptr CState -> CReal -> CReal -> CReal -> CReal -> IO (Ptr CStorage)
+c_newWithMapping          :: Ptr CState -> Ptr CChar -> CPtrdiff -> CInt -> IO (Ptr CStorage)
+c_newWithData             :: Ptr CState -> Ptr CReal -> CPtrdiff -> IO (Ptr CStorage)
+c_setFlag                 :: Ptr CState -> Ptr CStorage -> CChar -> IO ()
+c_clearFlag               :: Ptr CState -> Ptr CStorage -> CChar -> IO ()
+c_retain                  :: Ptr CState -> Ptr CStorage -> IO ()
+c_free                    :: Ptr CState -> Ptr CStorage -> IO ()
+c_resize                  :: Ptr CState -> Ptr CStorage -> CPtrdiff -> IO ()
+c_fill                    :: Ptr CState -> Ptr CStorage -> CReal -> IO ()
+
+-- * TH
+-- c_swap                    :: Ptr CState -> Ptr CStorage -> Ptr CStorage -> IO ()
+-- c_newWithAllocator        :: Ptr CState -> CPtrdiff -> Ptr CAllocator -> Ptr () -> IO (Ptr CStorage)
+-- c_newWithDataAndAllocator :: Ptr CState -> Ptr CReal -> CPtrdiff -> Ptr CAllocator -> Ptr () -> IO (Ptr CStorage)
+
+-- * THC
+-- c_getDevice :: Ptr CState -> Ptr CStorage -> IO CInt
+
diff --git a/src/Torch/Sig/Storage/Copy.hsig b/src/Torch/Sig/Storage/Copy.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Storage/Copy.hsig
@@ -0,0 +1,24 @@
+signature Torch.Sig.Storage.Copy where
+
+import Torch.Types.TH hiding (CState)
+import Foreign
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_rawCopy    :: Ptr CState -> Ptr CStorage -> Ptr CReal -> IO ()
+c_copy       :: Ptr CState -> Ptr CStorage -> Ptr CStorage -> IO ()
+c_copyByte   :: Ptr CState -> Ptr CStorage -> Ptr C'THByteStorage -> IO ()
+c_copyChar   :: Ptr CState -> Ptr CStorage -> Ptr C'THCharStorage -> IO ()
+c_copyShort  :: Ptr CState -> Ptr CStorage -> Ptr C'THShortStorage -> IO ()
+c_copyInt    :: Ptr CState -> Ptr CStorage -> Ptr C'THIntStorage -> IO ()
+c_copyLong   :: Ptr CState -> Ptr CStorage -> Ptr C'THLongStorage -> IO ()
+c_copyFloat  :: Ptr CState -> Ptr CStorage -> Ptr C'THFloatStorage -> IO ()
+c_copyDouble :: Ptr CState -> Ptr CStorage -> Ptr C'THDoubleStorage -> IO ()
+c_copyHalf   :: Ptr CState -> Ptr CStorage -> Ptr C'THHalfStorage -> IO ()
+
+-- * THC
+-- c_thCopyCuda :: Ptr C'THCState -> Ptr C'THByteStorage -> Ptr C'THCByteStorage -> IO ()
+-- c_copyCuda :: Ptr C'THCState -> Ptr C'THCByteStorage -> Ptr C'THCByteStorage -> IO ()
+-- c_copyCPU :: Ptr C'THCState -> Ptr C'THCByteStorage -> Ptr C'THByteStorage -> IO ()
+
+
diff --git a/src/Torch/Sig/Tensor.hsig b/src/Torch/Sig/Tensor.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor.hsig
@@ -0,0 +1,82 @@
+signature Torch.Sig.Tensor where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Types.TH.Structs
+import Torch.Sig.Types.Global
+
+c_clearFlag :: Ptr CState -> Ptr CTensor -> CChar -> IO ()
+c_data :: Ptr CState -> Ptr CTensor -> IO (Ptr CReal)
+c_free :: Ptr CState -> Ptr CTensor -> IO ()
+c_freeCopyTo :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_get1d :: Ptr CState -> Ptr CTensor -> CLLong -> IO CReal
+c_get2d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> IO CReal
+c_get3d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> IO CReal
+c_get4d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> CLLong -> IO CReal
+c_isContiguous :: Ptr CState -> Ptr CTensor -> IO CInt
+c_isSameSizeAs :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO CInt
+c_isSetTo :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO CInt
+c_isSize :: Ptr CState -> Ptr CTensor -> Ptr C'THLongStorage -> IO CInt
+c_newExpand :: Ptr CState -> Ptr CTensor -> Ptr C'THLongStorage -> IO (Ptr CTensor)
+c_expand :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr C'THLongStorage -> IO ()
+c_expandNd :: Ptr CState -> Ptr (Ptr CTensor) -> Ptr (Ptr CTensor) -> CInt -> IO ()
+c_nDimension :: Ptr CState -> Ptr CTensor -> IO CInt
+c_nElement :: Ptr CState -> Ptr CTensor -> IO CPtrdiff
+c_narrow :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CLLong -> CLLong -> IO ()
+c_new :: Ptr CState -> IO (Ptr CTensor)
+c_newClone :: Ptr CState -> Ptr CTensor -> IO (Ptr CTensor)
+c_newContiguous :: Ptr CState -> Ptr CTensor -> IO (Ptr CTensor)
+c_newNarrow :: Ptr CState -> Ptr CTensor -> CInt -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newSelect :: Ptr CState -> Ptr CTensor -> CInt -> CLLong -> IO (Ptr CTensor)
+c_newSizeOf :: Ptr CState -> Ptr CTensor -> IO (Ptr C'THLongStorage)
+c_newStrideOf :: Ptr CState -> Ptr CTensor -> IO (Ptr C'THLongStorage)
+c_newTranspose :: Ptr CState -> Ptr CTensor -> CInt -> CInt -> IO (Ptr CTensor)
+c_newUnfold :: Ptr CState -> Ptr CTensor -> CInt -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newView :: Ptr CState -> Ptr CTensor -> Ptr C'THLongStorage -> IO (Ptr CTensor)
+c_newWithSize :: Ptr CState -> Ptr C'THLongStorage -> Ptr C'THLongStorage -> IO (Ptr CTensor)
+c_newWithSize1d :: Ptr CState -> CLLong -> IO (Ptr CTensor)
+c_newWithSize2d :: Ptr CState -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithSize3d :: Ptr CState -> CLLong -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithSize4d :: Ptr CState -> CLLong -> CLLong -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithStorage :: Ptr CState -> Ptr CStorage -> CPtrdiff -> Ptr C'THLongStorage -> Ptr C'THLongStorage -> IO (Ptr CTensor)
+c_newWithStorage1d :: Ptr CState -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithStorage2d :: Ptr CState -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithStorage3d :: Ptr CState -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithStorage4d :: Ptr CState -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> IO (Ptr CTensor)
+c_newWithTensor :: Ptr CState -> Ptr CTensor -> IO (Ptr CTensor)
+c_resize :: Ptr CState -> Ptr CTensor -> Ptr C'THLongStorage -> Ptr C'THLongStorage -> IO ()
+c_resize1d :: Ptr CState -> Ptr CTensor -> CLLong -> IO ()
+c_resize2d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> IO ()
+c_resize3d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> IO ()
+c_resize4d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_resize5d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_resizeAs :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_resizeNd :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CLLong -> Ptr CLLong -> IO ()
+c_retain :: Ptr CState -> Ptr CTensor -> IO ()
+c_select :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CLLong -> IO ()
+c_set :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_set1d :: Ptr CState -> Ptr CTensor -> CLLong -> CReal -> IO ()
+c_set2d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CReal -> IO ()
+c_set3d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> CReal -> IO ()
+c_set4d :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> CLLong -> CLLong -> CReal -> IO ()
+c_setFlag :: Ptr CState -> Ptr CTensor -> CChar -> IO ()
+c_setStorage :: Ptr CState -> Ptr CTensor -> Ptr CStorage -> CPtrdiff -> Ptr C'THLongStorage -> Ptr C'THLongStorage -> IO ()
+c_setStorage1d :: Ptr CState -> Ptr CTensor -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> IO ()
+c_setStorage2d :: Ptr CState -> Ptr CTensor -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_setStorage3d :: Ptr CState -> Ptr CTensor -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_setStorage4d :: Ptr CState -> Ptr CTensor -> Ptr CStorage -> CPtrdiff -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> CLLong -> IO ()
+c_setStorageNd :: Ptr CState -> Ptr CTensor -> Ptr CStorage -> CPtrdiff -> CInt -> Ptr CLLong -> Ptr CLLong -> IO ()
+c_size :: Ptr CState -> Ptr CTensor -> CInt -> IO CLLong
+c_sizeDesc :: Ptr CState -> Ptr CTensor -> IO (Ptr CDescBuff)
+c_squeeze :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_squeeze1d :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_storage :: Ptr CState -> Ptr CTensor -> IO (Ptr CStorage)
+c_storageOffset :: Ptr CState -> Ptr CTensor -> IO CPtrdiff
+c_stride :: Ptr CState -> Ptr CTensor -> CInt -> IO CLLong
+c_transpose :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_unfold :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CLLong -> CLLong -> IO ()
+c_unsqueeze1d :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+
+-- * TH only
+-- c_desc :: Ptr CState -> Ptr CTensor -> IO CDescBuff
diff --git a/src/Torch/Sig/Tensor/Copy.hsig b/src/Torch/Sig/Tensor/Copy.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Copy.hsig
@@ -0,0 +1,31 @@
+signature Torch.Sig.Tensor.Copy where
+
+import Foreign
+import Torch.Sig.Types
+import Torch.Types.TH hiding (CState)
+import Torch.Sig.Types.Global
+
+c_copy       :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_copyByte   :: Ptr CState -> Ptr CTensor -> Ptr C'THByteTensor -> IO ()
+c_copyChar   :: Ptr CState -> Ptr CTensor -> Ptr C'THCharTensor -> IO ()
+c_copyShort  :: Ptr CState -> Ptr CTensor -> Ptr C'THShortTensor -> IO ()
+c_copyInt    :: Ptr CState -> Ptr CTensor -> Ptr C'THIntTensor -> IO ()
+c_copyLong   :: Ptr CState -> Ptr CTensor -> Ptr C'THLongTensor -> IO ()
+c_copyFloat  :: Ptr CState -> Ptr CTensor -> Ptr C'THFloatTensor -> IO ()
+c_copyDouble :: Ptr CState -> Ptr CTensor -> Ptr C'THDoubleTensor -> IO ()
+c_copyHalf   :: Ptr CState -> Ptr CTensor -> Ptr C'THHalfTensor -> IO ()
+
+-- * THC
+-- c_copyIgnoringOverlaps :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaByteTensor -> IO ()
+-- c_copyCudaByte :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaByteTensor -> IO ()
+-- c_copyCudaChar :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaCharTensor -> IO ()
+-- c_copyCudaShort :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaShortTensor -> IO ()
+-- c_copyCudaInt :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaIntTensor -> IO ()
+-- c_copyCudaLong :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaLongTensor -> IO ()
+-- c_copyCudaDouble :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaDoubleTensor -> IO ()
+-- c_copyCuda :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THCudaByteTensor -> IO ()
+-- c_thCopyCuda :: Ptr C'THCState -> Ptr C'THByteTensor -> Ptr C'THCudaByteTensor -> IO ()
+-- c_copyCPU :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THByteTensor -> IO ()
+-- c_copyAsyncCPU :: Ptr C'THCState -> Ptr C'THCudaByteTensor -> Ptr C'THByteTensor -> IO ()
+-- c_thCopyAsyncCuda :: Ptr C'THCState -> Ptr C'THByteTensor -> Ptr C'THCudaByteTensor -> IO ()
+
diff --git a/src/Torch/Sig/Tensor/Index.hsig b/src/Torch/Sig/Tensor/Index.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Index.hsig
@@ -0,0 +1,18 @@
+signature Torch.Sig.Tensor.Index where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_indexCopy :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO (())
+c_indexAdd :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO (())
+c_indexFill :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> CReal -> IO (())
+c_indexSelect :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> IO (())
+c_take :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CIndexTensor -> IO (())
+c_put :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> IO (())
+-- c_indexCopy_long :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO (())
+-- c_indexAdd_long :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO (())
+-- c_indexFill_long :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> CUChar -> IO (())
+-- c_indexSelect_long :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> IO (())
+-- c_calculateAdvancedIndexingOffsets :: Ptr CState -> Ptr CIndexTensor -> Ptr CTensor -> CPtrdiff -> Ptr (Ptr CIndexTensor) -> IO (())
diff --git a/src/Torch/Sig/Tensor/Masked.hsig b/src/Torch/Sig/Tensor/Masked.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Masked.hsig
@@ -0,0 +1,16 @@
+signature Torch.Sig.Tensor.Masked where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_maskedFill   :: Ptr CState -> Ptr CTensor -> Ptr CMaskTensor -> CReal -> IO ()
+c_maskedCopy   :: Ptr CState -> Ptr CTensor -> Ptr CMaskTensor -> Ptr CTensor -> IO ()
+c_maskedSelect :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CMaskTensor -> IO ()
+
+-- * THC
+-- c_maskedFillByte   :: Ptr CState -> Ptr CTensor -> Ptr C'THByteTensor -> CReal -> IO ()
+-- c_maskedCopyByte   :: Ptr CState -> Ptr CTensor -> Ptr C'THByteTensor -> Ptr CTensor -> IO ()
+-- c_maskedSelectByte :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr C'THByteTensor -> IO ()
+
diff --git a/src/Torch/Sig/Tensor/Math.hsig b/src/Torch/Sig/Tensor/Math.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math.hsig
@@ -0,0 +1,34 @@
+signature Torch.Sig.Tensor.Math where
+
+import Torch.Types.TH.Structs
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_fill :: Ptr CState -> Ptr CTensor -> CReal -> IO ()
+c_zero :: Ptr CState -> Ptr CTensor -> IO ()
+c_zeros :: Ptr CState -> Ptr CTensor -> Ptr C'THLongStorage -> IO ()
+c_zerosLike :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_ones :: Ptr CState -> Ptr CTensor -> Ptr C'THLongStorage -> IO ()
+c_onesLike :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_reshape :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr C'THLongStorage -> IO ()
+c_numel :: Ptr CState -> Ptr CTensor -> IO CPtrdiff
+c_cat :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_catArray :: Ptr CState -> Ptr CTensor -> Ptr (Ptr CTensor) -> CInt -> CInt -> IO ()
+c_nonzero :: Ptr CState -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+c_tril :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CLLong -> IO ()
+c_triu :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CLLong -> IO ()
+c_diag :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt' -> IO ()
+c_eye :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> IO ()
+c_trace :: Ptr CState -> Ptr CTensor -> IO CAccReal
+c_range :: Ptr CState -> Ptr CTensor -> CAccReal -> CAccReal -> CAccReal -> IO ()
+c_arange :: Ptr CState -> Ptr CTensor -> CAccReal -> CAccReal -> CAccReal -> IO ()
+
+-- TH only, unaccounted for:
+-- c_match        :: Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+-- c_kthvalue     :: Ptr CTensor -> Ptr C'THLongTensor -> Ptr CTensor -> CLLong -> CInt -> CInt -> IO ()
+-- c_randperm     :: Ptr CTensor -> Ptr C'THGenerator -> CLLong -> IO ()
+
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Blas.hsig b/src/Torch/Sig/Tensor/Math/Blas.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Blas.hsig
@@ -0,0 +1,18 @@
+signature Torch.Sig.Tensor.Math.Blas where
+
+import Foreign
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_dot     :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO CAccReal
+c_addmv   :: Ptr CState -> Ptr CTensor -> CReal -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_addmm   :: Ptr CState -> Ptr CTensor -> CReal -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_addr    :: Ptr CState -> Ptr CTensor -> CReal -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_addbmm  :: Ptr CState -> Ptr CTensor -> CReal -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_baddbmm :: Ptr CState -> Ptr CTensor -> CReal -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+
+-- * THC Float Blas, TH Float Lapack
+-- c_btrifact :: Ptr CState -> Ptr CTensor -> Ptr CIntTensor -> Ptr CIntTensor -> CInt -> Ptr CTensor -> IO ()
+-- c_btrisolve :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CIntTensor -> IO ()
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Compare.hsig b/src/Torch/Sig/Tensor/Math/Compare.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Compare.hsig
@@ -0,0 +1,19 @@
+signature Torch.Sig.Tensor.Math.Compare where
+
+import Foreign
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_ltValue :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> CReal -> IO ()
+c_gtValue :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> CReal -> IO ()
+c_leValue :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> CReal -> IO ()
+c_geValue :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> CReal -> IO ()
+c_eqValue :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> CReal -> IO ()
+c_neValue :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> CReal -> IO ()
+
+c_ltValueT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_gtValueT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_leValueT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_geValueT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_eqValueT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_neValueT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
diff --git a/src/Torch/Sig/Tensor/Math/CompareT.hsig b/src/Torch/Sig/Tensor/Math/CompareT.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/CompareT.hsig
@@ -0,0 +1,20 @@
+signature Torch.Sig.Tensor.Math.CompareT where
+
+import Foreign
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_ltTensor :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_gtTensor :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_leTensor :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_geTensor :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_eqTensor :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_neTensor :: Ptr CState -> Ptr CMaskTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+
+c_ltTensorT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_gtTensorT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_leTensorT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_geTensorT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_eqTensorT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_neTensorT :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+
diff --git a/src/Torch/Sig/Tensor/Math/Floating.hsig b/src/Torch/Sig/Tensor/Math/Floating.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Floating.hsig
@@ -0,0 +1,11 @@
+signature Torch.Sig.Tensor.Math.Floating where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_linspace     :: Ptr CState -> Ptr CTensor -> CReal -> CReal -> CLLong -> IO ()
+c_logspace     :: Ptr CState -> Ptr CTensor -> CReal -> CReal -> CLLong -> IO ()
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Lapack.hsig b/src/Torch/Sig/Tensor/Math/Lapack.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Lapack.hsig
@@ -0,0 +1,27 @@
+signature Torch.Sig.Tensor.Math.Lapack where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_gesv :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_gels :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_syev :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> Ptr CChar -> IO ()
+c_geev :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> IO ()
+c_gesvd :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> IO ()
+c_gesvd2 :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> IO ()
+c_getri :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_potri :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> IO ()
+c_potrf :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> IO ()
+c_potrs :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> IO ()
+c_geqrf :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_qr :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+
+-- * TH
+-- c_trtrs     :: Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> Ptr CChar -> Ptr CChar -> IO ()
+-- c_orgqr     :: Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+-- c_ormqr     :: Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CChar -> Ptr CChar -> IO ()
+-- c_pstrf     :: Ptr CTensor -> Ptr CTHIntTensor -> Ptr CTensor -> Ptr CChar -> CReal -> IO ()
+-- c_btrifact  :: Ptr CTensor -> Ptr CTHIntTensor -> Ptr CTHIntTensor -> CInt -> Ptr CTensor -> IO ()
+-- c_btrisolve :: Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> Ptr CTHIntTensor -> IO ()
diff --git a/src/Torch/Sig/Tensor/Math/Pairwise.hsig b/src/Torch/Sig/Tensor/Math/Pairwise.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Pairwise.hsig
@@ -0,0 +1,23 @@
+signature Torch.Sig.Tensor.Math.Pairwise where
+
+import Foreign
+import Foreign.C.Types
+
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_add :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_sub :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_add_scaled :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CReal -> IO ()
+c_sub_scaled :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CReal -> IO ()
+c_mul :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_div :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_lshift :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_rshift :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_fmod :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_remainder :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_bitand :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_bitor :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_bitxor :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_equal :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO CInt
+
diff --git a/src/Torch/Sig/Tensor/Math/Pointwise.hsig b/src/Torch/Sig/Tensor/Math/Pointwise.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Pointwise.hsig
@@ -0,0 +1,35 @@
+signature Torch.Sig.Tensor.Math.Pointwise where
+
+import Foreign
+import Foreign.C.Types
+
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_cpow :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_sign :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_clamp :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CReal -> IO ()
+c_cross :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_cadd :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> Ptr CTensor -> IO ()
+c_csub :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> Ptr CTensor -> IO ()
+c_cmul :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cdiv :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_clshift :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_crshift :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cmax :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cmin :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cfmod :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cremainder :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cmaxValue :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_cminValue :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_cbitand :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cbitor :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cbitxor :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_addcmul :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_addcdiv :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> Ptr CTensor -> Ptr CTensor -> IO ()
+
+-- CPU ONLY:
+--   histc_        :: t -> t -> Int64 -> HsReal t -> HsReal t -> IO ()
+--   bhistc_       :: t -> t -> Int64 -> HsReal t -> HsReal t -> IO ()
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Pointwise/Floating.hsig b/src/Torch/Sig/Tensor/Math/Pointwise/Floating.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Pointwise/Floating.hsig
@@ -0,0 +1,47 @@
+signature Torch.Sig.Tensor.Math.Pointwise.Floating where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_cinv         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_sigmoid      :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_log          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_lgamma       :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_log1p        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_exp          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cos          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_acos         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_cosh         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_sin          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_asin         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_sinh         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_tan          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_atan         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_atan2        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_tanh         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_erf          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_erfinv       :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_pow          :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+c_tpow         :: Ptr CState -> Ptr CTensor -> CReal -> Ptr CTensor -> IO ()
+c_sqrt         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_rsqrt        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_ceil         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_floor        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_round        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_trunc        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_frac         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_lerp         :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> CReal -> IO ()
+
+
+{-
+c_rand         :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr CIndexStorage -> IO ()
+c_randn        :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr CIndexStorage -> IO ()
+-}
+
+{-
+UNKNOWN, but in TH
+-- c_histc        :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CLLong -> CReal -> CReal -> IO ()
+-- c_bhistc       :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CLLong -> CReal -> CReal -> IO ()
+-}
diff --git a/src/Torch/Sig/Tensor/Math/Pointwise/Signed.hsig b/src/Torch/Sig/Tensor/Math/Pointwise/Signed.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Pointwise/Signed.hsig
@@ -0,0 +1,11 @@
+signature Torch.Sig.Tensor.Math.Pointwise.Signed where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_neg :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_abs :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Random/TH.hsig b/src/Torch/Sig/Tensor/Math/Random/TH.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Random/TH.hsig
@@ -0,0 +1,13 @@
+signature Torch.Sig.Tensor.Math.Random.TH where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+import qualified Torch.Types.TH as TH
+
+c_randperm :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CLLong -> IO ()
+c_rand     :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr TH.CLongStorage -> IO ()
+c_randn    :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr TH.CLongStorage -> IO ()
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Reduce.hsig b/src/Torch/Sig/Tensor/Math/Reduce.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Reduce.hsig
@@ -0,0 +1,34 @@
+signature Torch.Sig.Tensor.Math.Reduce where
+
+import Foreign
+import Foreign.C.Types
+import Data.Word
+import Data.Int
+
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_sum :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_prod :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_min :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_max :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_minall :: Ptr CState -> Ptr CTensor -> IO CReal
+c_maxall :: Ptr CState -> Ptr CTensor -> IO CReal
+c_medianall :: Ptr CState -> Ptr CTensor -> IO CReal
+c_median :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_sumall :: Ptr CState -> Ptr CTensor -> IO CAccReal
+c_prodall :: Ptr CState -> Ptr CTensor -> IO CAccReal
+
+-- * not in THC.BYte
+-- c_renorm :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CInt -> CReal -> IO ()
+-- c_std :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+-- c_stdall :: Ptr CState -> Ptr CTensor -> CInt -> IO CReal
+-- c_var :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+-- c_varall :: Ptr CState -> Ptr CTensor -> CInt -> IO CReal
+-- c_dist :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO CReal
+
+-- * not in TH.Byte
+-- c_norm :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CInt -> CInt -> IO ()
+-- c_normall :: Ptr CState -> Ptr CTensor -> CReal -> IO CReal
+-- c_mean :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+-- c_meanall :: Ptr CState -> Ptr CTensor -> IO CReal
diff --git a/src/Torch/Sig/Tensor/Math/Reduce/Floating.hsig b/src/Torch/Sig/Tensor/Math/Reduce/Floating.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Reduce/Floating.hsig
@@ -0,0 +1,19 @@
+signature Torch.Sig.Tensor.Math.Reduce.Floating where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_dist :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> IO CAccReal
+c_var :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+c_varall :: Ptr CState -> Ptr CTensor -> CInt -> IO CAccReal
+c_std :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> CInt -> IO ()
+c_stdall :: Ptr CState -> Ptr CTensor -> CInt -> IO CAccReal
+c_renorm :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CInt -> CReal -> IO ()
+c_norm :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CReal -> CInt -> CInt -> IO ()
+c_normall :: Ptr CState -> Ptr CTensor -> CReal -> IO CAccReal
+c_mean  :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_meanall :: Ptr CState -> Ptr CTensor -> IO CAccReal
+
+
diff --git a/src/Torch/Sig/Tensor/Math/Scan.hsig b/src/Torch/Sig/Tensor/Math/Scan.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Math/Scan.hsig
@@ -0,0 +1,12 @@
+signature Torch.Sig.Tensor.Math.Scan where
+
+import Foreign
+import Foreign.C.Types
+import Data.Word
+import Data.Int
+
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_cumsum :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
+c_cumprod :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> IO ()
diff --git a/src/Torch/Sig/Tensor/Mode.hsig b/src/Torch/Sig/Tensor/Mode.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Mode.hsig
@@ -0,0 +1,9 @@
+signature Torch.Sig.Tensor.Mode where
+
+import Foreign
+import Foreign.C.Types
+
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_mode :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
diff --git a/src/Torch/Sig/Tensor/Random/TH.hsig b/src/Torch/Sig/Tensor/Random/TH.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Random/TH.hsig
@@ -0,0 +1,31 @@
+signature Torch.Sig.Tensor.Random.TH where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+import qualified Torch.Types.TH as TH
+
+
+c_random                :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> IO ()
+c_clampedRandom         :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CLLong -> CLLong -> IO ()
+c_cappedRandom          :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CLLong -> IO ()
+c_geometric             :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> IO ()
+c_bernoulli             :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> IO ()
+c_bernoulli_FloatTensor :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr TH.CFloatTensor -> IO ()
+c_bernoulli_DoubleTensor      :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr TH.CDoubleTensor -> IO ()
+
+c_uniform              :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> CAccReal -> IO ()
+c_normal               :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> CAccReal -> IO ()
+c_normal_means         :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr CTensor -> CAccReal -> IO ()
+c_normal_stddevs       :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> Ptr CTensor -> IO ()
+c_normal_means_stddevs :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_exponential          :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> IO ()
+c_standard_gamma       :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> Ptr CTensor -> IO ()
+c_cauchy               :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> CAccReal -> IO ()
+c_logNormal            :: Ptr CState -> Ptr CTensor -> Ptr CGenerator -> CAccReal -> CAccReal -> IO ()
+
+c_multinomial           :: Ptr CState -> Ptr CLongTensor -> Ptr CGenerator -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_multinomialAliasSetup :: Ptr CState -> Ptr CTensor -> Ptr CLongTensor -> Ptr CTensor -> IO ()
+c_multinomialAliasDraw  :: Ptr CState -> Ptr CLongTensor -> Ptr CGenerator -> Ptr CLongTensor -> Ptr CTensor -> IO ()
+
diff --git a/src/Torch/Sig/Tensor/Random/THC.hsig b/src/Torch/Sig/Tensor/Random/THC.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Random/THC.hsig
@@ -0,0 +1,31 @@
+signature Torch.Sig.Tensor.Random.THC where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+import qualified Torch.Types.TH as TH (CLongStorage)
+
+c_random :: Ptr CState -> Ptr CTensor -> IO ()
+c_clampedRandom :: Ptr CState -> Ptr CTensor -> CLLong -> CLLong -> IO ()
+c_cappedRandom :: Ptr CState -> Ptr CTensor -> CLLong -> IO ()
+c_bernoulli :: Ptr CState -> Ptr CTensor -> CAccReal -> IO ()
+c_bernoulli_DoubleTensor :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_geometric :: Ptr CState -> Ptr CTensor -> CAccReal -> IO ()
+
+c_uniform :: Ptr CState -> Ptr CTensor -> CAccReal -> CAccReal -> IO ()
+c_normal :: Ptr CState -> Ptr CTensor -> CAccReal -> CAccReal -> IO ()
+c_normal_means :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CAccReal -> IO ()
+c_normal_stddevs :: Ptr CState -> Ptr CTensor -> CAccReal -> Ptr CTensor -> IO ()
+c_normal_means_stddevs :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> Ptr CTensor -> IO ()
+c_logNormal :: Ptr CState -> Ptr CTensor -> CAccReal -> CAccReal -> IO ()
+c_exponential :: Ptr CState -> Ptr CTensor -> CAccReal -> IO ()
+c_cauchy :: Ptr CState -> Ptr CTensor -> CAccReal -> CAccReal -> IO ()
+
+c_multinomial :: Ptr CState -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+c_multinomialAliasSetup :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+c_multinomialAliasDraw :: Ptr CState -> Ptr CIndexTensor -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+
+c_rand :: Ptr CState -> Ptr CTensor -> Ptr TH.CLongStorage -> IO ()
+c_randn :: Ptr CState -> Ptr CTensor -> Ptr TH.CLongStorage -> IO ()
+
diff --git a/src/Torch/Sig/Tensor/ScatterGather.hsig b/src/Torch/Sig/Tensor/ScatterGather.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/ScatterGather.hsig
@@ -0,0 +1,13 @@
+signature Torch.Sig.Tensor.ScatterGather where
+
+import Foreign
+import Foreign.C.Types
+
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+import Torch.Types.TH hiding (CState, CIndexTensor)
+
+c_gather :: Ptr CState -> Ptr CTensor -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> IO ()
+c_scatter :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+c_scatterAdd :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> Ptr CTensor -> IO ()
+c_scatterFill :: Ptr CState -> Ptr CTensor -> CInt -> Ptr CIndexTensor -> CReal -> IO ()
diff --git a/src/Torch/Sig/Tensor/Sort.hsig b/src/Torch/Sig/Tensor/Sort.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/Sort.hsig
@@ -0,0 +1,11 @@
+signature Torch.Sig.Tensor.Sort where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_sort :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CInt -> CInt -> IO ()
+
+-- * THC only
+-- c_sortKeyValueInplace :: Ptr CState -> Ptr CMaskTensor -> Ptr CIndexTensor -> CInt -> CInt -> IO ()
diff --git a/src/Torch/Sig/Tensor/TopK.hsig b/src/Torch/Sig/Tensor/TopK.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Tensor/TopK.hsig
@@ -0,0 +1,18 @@
+-------------------------------------------------------------------------------
+-- |
+-- Module    :  Torch.Sig.Tensor.TopK
+-- Copyright :  (c) Sam Stites 2017
+-- License   :  BSD3
+-- Maintainer:  sam@stites.io
+-- Stability :  experimental
+-- Portability: non-portable
+-------------------------------------------------------------------------------
+signature Torch.Sig.Tensor.TopK where
+
+import Foreign
+import Foreign.C.Types
+import Torch.Sig.Types
+import Torch.Sig.Types.Global
+
+c_topk :: Ptr CState -> Ptr CTensor -> Ptr CIndexTensor -> Ptr CTensor -> CLLong -> CInt -> CInt -> CInt -> IO ()
+
diff --git a/src/Torch/Sig/Types/NN.hsig b/src/Torch/Sig/Types/NN.hsig
new file mode 100644
--- /dev/null
+++ b/src/Torch/Sig/Types/NN.hsig
@@ -0,0 +1,25 @@
+-------------------------------------------------------------------------------
+-- |
+-- Module    :  Torch.Sig.NN
+-- Copyright :  (c) Sam Stites 2017
+-- License   :  BSD3
+-- Maintainer:  sam@stites.io
+-- Stability :  experimental
+-- Portability: non-portable
+--
+-- Global types used in Torch's Neural Network libraries (THNN and THCUNN).
+--
+-- FIXME: most of these are aliases and can either be removed in favour of
+-- 'Torch.Sig.Global.Types' or, in the case of CDim, should be pushed upstream
+-- back into Torch itself.
+-------------------------------------------------------------------------------
+signature Torch.Sig.Types.NN where
+
+import Torch.Sig.Types.Global
+
+type CNNState = CState
+data CNNGenerator
+
+data CDim
+instance Integral CDim
+instance Num CDim
