{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}

module Torch.Internal.Managed.Type.TensorOptions 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.TensorOptions as Unmanaged





newTensorOptions_s
  :: ScalarType
  -> IO (ForeignPtr TensorOptions)
newTensorOptions_s :: Layout -> IO (ForeignPtr TensorOptions)
newTensorOptions_s = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Layout -> IO (Ptr TensorOptions)
Unmanaged.newTensorOptions_s

tensorOptions_device_D
  :: ForeignPtr TensorOptions
  -> DeviceType
  -> IO (ForeignPtr TensorOptions)
tensorOptions_device_D :: ForeignPtr TensorOptions -> Int16 -> IO (ForeignPtr TensorOptions)
tensorOptions_device_D = 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 Ptr TensorOptions -> Int16 -> IO (Ptr TensorOptions)
Unmanaged.tensorOptions_device_D

tensorOptions_device_index_s
  :: ForeignPtr TensorOptions
  -> Int16
  -> IO (ForeignPtr TensorOptions)
tensorOptions_device_index_s :: ForeignPtr TensorOptions -> Int16 -> IO (ForeignPtr TensorOptions)
tensorOptions_device_index_s = 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 Ptr TensorOptions -> Int16 -> IO (Ptr TensorOptions)
Unmanaged.tensorOptions_device_index_s

tensorOptions_dtype_s
  :: ForeignPtr TensorOptions
  -> ScalarType
  -> IO (ForeignPtr TensorOptions)
tensorOptions_dtype_s :: ForeignPtr TensorOptions -> Layout -> IO (ForeignPtr TensorOptions)
tensorOptions_dtype_s = 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 Ptr TensorOptions -> Layout -> IO (Ptr TensorOptions)
Unmanaged.tensorOptions_dtype_s

tensorOptions_dtype
  :: ForeignPtr TensorOptions
  -> IO (ForeignPtr TensorOptions)
tensorOptions_dtype :: ForeignPtr TensorOptions -> IO (ForeignPtr TensorOptions)
tensorOptions_dtype = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO (Ptr TensorOptions)
Unmanaged.tensorOptions_dtype

tensorOptions_layout_L
  :: ForeignPtr TensorOptions
  -> Layout
  -> IO (ForeignPtr TensorOptions)
tensorOptions_layout_L :: ForeignPtr TensorOptions -> Layout -> IO (ForeignPtr TensorOptions)
tensorOptions_layout_L = 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 Ptr TensorOptions -> Layout -> IO (Ptr TensorOptions)
Unmanaged.tensorOptions_layout_L

tensorOptions_requires_grad_b
  :: ForeignPtr TensorOptions
  -> CBool
  -> IO (ForeignPtr TensorOptions)
tensorOptions_requires_grad_b :: ForeignPtr TensorOptions -> CBool -> IO (ForeignPtr TensorOptions)
tensorOptions_requires_grad_b = 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 Ptr TensorOptions -> CBool -> IO (Ptr TensorOptions)
Unmanaged.tensorOptions_requires_grad_b

tensorOptions_has_device
  :: ForeignPtr TensorOptions
  -> IO (CBool)
tensorOptions_has_device :: ForeignPtr TensorOptions -> IO CBool
tensorOptions_has_device = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO CBool
Unmanaged.tensorOptions_has_device

tensorOptions_device_index
  :: ForeignPtr TensorOptions
  -> IO (Int32)
tensorOptions_device_index :: ForeignPtr TensorOptions -> IO Int32
tensorOptions_device_index = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO Int32
Unmanaged.tensorOptions_device_index

tensorOptions_has_dtype
  :: ForeignPtr TensorOptions
  -> IO (CBool)
tensorOptions_has_dtype :: ForeignPtr TensorOptions -> IO CBool
tensorOptions_has_dtype = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO CBool
Unmanaged.tensorOptions_has_dtype

tensorOptions_layout
  :: ForeignPtr TensorOptions
  -> IO (Layout)
tensorOptions_layout :: ForeignPtr TensorOptions -> IO Layout
tensorOptions_layout = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO Layout
Unmanaged.tensorOptions_layout

tensorOptions_has_layout
  :: ForeignPtr TensorOptions
  -> IO (CBool)
tensorOptions_has_layout :: ForeignPtr TensorOptions -> IO CBool
tensorOptions_has_layout = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO CBool
Unmanaged.tensorOptions_has_layout

tensorOptions_requires_grad
  :: ForeignPtr TensorOptions
  -> IO (CBool)
tensorOptions_requires_grad :: ForeignPtr TensorOptions -> IO CBool
tensorOptions_requires_grad = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO CBool
Unmanaged.tensorOptions_requires_grad

tensorOptions_has_requires_grad
  :: ForeignPtr TensorOptions
  -> IO (CBool)
tensorOptions_has_requires_grad :: ForeignPtr TensorOptions -> IO CBool
tensorOptions_has_requires_grad = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO CBool
Unmanaged.tensorOptions_has_requires_grad

tensorOptions_backend
  :: ForeignPtr TensorOptions
  -> IO (Backend)
tensorOptions_backend :: ForeignPtr TensorOptions -> IO Backend
tensorOptions_backend = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Ptr TensorOptions -> IO Backend
Unmanaged.tensorOptions_backend

dtype_s
  :: ScalarType
  -> IO (ForeignPtr TensorOptions)
dtype_s :: Layout -> IO (ForeignPtr TensorOptions)
dtype_s = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Layout -> IO (Ptr TensorOptions)
Unmanaged.dtype_s

layout_L
  :: Layout
  -> IO (ForeignPtr TensorOptions)
layout_L :: Layout -> IO (ForeignPtr TensorOptions)
layout_L = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Layout -> IO (Ptr TensorOptions)
Unmanaged.layout_L

device_D
  :: DeviceType
  -> IO (ForeignPtr TensorOptions)
device_D :: Int16 -> IO (ForeignPtr TensorOptions)
device_D = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Int16 -> IO (Ptr TensorOptions)
Unmanaged.device_D

device_index_s
  :: Int16
  -> IO (ForeignPtr TensorOptions)
device_index_s :: Int16 -> IO (ForeignPtr TensorOptions)
device_index_s = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 Int16 -> IO (Ptr TensorOptions)
Unmanaged.device_index_s

requires_grad_b
  :: CBool
  -> IO (ForeignPtr TensorOptions)
requires_grad_b :: CBool -> IO (ForeignPtr TensorOptions)
requires_grad_b = forall a ca y cy.
(Castable a ca, Castable y cy) =>
(ca -> IO cy) -> a -> IO y
_cast1 CBool -> IO (Ptr TensorOptions)
Unmanaged.requires_grad_b