{-# language CPP #-}
-- No documentation found for Chapter "PhysicalDeviceType"
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 Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import GHC.Show (showsPrec)
import Vulkan.Zero (Zero)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))

-- | VkPhysicalDeviceType - Supported physical device types
--
-- = Description
--
-- The physical device type is advertised for informational purposes only,
-- and does not directly affect the operation of the system. However, the
-- device type /may/ correlate with other advertised properties or
-- capabilities of the system, such as how many memory heaps there are.
--
-- = See Also
--
-- 'Vulkan.Core10.DeviceInitialization.PhysicalDeviceProperties'
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)

-- | 'PHYSICAL_DEVICE_TYPE_OTHER' - the device does not match any other
-- available types.
pattern $bPHYSICAL_DEVICE_TYPE_OTHER :: PhysicalDeviceType
$mPHYSICAL_DEVICE_TYPE_OTHER :: forall r. PhysicalDeviceType -> (Void# -> r) -> (Void# -> r) -> r
PHYSICAL_DEVICE_TYPE_OTHER          = PhysicalDeviceType 0
-- | 'PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU' - the device is typically one
-- embedded in or tightly coupled with the host.
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
-- | 'PHYSICAL_DEVICE_TYPE_DISCRETE_GPU' - the device is typically a separate
-- processor connected to the host via an interlink.
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
-- | 'PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU' - the device is typically a virtual
-- node in a virtualization environment.
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
-- | 'PHYSICAL_DEVICE_TYPE_CPU' - the device is typically running on the same
-- processors as the host.
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 #-}

conNamePhysicalDeviceType :: String
conNamePhysicalDeviceType :: String
conNamePhysicalDeviceType = "PhysicalDeviceType"

enumPrefixPhysicalDeviceType :: String
enumPrefixPhysicalDeviceType :: String
enumPrefixPhysicalDeviceType = "PHYSICAL_DEVICE_TYPE_"

showTablePhysicalDeviceType :: [(PhysicalDeviceType, String)]
showTablePhysicalDeviceType :: [(PhysicalDeviceType, String)]
showTablePhysicalDeviceType =
  [ (PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_OTHER         , "OTHER")
  , (PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, "INTEGRATED_GPU")
  , (PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_DISCRETE_GPU  , "DISCRETE_GPU")
  , (PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU   , "VIRTUAL_GPU")
  , (PhysicalDeviceType
PHYSICAL_DEVICE_TYPE_CPU           , "CPU")
  ]

instance Show PhysicalDeviceType where
  showsPrec :: Int -> PhysicalDeviceType -> ShowS
showsPrec = String
-> [(PhysicalDeviceType, String)]
-> String
-> (PhysicalDeviceType -> Int32)
-> (Int32 -> ShowS)
-> Int
-> PhysicalDeviceType
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec String
enumPrefixPhysicalDeviceType
                            [(PhysicalDeviceType, String)]
showTablePhysicalDeviceType
                            String
conNamePhysicalDeviceType
                            (\(PhysicalDeviceType x :: Int32
x) -> Int32
x)
                            (Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11)

instance Read PhysicalDeviceType where
  readPrec :: ReadPrec PhysicalDeviceType
readPrec =
    String
-> [(PhysicalDeviceType, String)]
-> String
-> (Int32 -> PhysicalDeviceType)
-> ReadPrec PhysicalDeviceType
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec String
enumPrefixPhysicalDeviceType [(PhysicalDeviceType, String)]
showTablePhysicalDeviceType String
conNamePhysicalDeviceType Int32 -> PhysicalDeviceType
PhysicalDeviceType