{-# language CPP #-}
module Vulkan.Core10.Enums.SparseMemoryBindFlagBits ( SparseMemoryBindFlagBits( SPARSE_MEMORY_BIND_METADATA_BIT
, ..
)
, SparseMemoryBindFlags
) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import Numeric (showHex)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Data.Bits (Bits)
import Foreign.Storable (Storable)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Vulkan.Core10.FundamentalTypes (Flags)
import Vulkan.Zero (Zero)
newtype SparseMemoryBindFlagBits = SparseMemoryBindFlagBits Flags
deriving newtype (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
(SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool)
-> (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool)
-> Eq SparseMemoryBindFlagBits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c/= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
== :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c== :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
Eq, Eq SparseMemoryBindFlagBits
Eq SparseMemoryBindFlagBits =>
(SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering)
-> (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool)
-> (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool)
-> (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool)
-> (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool)
-> (SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits)
-> Ord SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering
SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
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 :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cmin :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
max :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cmax :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
>= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c>= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
> :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c> :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
<= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c<= :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
< :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
$c< :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Bool
compare :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering
$ccompare :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> Ordering
$cp1Ord :: Eq SparseMemoryBindFlagBits
Ord, Ptr b -> Int -> IO SparseMemoryBindFlagBits
Ptr b -> Int -> SparseMemoryBindFlagBits -> IO ()
Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits
Ptr SparseMemoryBindFlagBits -> Int -> IO SparseMemoryBindFlagBits
Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ()
Ptr SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> IO ()
SparseMemoryBindFlagBits -> Int
(SparseMemoryBindFlagBits -> Int)
-> (SparseMemoryBindFlagBits -> Int)
-> (Ptr SparseMemoryBindFlagBits
-> Int -> IO SparseMemoryBindFlagBits)
-> (Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ())
-> (forall b. Ptr b -> Int -> IO SparseMemoryBindFlagBits)
-> (forall b. Ptr b -> Int -> SparseMemoryBindFlagBits -> IO ())
-> (Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits)
-> (Ptr SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> IO ())
-> Storable SparseMemoryBindFlagBits
forall b. Ptr b -> Int -> IO SparseMemoryBindFlagBits
forall b. Ptr b -> Int -> SparseMemoryBindFlagBits -> 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 SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> IO ()
$cpoke :: Ptr SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits -> IO ()
peek :: Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits
$cpeek :: Ptr SparseMemoryBindFlagBits -> IO SparseMemoryBindFlagBits
pokeByteOff :: Ptr b -> Int -> SparseMemoryBindFlagBits -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SparseMemoryBindFlagBits -> IO ()
peekByteOff :: Ptr b -> Int -> IO SparseMemoryBindFlagBits
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SparseMemoryBindFlagBits
pokeElemOff :: Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ()
$cpokeElemOff :: Ptr SparseMemoryBindFlagBits
-> Int -> SparseMemoryBindFlagBits -> IO ()
peekElemOff :: Ptr SparseMemoryBindFlagBits -> Int -> IO SparseMemoryBindFlagBits
$cpeekElemOff :: Ptr SparseMemoryBindFlagBits -> Int -> IO SparseMemoryBindFlagBits
alignment :: SparseMemoryBindFlagBits -> Int
$calignment :: SparseMemoryBindFlagBits -> Int
sizeOf :: SparseMemoryBindFlagBits -> Int
$csizeOf :: SparseMemoryBindFlagBits -> Int
Storable, SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> Zero SparseMemoryBindFlagBits
forall a. a -> Zero a
zero :: SparseMemoryBindFlagBits
$czero :: SparseMemoryBindFlagBits
Zero, Eq SparseMemoryBindFlagBits
SparseMemoryBindFlagBits
Eq SparseMemoryBindFlagBits =>
(SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> SparseMemoryBindFlagBits
-> (Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> Bool)
-> (SparseMemoryBindFlagBits -> Maybe Int)
-> (SparseMemoryBindFlagBits -> Int)
-> (SparseMemoryBindFlagBits -> Bool)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits)
-> (SparseMemoryBindFlagBits -> Int)
-> Bits SparseMemoryBindFlagBits
Int -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> Bool
SparseMemoryBindFlagBits -> Int
SparseMemoryBindFlagBits -> Maybe Int
SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits -> Int -> Bool
SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
forall a.
Eq a =>
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> a
-> (Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> Bool)
-> (a -> Maybe Int)
-> (a -> Int)
-> (a -> Bool)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int -> a)
-> (a -> Int)
-> Bits a
popCount :: SparseMemoryBindFlagBits -> Int
$cpopCount :: SparseMemoryBindFlagBits -> Int
rotateR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$crotateR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
rotateL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$crotateL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
unsafeShiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cunsafeShiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
shiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cshiftR :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
unsafeShiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cunsafeShiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
shiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cshiftL :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
isSigned :: SparseMemoryBindFlagBits -> Bool
$cisSigned :: SparseMemoryBindFlagBits -> Bool
bitSize :: SparseMemoryBindFlagBits -> Int
$cbitSize :: SparseMemoryBindFlagBits -> Int
bitSizeMaybe :: SparseMemoryBindFlagBits -> Maybe Int
$cbitSizeMaybe :: SparseMemoryBindFlagBits -> Maybe Int
testBit :: SparseMemoryBindFlagBits -> Int -> Bool
$ctestBit :: SparseMemoryBindFlagBits -> Int -> Bool
complementBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$ccomplementBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
clearBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cclearBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
setBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$csetBit :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
bit :: Int -> SparseMemoryBindFlagBits
$cbit :: Int -> SparseMemoryBindFlagBits
zeroBits :: SparseMemoryBindFlagBits
$czeroBits :: SparseMemoryBindFlagBits
rotate :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$crotate :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
shift :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
$cshift :: SparseMemoryBindFlagBits -> Int -> SparseMemoryBindFlagBits
complement :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$ccomplement :: SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
xor :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cxor :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
.|. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$c.|. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
.&. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$c.&. :: SparseMemoryBindFlagBits
-> SparseMemoryBindFlagBits -> SparseMemoryBindFlagBits
$cp1Bits :: Eq SparseMemoryBindFlagBits
Bits)
pattern $bSPARSE_MEMORY_BIND_METADATA_BIT :: SparseMemoryBindFlagBits
$mSPARSE_MEMORY_BIND_METADATA_BIT :: forall r.
SparseMemoryBindFlagBits -> (Void# -> r) -> (Void# -> r) -> r
SPARSE_MEMORY_BIND_METADATA_BIT = SparseMemoryBindFlagBits 0x00000001
type SparseMemoryBindFlags = SparseMemoryBindFlagBits
instance Show SparseMemoryBindFlagBits where
showsPrec :: Int -> SparseMemoryBindFlagBits -> ShowS
showsPrec p :: Int
p = \case
SPARSE_MEMORY_BIND_METADATA_BIT -> String -> ShowS
showString "SPARSE_MEMORY_BIND_METADATA_BIT"
SparseMemoryBindFlagBits x :: Flags
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "SparseMemoryBindFlagBits 0x" ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Flags -> ShowS
forall a. (Integral a, Show a) => a -> ShowS
showHex Flags
x)
instance Read SparseMemoryBindFlagBits where
readPrec :: ReadPrec SparseMemoryBindFlagBits
readPrec = ReadPrec SparseMemoryBindFlagBits
-> ReadPrec SparseMemoryBindFlagBits
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec SparseMemoryBindFlagBits)]
-> ReadPrec SparseMemoryBindFlagBits
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("SPARSE_MEMORY_BIND_METADATA_BIT", SparseMemoryBindFlagBits -> ReadPrec SparseMemoryBindFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure SparseMemoryBindFlagBits
SPARSE_MEMORY_BIND_METADATA_BIT)]
ReadPrec SparseMemoryBindFlagBits
-> ReadPrec SparseMemoryBindFlagBits
-> ReadPrec SparseMemoryBindFlagBits
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int
-> ReadPrec SparseMemoryBindFlagBits
-> ReadPrec SparseMemoryBindFlagBits
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "SparseMemoryBindFlagBits")
Flags
v <- ReadPrec Flags -> ReadPrec Flags
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Flags
forall a. Read a => ReadPrec a
readPrec
SparseMemoryBindFlagBits -> ReadPrec SparseMemoryBindFlagBits
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Flags -> SparseMemoryBindFlagBits
SparseMemoryBindFlagBits Flags
v)))