{-# language CPP #-}
module Vulkan.Core10.Enums.PhysicalDeviceType (PhysicalDeviceType( PHYSICAL_DEVICE_TYPE_OTHER
, PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
, PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
, PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU
, PHYSICAL_DEVICE_TYPE_CPU
, ..
)) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Zero (Zero)
newtype PhysicalDeviceType = PhysicalDeviceType Int32
deriving newtype (PhysicalDeviceType -> PhysicalDeviceType -> Bool
(PhysicalDeviceType -> PhysicalDeviceType -> Bool)
-> (PhysicalDeviceType -> PhysicalDeviceType -> Bool)
-> Eq PhysicalDeviceType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
$c/= :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
== :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
$c== :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
Eq, Eq PhysicalDeviceType
Eq PhysicalDeviceType =>
(PhysicalDeviceType -> PhysicalDeviceType -> Ordering)
-> (PhysicalDeviceType -> PhysicalDeviceType -> Bool)
-> (PhysicalDeviceType -> PhysicalDeviceType -> Bool)
-> (PhysicalDeviceType -> PhysicalDeviceType -> Bool)
-> (PhysicalDeviceType -> PhysicalDeviceType -> Bool)
-> (PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType)
-> (PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType)
-> Ord PhysicalDeviceType
PhysicalDeviceType -> PhysicalDeviceType -> Bool
PhysicalDeviceType -> PhysicalDeviceType -> Ordering
PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType
$cmin :: PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType
max :: PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType
$cmax :: PhysicalDeviceType -> PhysicalDeviceType -> PhysicalDeviceType
>= :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
$c>= :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
> :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
$c> :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
<= :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
$c<= :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
< :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
$c< :: PhysicalDeviceType -> PhysicalDeviceType -> Bool
compare :: PhysicalDeviceType -> PhysicalDeviceType -> Ordering
$ccompare :: PhysicalDeviceType -> PhysicalDeviceType -> Ordering
$cp1Ord :: Eq PhysicalDeviceType
Ord, Ptr b -> Int -> IO PhysicalDeviceType
Ptr b -> Int -> PhysicalDeviceType -> IO ()
Ptr PhysicalDeviceType -> IO PhysicalDeviceType
Ptr PhysicalDeviceType -> Int -> IO PhysicalDeviceType
Ptr PhysicalDeviceType -> Int -> PhysicalDeviceType -> IO ()
Ptr PhysicalDeviceType -> PhysicalDeviceType -> IO ()
PhysicalDeviceType -> Int
(PhysicalDeviceType -> Int)
-> (PhysicalDeviceType -> Int)
-> (Ptr PhysicalDeviceType -> Int -> IO PhysicalDeviceType)
-> (Ptr PhysicalDeviceType -> Int -> PhysicalDeviceType -> IO ())
-> (forall b. Ptr b -> Int -> IO PhysicalDeviceType)
-> (forall b. Ptr b -> Int -> PhysicalDeviceType -> IO ())
-> (Ptr PhysicalDeviceType -> IO PhysicalDeviceType)
-> (Ptr PhysicalDeviceType -> PhysicalDeviceType -> IO ())
-> Storable PhysicalDeviceType
forall b. Ptr b -> Int -> IO PhysicalDeviceType
forall b. Ptr b -> Int -> PhysicalDeviceType -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr PhysicalDeviceType -> PhysicalDeviceType -> IO ()
$cpoke :: Ptr PhysicalDeviceType -> PhysicalDeviceType -> IO ()
peek :: Ptr PhysicalDeviceType -> IO PhysicalDeviceType
$cpeek :: Ptr PhysicalDeviceType -> IO PhysicalDeviceType
pokeByteOff :: Ptr b -> Int -> PhysicalDeviceType -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> PhysicalDeviceType -> IO ()
peekByteOff :: Ptr b -> Int -> IO PhysicalDeviceType
$cpeekByteOff :: forall b. Ptr b -> Int -> IO PhysicalDeviceType
pokeElemOff :: Ptr PhysicalDeviceType -> Int -> PhysicalDeviceType -> IO ()
$cpokeElemOff :: Ptr PhysicalDeviceType -> Int -> PhysicalDeviceType -> IO ()
peekElemOff :: Ptr PhysicalDeviceType -> Int -> IO PhysicalDeviceType
$cpeekElemOff :: Ptr PhysicalDeviceType -> Int -> IO PhysicalDeviceType
alignment :: PhysicalDeviceType -> Int
$calignment :: PhysicalDeviceType -> Int
sizeOf :: PhysicalDeviceType -> Int
$csizeOf :: PhysicalDeviceType -> Int
Storable, PhysicalDeviceType
PhysicalDeviceType -> Zero PhysicalDeviceType
forall a. a -> Zero a
zero :: PhysicalDeviceType
$czero :: PhysicalDeviceType
Zero)
pattern $bPHYSICAL_DEVICE_TYPE_OTHER :: PhysicalDeviceType
$mPHYSICAL_DEVICE_TYPE_OTHER :: forall r. PhysicalDeviceType -> (Void# -> r) -> (Void# -> r) -> r
PHYSICAL_DEVICE_TYPE_OTHER = PhysicalDeviceType 0
pattern $bPHYSICAL_DEVICE_TYPE_INTEGRATED_GPU :: PhysicalDeviceType
$mPHYSICAL_DEVICE_TYPE_INTEGRATED_GPU :: forall r. PhysicalDeviceType -> (Void# -> r) -> (Void# -> r) -> r
PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = PhysicalDeviceType 1
pattern $bPHYSICAL_DEVICE_TYPE_DISCRETE_GPU :: PhysicalDeviceType
$mPHYSICAL_DEVICE_TYPE_DISCRETE_GPU :: forall r. PhysicalDeviceType -> (Void# -> r) -> (Void# -> r) -> r
PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = PhysicalDeviceType 2
pattern $bPHYSICAL_DEVICE_TYPE_VIRTUAL_GPU :: PhysicalDeviceType
$mPHYSICAL_DEVICE_TYPE_VIRTUAL_GPU :: forall r. PhysicalDeviceType -> (Void# -> r) -> (Void# -> r) -> r
PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = PhysicalDeviceType 3
pattern $bPHYSICAL_DEVICE_TYPE_CPU :: PhysicalDeviceType
$mPHYSICAL_DEVICE_TYPE_CPU :: forall r. PhysicalDeviceType -> (Void# -> r) -> (Void# -> r) -> r
PHYSICAL_DEVICE_TYPE_CPU = PhysicalDeviceType 4
{-# complete PHYSICAL_DEVICE_TYPE_OTHER,
PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU,
PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU,
PHYSICAL_DEVICE_TYPE_CPU :: PhysicalDeviceType #-}
instance Show PhysicalDeviceType where
showsPrec :: Int -> PhysicalDeviceType -> ShowS
showsPrec p :: Int
p = \case
PHYSICAL_DEVICE_TYPE_OTHER -> String -> ShowS
showString "PHYSICAL_DEVICE_TYPE_OTHER"
PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU -> String -> ShowS
showString "PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU"
PHYSICAL_DEVICE_TYPE_DISCRETE_GPU -> String -> ShowS
showString "PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"
PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU -> String -> ShowS
showString "PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU"
PHYSICAL_DEVICE_TYPE_CPU -> String -> ShowS
showString "PHYSICAL_DEVICE_TYPE_CPU"
PhysicalDeviceType x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "PhysicalDeviceType " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read PhysicalDeviceType where
readPrec :: ReadPrec PhysicalDeviceType
readPrec = ReadPrec PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec PhysicalDeviceType)]
-> ReadPrec PhysicalDeviceType
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("PHYSICAL_DEVICE_TYPE_OTHER", PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall (f :: * -> *) a. Applicative f => a -> f a
pure PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_OTHER)
, ("PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU", PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall (f :: * -> *) a. Applicative f => a -> f a
pure PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU)
, ("PHYSICAL_DEVICE_TYPE_DISCRETE_GPU", PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall (f :: * -> *) a. Applicative f => a -> f a
pure PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
, ("PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU", PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall (f :: * -> *) a. Applicative f => a -> f a
pure PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU)
, ("PHYSICAL_DEVICE_TYPE_CPU", PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall (f :: * -> *) a. Applicative f => a -> f a
pure PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_CPU)]
ReadPrec PhysicalDeviceType
-> ReadPrec PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "PhysicalDeviceType")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
PhysicalDeviceType -> ReadPrec PhysicalDeviceType
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> PhysicalDeviceType
PhysicalDeviceType Int32
v)))