{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} module Torch.Internal.Managed.Type.StdArray where import Foreign.C.String import Foreign.C.Types import Foreign import Torch.Internal.Type import Torch.Internal.Class import Torch.Internal.Cast import Torch.Internal.Objects import qualified Torch.Internal.Unmanaged.Type.StdArray as Unmanaged newStdArrayBool2 :: IO (ForeignPtr (StdArray '(CBool,2))) newStdArrayBool2 :: IO (ForeignPtr (StdArray '(CBool, 2))) newStdArrayBool2 = forall a ca. Castable a ca => IO ca -> IO a _cast0 IO (Ptr (StdArray '(CBool, 2))) Unmanaged.newStdArrayBool2 newStdArrayBool2_bb :: CBool -> CBool -> IO (ForeignPtr (StdArray '(CBool,2))) newStdArrayBool2_bb :: CBool -> CBool -> IO (ForeignPtr (StdArray '(CBool, 2))) newStdArrayBool2_bb = forall a ca x1 cx1 y cy. (Castable a ca, Castable x1 cx1, Castable y cy) => (ca -> cx1 -> IO cy) -> a -> x1 -> IO y _cast2 CBool -> CBool -> IO (Ptr (StdArray '(CBool, 2))) Unmanaged.newStdArrayBool2_bb instance CppTuple2 (ForeignPtr (StdArray '(CBool,2))) where type A (ForeignPtr (StdArray '(CBool,2))) = CBool type B (ForeignPtr (StdArray '(CBool,2))) = CBool get0 :: ForeignPtr (StdArray '(CBool, 2)) -> IO (A (ForeignPtr (StdArray '(CBool, 2)))) get0 ForeignPtr (StdArray '(CBool, 2)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple2 m => m -> IO (A m) get0 :: Ptr (StdArray '(CBool,2)) -> IO CBool) ForeignPtr (StdArray '(CBool, 2)) v get1 :: ForeignPtr (StdArray '(CBool, 2)) -> IO (B (ForeignPtr (StdArray '(CBool, 2)))) get1 ForeignPtr (StdArray '(CBool, 2)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple2 m => m -> IO (B m) get1 :: Ptr (StdArray '(CBool,2)) -> IO CBool) ForeignPtr (StdArray '(CBool, 2)) v newStdArrayBool3 :: IO (ForeignPtr (StdArray '(CBool,3))) newStdArrayBool3 :: IO (ForeignPtr (StdArray '(CBool, 3))) newStdArrayBool3 = forall a ca. Castable a ca => IO ca -> IO a _cast0 IO (Ptr (StdArray '(CBool, 3))) Unmanaged.newStdArrayBool3 newStdArrayBool3_bbb :: CBool -> CBool -> CBool -> IO (ForeignPtr (StdArray '(CBool,3))) newStdArrayBool3_bbb :: CBool -> CBool -> CBool -> IO (ForeignPtr (StdArray '(CBool, 3))) newStdArrayBool3_bbb = forall a ca x1 cx1 x2 cx2 y cy. (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable y cy) => (ca -> cx1 -> cx2 -> IO cy) -> a -> x1 -> x2 -> IO y _cast3 CBool -> CBool -> CBool -> IO (Ptr (StdArray '(CBool, 3))) Unmanaged.newStdArrayBool3_bbb instance CppTuple2 (ForeignPtr (StdArray '(CBool,3))) where type A (ForeignPtr (StdArray '(CBool,3))) = CBool type B (ForeignPtr (StdArray '(CBool,3))) = CBool get0 :: ForeignPtr (StdArray '(CBool, 3)) -> IO (A (ForeignPtr (StdArray '(CBool, 3)))) get0 ForeignPtr (StdArray '(CBool, 3)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple2 m => m -> IO (A m) get0 :: Ptr (StdArray '(CBool,3)) -> IO CBool) ForeignPtr (StdArray '(CBool, 3)) v get1 :: ForeignPtr (StdArray '(CBool, 3)) -> IO (B (ForeignPtr (StdArray '(CBool, 3)))) get1 ForeignPtr (StdArray '(CBool, 3)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple2 m => m -> IO (B m) get1 :: Ptr (StdArray '(CBool,3)) -> IO CBool) ForeignPtr (StdArray '(CBool, 3)) v instance CppTuple3 (ForeignPtr (StdArray '(CBool,3))) where type C (ForeignPtr (StdArray '(CBool,3))) = CBool get2 :: ForeignPtr (StdArray '(CBool, 3)) -> IO (C (ForeignPtr (StdArray '(CBool, 3)))) get2 ForeignPtr (StdArray '(CBool, 3)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple3 m => m -> IO (C m) get2 :: Ptr (StdArray '(CBool,3)) -> IO CBool) ForeignPtr (StdArray '(CBool, 3)) v newStdArrayBool4 :: IO (ForeignPtr (StdArray '(CBool,4))) newStdArrayBool4 :: IO (ForeignPtr (StdArray '(CBool, 4))) newStdArrayBool4 = forall a ca. Castable a ca => IO ca -> IO a _cast0 IO (Ptr (StdArray '(CBool, 4))) Unmanaged.newStdArrayBool4 newStdArrayBool4_bbbb :: CBool -> CBool -> CBool -> CBool -> IO (ForeignPtr (StdArray '(CBool,4))) newStdArrayBool4_bbbb :: CBool -> CBool -> CBool -> CBool -> IO (ForeignPtr (StdArray '(CBool, 4))) newStdArrayBool4_bbbb = forall a ca x1 cx1 x2 cx2 x3 cx3 y cy. (Castable a ca, Castable x1 cx1, Castable x2 cx2, Castable x3 cx3, Castable y cy) => (ca -> cx1 -> cx2 -> cx3 -> IO cy) -> a -> x1 -> x2 -> x3 -> IO y _cast4 CBool -> CBool -> CBool -> CBool -> IO (Ptr (StdArray '(CBool, 4))) Unmanaged.newStdArrayBool4_bbbb instance CppTuple2 (ForeignPtr (StdArray '(CBool,4))) where type A (ForeignPtr (StdArray '(CBool,4))) = CBool type B (ForeignPtr (StdArray '(CBool,4))) = CBool get0 :: ForeignPtr (StdArray '(CBool, 4)) -> IO (A (ForeignPtr (StdArray '(CBool, 4)))) get0 ForeignPtr (StdArray '(CBool, 4)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple2 m => m -> IO (A m) get0 :: Ptr (StdArray '(CBool,4)) -> IO CBool) ForeignPtr (StdArray '(CBool, 4)) v get1 :: ForeignPtr (StdArray '(CBool, 4)) -> IO (B (ForeignPtr (StdArray '(CBool, 4)))) get1 ForeignPtr (StdArray '(CBool, 4)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple2 m => m -> IO (B m) get1 :: Ptr (StdArray '(CBool,4)) -> IO CBool) ForeignPtr (StdArray '(CBool, 4)) v instance CppTuple3 (ForeignPtr (StdArray '(CBool,4))) where type C (ForeignPtr (StdArray '(CBool,4))) = CBool get2 :: ForeignPtr (StdArray '(CBool, 4)) -> IO (C (ForeignPtr (StdArray '(CBool, 4)))) get2 ForeignPtr (StdArray '(CBool, 4)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple3 m => m -> IO (C m) get2 :: Ptr (StdArray '(CBool,4)) -> IO CBool) ForeignPtr (StdArray '(CBool, 4)) v instance CppTuple4 (ForeignPtr (StdArray '(CBool,4))) where type D (ForeignPtr (StdArray '(CBool,4))) = CBool get3 :: ForeignPtr (StdArray '(CBool, 4)) -> IO (D (ForeignPtr (StdArray '(CBool, 4)))) get3 ForeignPtr (StdArray '(CBool, 4)) v = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 (forall m. CppTuple4 m => m -> IO (D m) get3 :: Ptr (StdArray '(CBool,4)) -> IO CBool) ForeignPtr (StdArray '(CBool, 4)) v