-- generated by using spec/Declarations.yaml

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}

module Torch.Internal.Type where

import qualified Language.C.Types as C
import qualified Data.Map as Map
import qualified Language.Haskell.TH.Lib as TH
import Foreign.C.Types (CInt)
import Data.Int

type ScalarType = Int8
type DeviceType = Int16
type Backend = CInt
type Layout = Int8
type MemoryFormat = Int8
type QScheme = Int8

-- std::vector<a>
data StdVector a

-- std::array<a>
data StdArray a

-- std::tuple<a>
data StdTuple a

-- at::Tensor
data Tensor

-- std::vector<at::Tensor>
type TensorList = StdVector Tensor

data TensorIndex

data Scalar
data TensorOptions

data IntArrayRef
-- std::vector<int64>
type IntArray = StdVector Int64

data ArrayRef a

data Storage

data StdString
data Generator
data Device
data Context

data C10Ptr a
data Quantizer
-- c10::intrusive_ptr<Quantizer>
type ConstQuantizerPtr = C10Ptr Quantizer

data Dimname
type DimnameList = StdVector Dimname

data Symbol

data IValue
type IValueList = StdVector IValue

data Stream

data C10Dict a
data C10List a
data C10Optional a

data IVNone
data IVObject
data IVTuple
data IVFuture
data IVConstantString
data Capsule
data Blob

data Module
data SharedPtr a
data JitGraph
data JitNode
data JitValue

data Optimizer

typeTable :: Map.Map C.TypeSpecifier TH.TypeQ
typeTable :: Map TypeSpecifier TypeQ
typeTable = forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList [
        (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"std::array", [t|StdArray|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"std::vector", [t|StdVector|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"std::tuple", [t|StdTuple|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Scalar", [t|Scalar|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Tensor", [t|Tensor|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::TensorOptions", [t|TensorOptions|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::IntArrayRef", [t|IntArrayRef|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::ScalarType", [t|ScalarType|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::DeviceType", [t|DeviceType|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Storage", [t|Storage|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"c10::Device", [t|Device|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Generator", [t|Generator|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"std::string", [t|StdString|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Backend", [t|Backend|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Layout", [t|Layout|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::MemoryFormat", [t|MemoryFormat|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Context", [t|Context|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::QScheme", [t|QScheme|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Dimname", [t|Dimname|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::Symbol", [t|Symbol|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"Quantizer", [t|Quantizer|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::IValue", [t|IValue|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"c10::Stream", [t|Stream|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"c10::intrusive_ptr", [t|C10Ptr|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"c10::Dict", [t|C10Dict|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"c10::List", [t|C10List|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"c10::optional", [t|C10Optional|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::ivalue::Tuple", [t|IVTuple|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::ivalue::Future", [t|IVFuture|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::ivalue::ConstantString", [t|IVConstantString|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::ivalue::Object", [t|IVObject|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"torch::jit::CustomClassHolder", [t|Capsule|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"caffe2::Blob", [t|Blob|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"torch::jit::script::Module", [t|Module|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"std::shared_ptr", [t|SharedPtr|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"torch::jit::Graph", [t|JitGraph|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"torch::jit::Node", [t|JitNode|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"torch::jit::Value", [t|JitValue|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::indexing::TensorIndex", [t|TensorIndex|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"torch::optim::Optimizer", [t|Optimizer|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"ArrayRef", [t|ArrayRef|])
      , (CIdentifier -> TypeSpecifier
C.TypeName CIdentifier
"at::ArrayRef", [t|ArrayRef|])
    ]