{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} module Torch.Internal.Managed.Type.Scalar 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.Scalar as Unmanaged newScalar :: IO (ForeignPtr Scalar) newScalar :: IO (ForeignPtr Scalar) newScalar = forall a ca. Castable a ca => IO ca -> IO a _cast0 IO (Ptr Scalar) Unmanaged.newScalar newScalar_i :: CInt -> IO (ForeignPtr Scalar) newScalar_i :: CInt -> IO (ForeignPtr Scalar) newScalar_i = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 CInt -> IO (Ptr Scalar) Unmanaged.newScalar_i newScalar_d :: CDouble -> IO (ForeignPtr Scalar) newScalar_d :: CDouble -> IO (ForeignPtr Scalar) newScalar_d = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 CDouble -> IO (Ptr Scalar) Unmanaged.newScalar_d newScalar_b :: CBool -> IO (ForeignPtr Scalar) newScalar_b :: CBool -> IO (ForeignPtr Scalar) newScalar_b = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 CBool -> IO (Ptr Scalar) Unmanaged.newScalar_b newScalar_f :: CFloat -> IO (ForeignPtr Scalar) newScalar_f :: CFloat -> IO (ForeignPtr Scalar) newScalar_f = forall a ca y cy. (Castable a ca, Castable y cy) => (ca -> IO cy) -> a -> IO y _cast1 CFloat -> IO (Ptr Scalar) Unmanaged.newScalar_f