{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeSynonymInstances #-}

module Data.SpirV.Enum.LoadCacheControl where

import Data.Word (Word32)
import Foreign.Storable (Storable)

newtype LoadCacheControl = LoadCacheControl Word32
  deriving newtype (LoadCacheControl -> LoadCacheControl -> Bool
(LoadCacheControl -> LoadCacheControl -> Bool)
-> (LoadCacheControl -> LoadCacheControl -> Bool)
-> Eq LoadCacheControl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoadCacheControl -> LoadCacheControl -> Bool
== :: LoadCacheControl -> LoadCacheControl -> Bool
$c/= :: LoadCacheControl -> LoadCacheControl -> Bool
/= :: LoadCacheControl -> LoadCacheControl -> Bool
Eq, Eq LoadCacheControl
Eq LoadCacheControl =>
(LoadCacheControl -> LoadCacheControl -> Ordering)
-> (LoadCacheControl -> LoadCacheControl -> Bool)
-> (LoadCacheControl -> LoadCacheControl -> Bool)
-> (LoadCacheControl -> LoadCacheControl -> Bool)
-> (LoadCacheControl -> LoadCacheControl -> Bool)
-> (LoadCacheControl -> LoadCacheControl -> LoadCacheControl)
-> (LoadCacheControl -> LoadCacheControl -> LoadCacheControl)
-> Ord LoadCacheControl
LoadCacheControl -> LoadCacheControl -> Bool
LoadCacheControl -> LoadCacheControl -> Ordering
LoadCacheControl -> LoadCacheControl -> LoadCacheControl
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 :: LoadCacheControl -> LoadCacheControl -> Ordering
compare :: LoadCacheControl -> LoadCacheControl -> Ordering
$c< :: LoadCacheControl -> LoadCacheControl -> Bool
< :: LoadCacheControl -> LoadCacheControl -> Bool
$c<= :: LoadCacheControl -> LoadCacheControl -> Bool
<= :: LoadCacheControl -> LoadCacheControl -> Bool
$c> :: LoadCacheControl -> LoadCacheControl -> Bool
> :: LoadCacheControl -> LoadCacheControl -> Bool
$c>= :: LoadCacheControl -> LoadCacheControl -> Bool
>= :: LoadCacheControl -> LoadCacheControl -> Bool
$cmax :: LoadCacheControl -> LoadCacheControl -> LoadCacheControl
max :: LoadCacheControl -> LoadCacheControl -> LoadCacheControl
$cmin :: LoadCacheControl -> LoadCacheControl -> LoadCacheControl
min :: LoadCacheControl -> LoadCacheControl -> LoadCacheControl
Ord, Ptr LoadCacheControl -> IO LoadCacheControl
Ptr LoadCacheControl -> Int -> IO LoadCacheControl
Ptr LoadCacheControl -> Int -> LoadCacheControl -> IO ()
Ptr LoadCacheControl -> LoadCacheControl -> IO ()
LoadCacheControl -> Int
(LoadCacheControl -> Int)
-> (LoadCacheControl -> Int)
-> (Ptr LoadCacheControl -> Int -> IO LoadCacheControl)
-> (Ptr LoadCacheControl -> Int -> LoadCacheControl -> IO ())
-> (forall b. Ptr b -> Int -> IO LoadCacheControl)
-> (forall b. Ptr b -> Int -> LoadCacheControl -> IO ())
-> (Ptr LoadCacheControl -> IO LoadCacheControl)
-> (Ptr LoadCacheControl -> LoadCacheControl -> IO ())
-> Storable LoadCacheControl
forall b. Ptr b -> Int -> IO LoadCacheControl
forall b. Ptr b -> Int -> LoadCacheControl -> 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 :: LoadCacheControl -> Int
sizeOf :: LoadCacheControl -> Int
$calignment :: LoadCacheControl -> Int
alignment :: LoadCacheControl -> Int
$cpeekElemOff :: Ptr LoadCacheControl -> Int -> IO LoadCacheControl
peekElemOff :: Ptr LoadCacheControl -> Int -> IO LoadCacheControl
$cpokeElemOff :: Ptr LoadCacheControl -> Int -> LoadCacheControl -> IO ()
pokeElemOff :: Ptr LoadCacheControl -> Int -> LoadCacheControl -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO LoadCacheControl
peekByteOff :: forall b. Ptr b -> Int -> IO LoadCacheControl
$cpokeByteOff :: forall b. Ptr b -> Int -> LoadCacheControl -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> LoadCacheControl -> IO ()
$cpeek :: Ptr LoadCacheControl -> IO LoadCacheControl
peek :: Ptr LoadCacheControl -> IO LoadCacheControl
$cpoke :: Ptr LoadCacheControl -> LoadCacheControl -> IO ()
poke :: Ptr LoadCacheControl -> LoadCacheControl -> IO ()
Storable)

instance Show LoadCacheControl where
  showsPrec :: Int -> LoadCacheControl -> ShowS
showsPrec Int
p (LoadCacheControl Word32
v) = case Word32
v of
    Word32
0 -> String -> ShowS
showString String
"UncachedINTEL"
    Word32
1 -> String -> ShowS
showString String
"CachedINTEL"
    Word32
2 -> String -> ShowS
showString String
"StreamingINTEL"
    Word32
3 -> String -> ShowS
showString String
"InvalidateAfterReadINTEL"
    Word32
4 -> String -> ShowS
showString String
"ConstCachedINTEL"
    Word32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
> Int
10) (ShowS -> ShowS) -> ShowS -> ShowS
forall a b. (a -> b) -> a -> b
$ String -> ShowS
showString String
"LoadCacheControl " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Word32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec (Int
p Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
1) Word32
x

pattern UncachedINTEL :: LoadCacheControl
pattern $mUncachedINTEL :: forall {r}. LoadCacheControl -> ((# #) -> r) -> ((# #) -> r) -> r
$bUncachedINTEL :: LoadCacheControl
UncachedINTEL = LoadCacheControl 0

pattern CachedINTEL :: LoadCacheControl
pattern $mCachedINTEL :: forall {r}. LoadCacheControl -> ((# #) -> r) -> ((# #) -> r) -> r
$bCachedINTEL :: LoadCacheControl
CachedINTEL = LoadCacheControl 1

pattern StreamingINTEL :: LoadCacheControl
pattern $mStreamingINTEL :: forall {r}. LoadCacheControl -> ((# #) -> r) -> ((# #) -> r) -> r
$bStreamingINTEL :: LoadCacheControl
StreamingINTEL = LoadCacheControl 2

pattern InvalidateAfterReadINTEL :: LoadCacheControl
pattern $mInvalidateAfterReadINTEL :: forall {r}. LoadCacheControl -> ((# #) -> r) -> ((# #) -> r) -> r
$bInvalidateAfterReadINTEL :: LoadCacheControl
InvalidateAfterReadINTEL = LoadCacheControl 3

pattern ConstCachedINTEL :: LoadCacheControl
pattern $mConstCachedINTEL :: forall {r}. LoadCacheControl -> ((# #) -> r) -> ((# #) -> r) -> r
$bConstCachedINTEL :: LoadCacheControl
ConstCachedINTEL = LoadCacheControl 4