{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeSynonymInstances #-} module Data.SpirV.Enum.FunctionControl where import Data.Bits (Bits, FiniteBits, (.|.)) import Data.Word (Word32) import Foreign.Storable (Storable) type FunctionControl = FunctionControlBits newtype FunctionControlBits = FunctionControlBits Word32 deriving newtype (FunctionControlBits -> FunctionControlBits -> Bool (FunctionControlBits -> FunctionControlBits -> Bool) -> (FunctionControlBits -> FunctionControlBits -> Bool) -> Eq FunctionControlBits forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a $c== :: FunctionControlBits -> FunctionControlBits -> Bool == :: FunctionControlBits -> FunctionControlBits -> Bool $c/= :: FunctionControlBits -> FunctionControlBits -> Bool /= :: FunctionControlBits -> FunctionControlBits -> Bool Eq, Eq FunctionControlBits Eq FunctionControlBits => (FunctionControlBits -> FunctionControlBits -> Ordering) -> (FunctionControlBits -> FunctionControlBits -> Bool) -> (FunctionControlBits -> FunctionControlBits -> Bool) -> (FunctionControlBits -> FunctionControlBits -> Bool) -> (FunctionControlBits -> FunctionControlBits -> Bool) -> (FunctionControlBits -> FunctionControlBits -> FunctionControlBits) -> (FunctionControlBits -> FunctionControlBits -> FunctionControlBits) -> Ord FunctionControlBits FunctionControlBits -> FunctionControlBits -> Bool FunctionControlBits -> FunctionControlBits -> Ordering FunctionControlBits -> FunctionControlBits -> FunctionControlBits 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 $ccompare :: FunctionControlBits -> FunctionControlBits -> Ordering compare :: FunctionControlBits -> FunctionControlBits -> Ordering $c< :: FunctionControlBits -> FunctionControlBits -> Bool < :: FunctionControlBits -> FunctionControlBits -> Bool $c<= :: FunctionControlBits -> FunctionControlBits -> Bool <= :: FunctionControlBits -> FunctionControlBits -> Bool $c> :: FunctionControlBits -> FunctionControlBits -> Bool > :: FunctionControlBits -> FunctionControlBits -> Bool $c>= :: FunctionControlBits -> FunctionControlBits -> Bool >= :: FunctionControlBits -> FunctionControlBits -> Bool $cmax :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits max :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits $cmin :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits min :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits Ord, Ptr FunctionControlBits -> IO FunctionControlBits Ptr FunctionControlBits -> Int -> IO FunctionControlBits Ptr FunctionControlBits -> Int -> FunctionControlBits -> IO () Ptr FunctionControlBits -> FunctionControlBits -> IO () FunctionControlBits -> Int (FunctionControlBits -> Int) -> (FunctionControlBits -> Int) -> (Ptr FunctionControlBits -> Int -> IO FunctionControlBits) -> (Ptr FunctionControlBits -> Int -> FunctionControlBits -> IO ()) -> (forall b. Ptr b -> Int -> IO FunctionControlBits) -> (forall b. Ptr b -> Int -> FunctionControlBits -> IO ()) -> (Ptr FunctionControlBits -> IO FunctionControlBits) -> (Ptr FunctionControlBits -> FunctionControlBits -> IO ()) -> Storable FunctionControlBits forall b. Ptr b -> Int -> IO FunctionControlBits forall b. Ptr b -> Int -> FunctionControlBits -> 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 $csizeOf :: FunctionControlBits -> Int sizeOf :: FunctionControlBits -> Int $calignment :: FunctionControlBits -> Int alignment :: FunctionControlBits -> Int $cpeekElemOff :: Ptr FunctionControlBits -> Int -> IO FunctionControlBits peekElemOff :: Ptr FunctionControlBits -> Int -> IO FunctionControlBits $cpokeElemOff :: Ptr FunctionControlBits -> Int -> FunctionControlBits -> IO () pokeElemOff :: Ptr FunctionControlBits -> Int -> FunctionControlBits -> IO () $cpeekByteOff :: forall b. Ptr b -> Int -> IO FunctionControlBits peekByteOff :: forall b. Ptr b -> Int -> IO FunctionControlBits $cpokeByteOff :: forall b. Ptr b -> Int -> FunctionControlBits -> IO () pokeByteOff :: forall b. Ptr b -> Int -> FunctionControlBits -> IO () $cpeek :: Ptr FunctionControlBits -> IO FunctionControlBits peek :: Ptr FunctionControlBits -> IO FunctionControlBits $cpoke :: Ptr FunctionControlBits -> FunctionControlBits -> IO () poke :: Ptr FunctionControlBits -> FunctionControlBits -> IO () Storable, Eq FunctionControlBits FunctionControlBits Eq FunctionControlBits => (FunctionControlBits -> FunctionControlBits -> FunctionControlBits) -> (FunctionControlBits -> FunctionControlBits -> FunctionControlBits) -> (FunctionControlBits -> FunctionControlBits -> FunctionControlBits) -> (FunctionControlBits -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> FunctionControlBits -> (Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> Bool) -> (FunctionControlBits -> Maybe Int) -> (FunctionControlBits -> Int) -> (FunctionControlBits -> Bool) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int -> FunctionControlBits) -> (FunctionControlBits -> Int) -> Bits FunctionControlBits Int -> FunctionControlBits FunctionControlBits -> Bool FunctionControlBits -> Int FunctionControlBits -> Maybe Int FunctionControlBits -> FunctionControlBits FunctionControlBits -> Int -> Bool FunctionControlBits -> Int -> FunctionControlBits FunctionControlBits -> FunctionControlBits -> FunctionControlBits 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 $c.&. :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits .&. :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits $c.|. :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits .|. :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits $cxor :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits xor :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits $ccomplement :: FunctionControlBits -> FunctionControlBits complement :: FunctionControlBits -> FunctionControlBits $cshift :: FunctionControlBits -> Int -> FunctionControlBits shift :: FunctionControlBits -> Int -> FunctionControlBits $crotate :: FunctionControlBits -> Int -> FunctionControlBits rotate :: FunctionControlBits -> Int -> FunctionControlBits $czeroBits :: FunctionControlBits zeroBits :: FunctionControlBits $cbit :: Int -> FunctionControlBits bit :: Int -> FunctionControlBits $csetBit :: FunctionControlBits -> Int -> FunctionControlBits setBit :: FunctionControlBits -> Int -> FunctionControlBits $cclearBit :: FunctionControlBits -> Int -> FunctionControlBits clearBit :: FunctionControlBits -> Int -> FunctionControlBits $ccomplementBit :: FunctionControlBits -> Int -> FunctionControlBits complementBit :: FunctionControlBits -> Int -> FunctionControlBits $ctestBit :: FunctionControlBits -> Int -> Bool testBit :: FunctionControlBits -> Int -> Bool $cbitSizeMaybe :: FunctionControlBits -> Maybe Int bitSizeMaybe :: FunctionControlBits -> Maybe Int $cbitSize :: FunctionControlBits -> Int bitSize :: FunctionControlBits -> Int $cisSigned :: FunctionControlBits -> Bool isSigned :: FunctionControlBits -> Bool $cshiftL :: FunctionControlBits -> Int -> FunctionControlBits shiftL :: FunctionControlBits -> Int -> FunctionControlBits $cunsafeShiftL :: FunctionControlBits -> Int -> FunctionControlBits unsafeShiftL :: FunctionControlBits -> Int -> FunctionControlBits $cshiftR :: FunctionControlBits -> Int -> FunctionControlBits shiftR :: FunctionControlBits -> Int -> FunctionControlBits $cunsafeShiftR :: FunctionControlBits -> Int -> FunctionControlBits unsafeShiftR :: FunctionControlBits -> Int -> FunctionControlBits $crotateL :: FunctionControlBits -> Int -> FunctionControlBits rotateL :: FunctionControlBits -> Int -> FunctionControlBits $crotateR :: FunctionControlBits -> Int -> FunctionControlBits rotateR :: FunctionControlBits -> Int -> FunctionControlBits $cpopCount :: FunctionControlBits -> Int popCount :: FunctionControlBits -> Int Bits, Bits FunctionControlBits Bits FunctionControlBits => (FunctionControlBits -> Int) -> (FunctionControlBits -> Int) -> (FunctionControlBits -> Int) -> FiniteBits FunctionControlBits FunctionControlBits -> Int forall b. Bits b => (b -> Int) -> (b -> Int) -> (b -> Int) -> FiniteBits b $cfiniteBitSize :: FunctionControlBits -> Int finiteBitSize :: FunctionControlBits -> Int $ccountLeadingZeros :: FunctionControlBits -> Int countLeadingZeros :: FunctionControlBits -> Int $ccountTrailingZeros :: FunctionControlBits -> Int countTrailingZeros :: FunctionControlBits -> Int FiniteBits) instance Semigroup FunctionControl where (FunctionControlBits Word32 a) <> :: FunctionControlBits -> FunctionControlBits -> FunctionControlBits <> (FunctionControlBits Word32 b) = Word32 -> FunctionControlBits FunctionControlBits (Word32 a Word32 -> Word32 -> Word32 forall a. Bits a => a -> a -> a .|. Word32 b) instance Monoid FunctionControl where mempty :: FunctionControlBits mempty = Word32 -> FunctionControlBits FunctionControlBits Word32 0 pattern Inline :: FunctionControlBits pattern $mInline :: forall {r}. FunctionControlBits -> ((# #) -> r) -> ((# #) -> r) -> r $bInline :: FunctionControlBits Inline = FunctionControlBits 0x00000001 pattern DontInline :: FunctionControlBits pattern $mDontInline :: forall {r}. FunctionControlBits -> ((# #) -> r) -> ((# #) -> r) -> r $bDontInline :: FunctionControlBits DontInline = FunctionControlBits 0x00000002 pattern Pure :: FunctionControlBits pattern $mPure :: forall {r}. FunctionControlBits -> ((# #) -> r) -> ((# #) -> r) -> r $bPure :: FunctionControlBits Pure = FunctionControlBits 0x00000004 pattern Const :: FunctionControlBits pattern $mConst :: forall {r}. FunctionControlBits -> ((# #) -> r) -> ((# #) -> r) -> r $bConst :: FunctionControlBits Const = FunctionControlBits 0x00000008 pattern OptNoneINTEL :: FunctionControlBits pattern $mOptNoneINTEL :: forall {r}. FunctionControlBits -> ((# #) -> r) -> ((# #) -> r) -> r $bOptNoneINTEL :: FunctionControlBits OptNoneINTEL = FunctionControlBits 0x00010000