{-# language CPP #-}
module Vulkan.Extensions.VK_NV_cooperative_vector ( getPhysicalDeviceCooperativeVectorPropertiesNV
, convertCooperativeVectorMatrixNV
, cmdConvertCooperativeVectorMatrixNV
, pattern COMPONENT_TYPE_FLOAT_E4M3_NV
, pattern COMPONENT_TYPE_FLOAT_E5M2_NV
, PhysicalDeviceCooperativeVectorFeaturesNV(..)
, CooperativeVectorPropertiesNV(..)
, PhysicalDeviceCooperativeVectorPropertiesNV(..)
, ConvertCooperativeVectorMatrixInfoNV(..)
, ComponentTypeKHR( COMPONENT_TYPE_FLOAT16_KHR
, COMPONENT_TYPE_FLOAT32_KHR
, COMPONENT_TYPE_FLOAT64_KHR
, COMPONENT_TYPE_SINT8_KHR
, COMPONENT_TYPE_SINT16_KHR
, COMPONENT_TYPE_SINT32_KHR
, COMPONENT_TYPE_SINT64_KHR
, COMPONENT_TYPE_UINT8_KHR
, COMPONENT_TYPE_UINT16_KHR
, COMPONENT_TYPE_UINT32_KHR
, COMPONENT_TYPE_UINT64_KHR
, COMPONENT_TYPE_FLOAT8_E5M2_EXT
, COMPONENT_TYPE_FLOAT8_E4M3_EXT
, COMPONENT_TYPE_UINT8_PACKED_NV
, COMPONENT_TYPE_SINT8_PACKED_NV
, COMPONENT_TYPE_BFLOAT16_KHR
, ..
)
, CooperativeVectorMatrixLayoutNV( COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV
, COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV
, COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV
, COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV
, ..
)
, NV_COOPERATIVE_VECTOR_SPEC_VERSION
, pattern NV_COOPERATIVE_VECTOR_SPEC_VERSION
, NV_COOPERATIVE_VECTOR_EXTENSION_NAME
, pattern NV_COOPERATIVE_VECTOR_EXTENSION_NAME
, DeviceOrHostAddressKHR(..)
, DeviceOrHostAddressConstKHR(..)
) where
import Vulkan.Internal.Utils (enumReadPrec)
import Vulkan.Internal.Utils (enumShowsPrec)
import Vulkan.Internal.Utils (traceAroundEvent)
import Control.Exception.Base (bracket)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Foreign.Marshal.Alloc (allocaBytes)
import Foreign.Marshal.Alloc (callocBytes)
import Foreign.Marshal.Alloc (free)
import GHC.Base (when)
import GHC.IO (throwIO)
import GHC.Ptr (nullFunPtr)
import Foreign.Ptr (nullPtr)
import Foreign.Ptr (plusPtr)
import GHC.Show (showsPrec)
import Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import qualified Data.Vector (imapM_)
import qualified Data.Vector (length)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero)
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Foreign.C.Types (CSize)
import Foreign.C.Types (CSize(CSize))
import Foreign.Storable (Storable)
import Foreign.Storable (Storable(peek))
import Foreign.Storable (Storable(poke))
import qualified Foreign.Storable (Storable(..))
import GHC.Generics (Generic)
import GHC.IO.Exception (IOErrorType(..))
import GHC.IO.Exception (IOException(..))
import Data.Int (Int32)
import Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import GHC.Read (Read(readPrec))
import GHC.Show (Show(showsPrec))
import Data.Word (Word32)
import Data.Word (Word64)
import Data.Kind (Type)
import Control.Monad.Trans.Cont (ContT(..))
import Data.Vector (Vector)
import Vulkan.CStruct.Utils (advancePtrBytes)
import Vulkan.Core10.FundamentalTypes (bool32ToBool)
import Vulkan.Core10.FundamentalTypes (boolToBool32)
import Vulkan.NamedType ((:::))
import Vulkan.Core10.FundamentalTypes (Bool32)
import Vulkan.Core10.Handles (CommandBuffer)
import Vulkan.Core10.Handles (CommandBuffer(..))
import Vulkan.Core10.Handles (CommandBuffer(CommandBuffer))
import Vulkan.Core10.Handles (CommandBuffer_T)
import Vulkan.Core10.Handles (Device)
import Vulkan.Core10.Handles (Device(..))
import Vulkan.Core10.Handles (Device(Device))
import Vulkan.Dynamic (DeviceCmds(pVkCmdConvertCooperativeVectorMatrixNV))
import Vulkan.Dynamic (DeviceCmds(pVkConvertCooperativeVectorMatrixNV))
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR)
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressKHR)
import Vulkan.Core10.Handles (Device_T)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceCooperativeVectorPropertiesNV))
import Vulkan.Core10.Handles (PhysicalDevice)
import Vulkan.Core10.Handles (PhysicalDevice(..))
import Vulkan.Core10.Handles (PhysicalDevice(PhysicalDevice))
import Vulkan.Core10.Handles (PhysicalDevice_T)
import Vulkan.Core10.Enums.Result (Result)
import Vulkan.Core10.Enums.Result (Result(..))
import Vulkan.Core10.Enums.ShaderStageFlagBits (ShaderStageFlags)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressConstKHR(..))
import Vulkan.Extensions.VK_KHR_acceleration_structure (DeviceOrHostAddressKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkGetPhysicalDeviceCooperativeVectorPropertiesNV
:: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result
getPhysicalDeviceCooperativeVectorPropertiesNV :: forall io
. (MonadIO io)
=>
PhysicalDevice
-> io (Result, ("properties" ::: Vector CooperativeVectorPropertiesNV))
getPhysicalDeviceCooperativeVectorPropertiesNV :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
getPhysicalDeviceCooperativeVectorPropertiesNV PhysicalDevice
physicalDevice = IO (Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> io
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> io
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> (ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> io
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> io
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> io
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall a b. (a -> b) -> a -> b
$ do
let vkGetPhysicalDeviceCooperativeVectorPropertiesNVPtr :: FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
vkGetPhysicalDeviceCooperativeVectorPropertiesNVPtr = InstanceCmds
-> FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
pVkGetPhysicalDeviceCooperativeVectorPropertiesNV (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
IO ()
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV) m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
())
-> IO ()
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
vkGetPhysicalDeviceCooperativeVectorPropertiesNVPtr FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
-> FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkGetPhysicalDeviceCooperativeVectorPropertiesNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkGetPhysicalDeviceCooperativeVectorPropertiesNV' :: Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result
vkGetPhysicalDeviceCooperativeVectorPropertiesNV' = FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
-> Ptr PhysicalDevice_T
-> Ptr Word32
-> Ptr CooperativeVectorPropertiesNV
-> IO Result
mkVkGetPhysicalDeviceCooperativeVectorPropertiesNV FunPtr
(Ptr PhysicalDevice_T
-> Ptr Word32 -> Ptr CooperativeVectorPropertiesNV -> IO Result)
vkGetPhysicalDeviceCooperativeVectorPropertiesNVPtr
let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
pPPropertyCount <- ((Ptr Word32
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Ptr Word32)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr Word32
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Ptr Word32))
-> ((Ptr Word32
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
(Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO (Ptr Word32)
-> (Ptr Word32 -> IO ())
-> (Ptr Word32
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall a b c. IO a -> (a -> IO b) -> (a -> IO c) -> IO c
bracket (forall a. Int -> IO (Ptr a)
callocBytes @Word32 Int
4) Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
free
r <- lift $ traceAroundEvent "vkGetPhysicalDeviceCooperativeVectorPropertiesNV" (vkGetPhysicalDeviceCooperativeVectorPropertiesNV'
physicalDevice'
(pPPropertyCount)
(nullPtr))
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pPropertyCount <- lift $ peek @Word32 pPPropertyCount
pPProperties <- ContT $ bracket (callocBytes @CooperativeVectorPropertiesNV ((fromIntegral (pPropertyCount)) * 40)) free
_ <- traverse (\Int
i -> ((()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
())
-> ((()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ContT
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
IO
()
forall a b. (a -> b) -> a -> b
$ Ptr CooperativeVectorPropertiesNV
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall b. Ptr CooperativeVectorPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct (Ptr CooperativeVectorPropertiesNV
pPProperties Ptr CooperativeVectorPropertiesNV
-> Int -> Ptr CooperativeVectorPropertiesNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
40) :: Ptr CooperativeVectorPropertiesNV) (IO (Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ((()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> (()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV))
-> ()
-> IO
(Result, "properties" ::: Vector CooperativeVectorPropertiesNV)
forall a b. (a -> b) -> a -> b
$ ())) [0..(fromIntegral (pPropertyCount)) - 1]
r' <- lift $ traceAroundEvent "vkGetPhysicalDeviceCooperativeVectorPropertiesNV" (vkGetPhysicalDeviceCooperativeVectorPropertiesNV'
physicalDevice'
(pPPropertyCount)
((pPProperties)))
lift $ when (r' < SUCCESS) (throwIO (VulkanException r'))
pPropertyCount' <- lift $ peek @Word32 pPPropertyCount
pProperties' <- lift $ generateM (fromIntegral (pPropertyCount')) (\Int
i -> forall a. FromCStruct a => Ptr a -> IO a
peekCStruct @CooperativeVectorPropertiesNV (((Ptr CooperativeVectorPropertiesNV
pPProperties) Ptr CooperativeVectorPropertiesNV
-> Int -> Ptr CooperativeVectorPropertiesNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
40 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CooperativeVectorPropertiesNV)))
pure $ ((r'), pProperties')
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkConvertCooperativeVectorMatrixNV
:: FunPtr (Ptr Device_T -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result) -> Ptr Device_T -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result
convertCooperativeVectorMatrixNV :: forall io
. (MonadIO io)
=>
Device
->
ConvertCooperativeVectorMatrixInfoNV
-> io (Result)
convertCooperativeVectorMatrixNV :: forall (io :: * -> *).
MonadIO io =>
Device -> ConvertCooperativeVectorMatrixInfoNV -> io Result
convertCooperativeVectorMatrixNV Device
device ConvertCooperativeVectorMatrixInfoNV
info = IO Result -> io Result
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Result -> io Result)
-> (ContT Result IO Result -> IO Result)
-> ContT Result IO Result
-> io Result
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT Result IO Result -> IO Result
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT Result IO Result -> io Result)
-> ContT Result IO Result -> io Result
forall a b. (a -> b) -> a -> b
$ do
let vkConvertCooperativeVectorMatrixNVPtr :: FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
vkConvertCooperativeVectorMatrixNVPtr = DeviceCmds
-> FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
pVkConvertCooperativeVectorMatrixNV (case Device
device of Device{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: Device -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT Result IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT Result m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT Result IO ()) -> IO () -> ContT Result IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
vkConvertCooperativeVectorMatrixNVPtr FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkConvertCooperativeVectorMatrixNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkConvertCooperativeVectorMatrixNV' :: Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result
vkConvertCooperativeVectorMatrixNV' = FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV
-> IO Result
mkVkConvertCooperativeVectorMatrixNV FunPtr
(Ptr Device_T
-> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
vkConvertCooperativeVectorMatrixNVPtr
pInfo <- ((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr ConvertCooperativeVectorMatrixInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr ConvertCooperativeVectorMatrixInfoNV))
-> ((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> IO Result)
-> ContT Result IO (Ptr ConvertCooperativeVectorMatrixInfoNV)
forall a b. (a -> b) -> a -> b
$ ConvertCooperativeVectorMatrixInfoNV
-> (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO Result)
-> IO Result
forall a b. ToCStruct a => a -> (Ptr a -> IO b) -> IO b
forall b.
ConvertCooperativeVectorMatrixInfoNV
-> (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b
withCStruct (ConvertCooperativeVectorMatrixInfoNV
info)
r <- lift $ traceAroundEvent "vkConvertCooperativeVectorMatrixNV" (vkConvertCooperativeVectorMatrixNV'
(deviceHandle (device))
pInfo)
lift $ when (r < SUCCESS) (throwIO (VulkanException r))
pure $ (r)
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
unsafe
#endif
"dynamic" mkVkCmdConvertCooperativeVectorMatrixNV
:: FunPtr (Ptr CommandBuffer_T -> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ()) -> Ptr CommandBuffer_T -> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ()
cmdConvertCooperativeVectorMatrixNV :: forall io
. (MonadIO io)
=>
CommandBuffer
->
("infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV)
-> io ()
cmdConvertCooperativeVectorMatrixNV :: forall (io :: * -> *).
MonadIO io =>
CommandBuffer
-> ("infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV)
-> io ()
cmdConvertCooperativeVectorMatrixNV CommandBuffer
commandBuffer
"infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV
infos = IO () -> io ()
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> io ())
-> (ContT () IO () -> IO ()) -> ContT () IO () -> io ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT () IO () -> IO ()
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT () IO () -> io ()) -> ContT () IO () -> io ()
forall a b. (a -> b) -> a -> b
$ do
let vkCmdConvertCooperativeVectorMatrixNVPtr :: FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
vkCmdConvertCooperativeVectorMatrixNVPtr = DeviceCmds
-> FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
pVkCmdConvertCooperativeVectorMatrixNV (case CommandBuffer
commandBuffer of CommandBuffer{DeviceCmds
deviceCmds :: DeviceCmds
deviceCmds :: CommandBuffer -> DeviceCmds
deviceCmds} -> DeviceCmds
deviceCmds)
IO () -> ContT () IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT () m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT () IO ()) -> IO () -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
unless (FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
vkCmdConvertCooperativeVectorMatrixNVPtr FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
-> FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
IOException -> IO ()
forall e a. (HasCallStack, Exception e) => e -> IO a
throwIO (IOException -> IO ()) -> IOException -> IO ()
forall a b. (a -> b) -> a -> b
$ Maybe Handle
-> IOErrorType
-> String
-> String
-> Maybe CInt
-> Maybe String
-> IOException
IOError Maybe Handle
forall a. Maybe a
Nothing IOErrorType
InvalidArgument String
"" String
"The function pointer for vkCmdConvertCooperativeVectorMatrixNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
let vkCmdConvertCooperativeVectorMatrixNV' :: Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ()
vkCmdConvertCooperativeVectorMatrixNV' = FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
-> Ptr CommandBuffer_T
-> Word32
-> Ptr ConvertCooperativeVectorMatrixInfoNV
-> IO ()
mkVkCmdConvertCooperativeVectorMatrixNV FunPtr
(Ptr CommandBuffer_T
-> Word32 -> Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ())
vkCmdConvertCooperativeVectorMatrixNVPtr
pPInfos <- ((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ()) -> IO ())
-> ContT () IO (Ptr ConvertCooperativeVectorMatrixInfoNV)
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ()) -> IO ())
-> ContT () IO (Ptr ConvertCooperativeVectorMatrixInfoNV))
-> ((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO ()) -> IO ())
-> ContT () IO (Ptr ConvertCooperativeVectorMatrixInfoNV)
forall a b. (a -> b) -> a -> b
$ forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes @ConvertCooperativeVectorMatrixInfoNV ((("infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV) -> Int
forall a. Vector a -> Int
Data.Vector.length ("infos" ::: Vector ConvertCooperativeVectorMatrixInfoNV
infos)) Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
96)
Data.Vector.imapM_ (\Int
i ConvertCooperativeVectorMatrixInfoNV
e -> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO ()) -> IO ()) -> ContT () IO ())
-> ((() -> IO ()) -> IO ()) -> ContT () IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ConvertCooperativeVectorMatrixInfoNV
-> ConvertCooperativeVectorMatrixInfoNV -> IO () -> IO ()
forall b.
Ptr ConvertCooperativeVectorMatrixInfoNV
-> ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct (Ptr ConvertCooperativeVectorMatrixInfoNV
pPInfos Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr ConvertCooperativeVectorMatrixInfoNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` (Int
96 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr ConvertCooperativeVectorMatrixInfoNV) (ConvertCooperativeVectorMatrixInfoNV
e) (IO () -> IO ())
-> ((() -> IO ()) -> IO ()) -> (() -> IO ()) -> IO ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO ()) -> () -> IO ()
forall a b. (a -> b) -> a -> b
$ ())) (infos)
lift $ traceAroundEvent "vkCmdConvertCooperativeVectorMatrixNV" (vkCmdConvertCooperativeVectorMatrixNV'
(commandBufferHandle (commandBuffer))
((fromIntegral (Data.Vector.length $ (infos)) :: Word32))
(pPInfos))
pure $ ()
pattern $mCOMPONENT_TYPE_FLOAT_E4M3_NV :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT_E4M3_NV :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT_E4M3_NV = COMPONENT_TYPE_FLOAT8_E4M3_EXT
pattern $mCOMPONENT_TYPE_FLOAT_E5M2_NV :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT_E5M2_NV :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT_E5M2_NV = COMPONENT_TYPE_FLOAT8_E5M2_EXT
data PhysicalDeviceCooperativeVectorFeaturesNV = PhysicalDeviceCooperativeVectorFeaturesNV
{
PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
cooperativeVector :: Bool
,
PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
cooperativeVectorTraining :: Bool
}
deriving (Typeable, PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
(PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool)
-> (PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool)
-> Eq PhysicalDeviceCooperativeVectorFeaturesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
== :: PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
$c/= :: PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
/= :: PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceCooperativeVectorFeaturesNV)
#endif
deriving instance Show PhysicalDeviceCooperativeVectorFeaturesNV
instance ToCStruct PhysicalDeviceCooperativeVectorFeaturesNV where
withCStruct :: forall b.
PhysicalDeviceCooperativeVectorFeaturesNV
-> (Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b) -> IO b
withCStruct PhysicalDeviceCooperativeVectorFeaturesNV
x Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b
f = Int
-> (Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
24 ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b) -> IO b)
-> (Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p -> Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> IO b -> IO b
forall b.
Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p PhysicalDeviceCooperativeVectorFeaturesNV
x (Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b
f Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p PhysicalDeviceCooperativeVectorFeaturesNV{Bool
cooperativeVector :: PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
cooperativeVectorTraining :: PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
cooperativeVector :: Bool
cooperativeVectorTraining :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeVector))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeVectorTraining))
IO b
f
cStructSize :: Int
cStructSize = Int
24
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct PhysicalDeviceCooperativeVectorFeaturesNV where
peekCStruct :: Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> IO PhysicalDeviceCooperativeVectorFeaturesNV
peekCStruct Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p = do
cooperativeVector <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceCooperativeVectorFeaturesNV
p Ptr PhysicalDeviceCooperativeVectorFeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
cooperativeVectorTraining <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
pure $ PhysicalDeviceCooperativeVectorFeaturesNV
(bool32ToBool cooperativeVector)
(bool32ToBool cooperativeVectorTraining)
instance Storable PhysicalDeviceCooperativeVectorFeaturesNV where
sizeOf :: PhysicalDeviceCooperativeVectorFeaturesNV -> Int
sizeOf ~PhysicalDeviceCooperativeVectorFeaturesNV
_ = Int
24
alignment :: PhysicalDeviceCooperativeVectorFeaturesNV -> Int
alignment ~PhysicalDeviceCooperativeVectorFeaturesNV
_ = Int
8
peek :: Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> IO PhysicalDeviceCooperativeVectorFeaturesNV
peek = Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> IO PhysicalDeviceCooperativeVectorFeaturesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> IO ()
poke Ptr PhysicalDeviceCooperativeVectorFeaturesNV
ptr PhysicalDeviceCooperativeVectorFeaturesNV
poked = Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceCooperativeVectorFeaturesNV
-> PhysicalDeviceCooperativeVectorFeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeVectorFeaturesNV
ptr PhysicalDeviceCooperativeVectorFeaturesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceCooperativeVectorFeaturesNV where
zero :: PhysicalDeviceCooperativeVectorFeaturesNV
zero = Bool -> Bool -> PhysicalDeviceCooperativeVectorFeaturesNV
PhysicalDeviceCooperativeVectorFeaturesNV
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data CooperativeVectorPropertiesNV = CooperativeVectorPropertiesNV
{
CooperativeVectorPropertiesNV -> ComponentTypeKHR
inputType :: ComponentTypeKHR
,
CooperativeVectorPropertiesNV -> ComponentTypeKHR
inputInterpretation :: ComponentTypeKHR
,
CooperativeVectorPropertiesNV -> ComponentTypeKHR
matrixInterpretation :: ComponentTypeKHR
,
CooperativeVectorPropertiesNV -> ComponentTypeKHR
biasInterpretation :: ComponentTypeKHR
,
CooperativeVectorPropertiesNV -> ComponentTypeKHR
resultType :: ComponentTypeKHR
,
CooperativeVectorPropertiesNV -> Bool
transpose :: Bool
}
deriving (Typeable, CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool
(CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool)
-> (CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool)
-> Eq CooperativeVectorPropertiesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool
== :: CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool
$c/= :: CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool
/= :: CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CooperativeVectorPropertiesNV)
#endif
deriving instance Show CooperativeVectorPropertiesNV
instance ToCStruct CooperativeVectorPropertiesNV where
withCStruct :: forall b.
CooperativeVectorPropertiesNV
-> (Ptr CooperativeVectorPropertiesNV -> IO b) -> IO b
withCStruct CooperativeVectorPropertiesNV
x Ptr CooperativeVectorPropertiesNV -> IO b
f = Int -> (Ptr CooperativeVectorPropertiesNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
40 ((Ptr CooperativeVectorPropertiesNV -> IO b) -> IO b)
-> (Ptr CooperativeVectorPropertiesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr CooperativeVectorPropertiesNV
p -> Ptr CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> IO b -> IO b
forall b.
Ptr CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CooperativeVectorPropertiesNV
p CooperativeVectorPropertiesNV
x (Ptr CooperativeVectorPropertiesNV -> IO b
f Ptr CooperativeVectorPropertiesNV
p)
pokeCStruct :: forall b.
Ptr CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> IO b -> IO b
pokeCStruct Ptr CooperativeVectorPropertiesNV
p CooperativeVectorPropertiesNV{Bool
ComponentTypeKHR
inputType :: CooperativeVectorPropertiesNV -> ComponentTypeKHR
inputInterpretation :: CooperativeVectorPropertiesNV -> ComponentTypeKHR
matrixInterpretation :: CooperativeVectorPropertiesNV -> ComponentTypeKHR
biasInterpretation :: CooperativeVectorPropertiesNV -> ComponentTypeKHR
resultType :: CooperativeVectorPropertiesNV -> ComponentTypeKHR
transpose :: CooperativeVectorPropertiesNV -> Bool
inputType :: ComponentTypeKHR
inputInterpretation :: ComponentTypeKHR
matrixInterpretation :: ComponentTypeKHR
biasInterpretation :: ComponentTypeKHR
resultType :: ComponentTypeKHR
transpose :: Bool
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
inputType)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
inputInterpretation)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
matrixInterpretation)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
biasInterpretation)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
resultType)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
transpose))
IO b
f
cStructSize :: Int
cStructSize = Int
40
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr CooperativeVectorPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr CooperativeVectorPropertiesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
IO b
f
instance FromCStruct CooperativeVectorPropertiesNV where
peekCStruct :: Ptr CooperativeVectorPropertiesNV
-> IO CooperativeVectorPropertiesNV
peekCStruct Ptr CooperativeVectorPropertiesNV
p = do
inputType <- forall a. Storable a => Ptr a -> IO a
peek @ComponentTypeKHR ((Ptr CooperativeVectorPropertiesNV
p Ptr CooperativeVectorPropertiesNV -> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ComponentTypeKHR))
inputInterpretation <- peek @ComponentTypeKHR ((p `plusPtr` 20 :: Ptr ComponentTypeKHR))
matrixInterpretation <- peek @ComponentTypeKHR ((p `plusPtr` 24 :: Ptr ComponentTypeKHR))
biasInterpretation <- peek @ComponentTypeKHR ((p `plusPtr` 28 :: Ptr ComponentTypeKHR))
resultType <- peek @ComponentTypeKHR ((p `plusPtr` 32 :: Ptr ComponentTypeKHR))
transpose <- peek @Bool32 ((p `plusPtr` 36 :: Ptr Bool32))
pure $ CooperativeVectorPropertiesNV
inputType
inputInterpretation
matrixInterpretation
biasInterpretation
resultType
(bool32ToBool transpose)
instance Storable CooperativeVectorPropertiesNV where
sizeOf :: CooperativeVectorPropertiesNV -> Int
sizeOf ~CooperativeVectorPropertiesNV
_ = Int
40
alignment :: CooperativeVectorPropertiesNV -> Int
alignment ~CooperativeVectorPropertiesNV
_ = Int
8
peek :: Ptr CooperativeVectorPropertiesNV
-> IO CooperativeVectorPropertiesNV
peek = Ptr CooperativeVectorPropertiesNV
-> IO CooperativeVectorPropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> IO ()
poke Ptr CooperativeVectorPropertiesNV
ptr CooperativeVectorPropertiesNV
poked = Ptr CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> IO () -> IO ()
forall b.
Ptr CooperativeVectorPropertiesNV
-> CooperativeVectorPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CooperativeVectorPropertiesNV
ptr CooperativeVectorPropertiesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero CooperativeVectorPropertiesNV where
zero :: CooperativeVectorPropertiesNV
zero = ComponentTypeKHR
-> ComponentTypeKHR
-> ComponentTypeKHR
-> ComponentTypeKHR
-> ComponentTypeKHR
-> Bool
-> CooperativeVectorPropertiesNV
CooperativeVectorPropertiesNV
ComponentTypeKHR
forall a. Zero a => a
zero
ComponentTypeKHR
forall a. Zero a => a
zero
ComponentTypeKHR
forall a. Zero a => a
zero
ComponentTypeKHR
forall a. Zero a => a
zero
ComponentTypeKHR
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
data PhysicalDeviceCooperativeVectorPropertiesNV = PhysicalDeviceCooperativeVectorPropertiesNV
{
PhysicalDeviceCooperativeVectorPropertiesNV -> ShaderStageFlags
cooperativeVectorSupportedStages :: ShaderStageFlags
,
PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
cooperativeVectorTrainingFloat16Accumulation :: Bool
,
PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
cooperativeVectorTrainingFloat32Accumulation :: Bool
,
PhysicalDeviceCooperativeVectorPropertiesNV -> Word32
maxCooperativeVectorComponents :: Word32
}
deriving (Typeable, PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
(PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool)
-> (PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool)
-> Eq PhysicalDeviceCooperativeVectorPropertiesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
== :: PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
$c/= :: PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
/= :: PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceCooperativeVectorPropertiesNV)
#endif
deriving instance Show PhysicalDeviceCooperativeVectorPropertiesNV
instance ToCStruct PhysicalDeviceCooperativeVectorPropertiesNV where
withCStruct :: forall b.
PhysicalDeviceCooperativeVectorPropertiesNV
-> (Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceCooperativeVectorPropertiesNV
x Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b
f = Int
-> (Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b) -> IO b)
-> (Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p -> Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> IO b -> IO b
forall b.
Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p PhysicalDeviceCooperativeVectorPropertiesNV
x (Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b
f Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p)
pokeCStruct :: forall b.
Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p PhysicalDeviceCooperativeVectorPropertiesNV{Bool
Word32
ShaderStageFlags
cooperativeVectorSupportedStages :: PhysicalDeviceCooperativeVectorPropertiesNV -> ShaderStageFlags
cooperativeVectorTrainingFloat16Accumulation :: PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
cooperativeVectorTrainingFloat32Accumulation :: PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
maxCooperativeVectorComponents :: PhysicalDeviceCooperativeVectorPropertiesNV -> Word32
cooperativeVectorSupportedStages :: ShaderStageFlags
cooperativeVectorTrainingFloat16Accumulation :: Bool
cooperativeVectorTrainingFloat32Accumulation :: Bool
maxCooperativeVectorComponents :: Word32
..} IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ShaderStageFlags -> ShaderStageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr ShaderStageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderStageFlags)) (ShaderStageFlags
cooperativeVectorSupportedStages)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeVectorTrainingFloat16Accumulation))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeVectorTrainingFloat32Accumulation))
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
maxCooperativeVectorComponents)
IO b
f
cStructSize :: Int
cStructSize = Int
32
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceCooperativeVectorPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p IO b
f = do
Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV)
Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
Ptr ShaderStageFlags -> ShaderStageFlags -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr ShaderStageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderStageFlags)) (ShaderStageFlags
forall a. Zero a => a
zero)
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO b
f
instance FromCStruct PhysicalDeviceCooperativeVectorPropertiesNV where
peekCStruct :: Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> IO PhysicalDeviceCooperativeVectorPropertiesNV
peekCStruct Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p = do
cooperativeVectorSupportedStages <- forall a. Storable a => Ptr a -> IO a
peek @ShaderStageFlags ((Ptr PhysicalDeviceCooperativeVectorPropertiesNV
p Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> Int -> Ptr ShaderStageFlags
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr ShaderStageFlags))
cooperativeVectorTrainingFloat16Accumulation <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
cooperativeVectorTrainingFloat32Accumulation <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
maxCooperativeVectorComponents <- peek @Word32 ((p `plusPtr` 28 :: Ptr Word32))
pure $ PhysicalDeviceCooperativeVectorPropertiesNV
cooperativeVectorSupportedStages
(bool32ToBool cooperativeVectorTrainingFloat16Accumulation)
(bool32ToBool cooperativeVectorTrainingFloat32Accumulation)
maxCooperativeVectorComponents
instance Storable PhysicalDeviceCooperativeVectorPropertiesNV where
sizeOf :: PhysicalDeviceCooperativeVectorPropertiesNV -> Int
sizeOf ~PhysicalDeviceCooperativeVectorPropertiesNV
_ = Int
32
alignment :: PhysicalDeviceCooperativeVectorPropertiesNV -> Int
alignment ~PhysicalDeviceCooperativeVectorPropertiesNV
_ = Int
8
peek :: Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> IO PhysicalDeviceCooperativeVectorPropertiesNV
peek = Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> IO PhysicalDeviceCooperativeVectorPropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
poke :: Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> IO ()
poke Ptr PhysicalDeviceCooperativeVectorPropertiesNV
ptr PhysicalDeviceCooperativeVectorPropertiesNV
poked = Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceCooperativeVectorPropertiesNV
-> PhysicalDeviceCooperativeVectorPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeVectorPropertiesNV
ptr PhysicalDeviceCooperativeVectorPropertiesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())
instance Zero PhysicalDeviceCooperativeVectorPropertiesNV where
zero :: PhysicalDeviceCooperativeVectorPropertiesNV
zero = ShaderStageFlags
-> Bool
-> Bool
-> Word32
-> PhysicalDeviceCooperativeVectorPropertiesNV
PhysicalDeviceCooperativeVectorPropertiesNV
ShaderStageFlags
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Bool
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
data ConvertCooperativeVectorMatrixInfoNV = ConvertCooperativeVectorMatrixInfoNV
{
ConvertCooperativeVectorMatrixInfoNV -> Word64
srcSize :: Word64
,
ConvertCooperativeVectorMatrixInfoNV -> DeviceOrHostAddressConstKHR
srcData :: DeviceOrHostAddressConstKHR
,
ConvertCooperativeVectorMatrixInfoNV -> Ptr CSize
dstSize :: Ptr CSize
,
ConvertCooperativeVectorMatrixInfoNV -> DeviceOrHostAddressKHR
dstData :: DeviceOrHostAddressKHR
,
ConvertCooperativeVectorMatrixInfoNV -> ComponentTypeKHR
srcComponentType :: ComponentTypeKHR
,
ConvertCooperativeVectorMatrixInfoNV -> ComponentTypeKHR
dstComponentType :: ComponentTypeKHR
,
ConvertCooperativeVectorMatrixInfoNV -> Word32
numRows :: Word32
,
ConvertCooperativeVectorMatrixInfoNV -> Word32
numColumns :: Word32
,
ConvertCooperativeVectorMatrixInfoNV
-> CooperativeVectorMatrixLayoutNV
srcLayout :: CooperativeVectorMatrixLayoutNV
,
ConvertCooperativeVectorMatrixInfoNV -> Word64
srcStride :: Word64
,
ConvertCooperativeVectorMatrixInfoNV
-> CooperativeVectorMatrixLayoutNV
dstLayout :: CooperativeVectorMatrixLayoutNV
,
ConvertCooperativeVectorMatrixInfoNV -> Word64
dstStride :: Word64
}
deriving (Typeable)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (ConvertCooperativeVectorMatrixInfoNV)
#endif
deriving instance Show ConvertCooperativeVectorMatrixInfoNV
instance ToCStruct ConvertCooperativeVectorMatrixInfoNV where
withCStruct :: forall b.
ConvertCooperativeVectorMatrixInfoNV
-> (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b
withCStruct ConvertCooperativeVectorMatrixInfoNV
x Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b
f = Int -> (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
96 ((Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b)
-> (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr ConvertCooperativeVectorMatrixInfoNV
p -> Ptr ConvertCooperativeVectorMatrixInfoNV
-> ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b
forall b.
Ptr ConvertCooperativeVectorMatrixInfoNV
-> ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr ConvertCooperativeVectorMatrixInfoNV
p ConvertCooperativeVectorMatrixInfoNV
x (Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b
f Ptr ConvertCooperativeVectorMatrixInfoNV
p)
pokeCStruct :: forall b.
Ptr ConvertCooperativeVectorMatrixInfoNV
-> ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b
pokeCStruct Ptr ConvertCooperativeVectorMatrixInfoNV
p ConvertCooperativeVectorMatrixInfoNV{Word32
Word64
Ptr CSize
ComponentTypeKHR
DeviceOrHostAddressConstKHR
DeviceOrHostAddressKHR
CooperativeVectorMatrixLayoutNV
srcSize :: ConvertCooperativeVectorMatrixInfoNV -> Word64
srcData :: ConvertCooperativeVectorMatrixInfoNV -> DeviceOrHostAddressConstKHR
dstSize :: ConvertCooperativeVectorMatrixInfoNV -> Ptr CSize
dstData :: ConvertCooperativeVectorMatrixInfoNV -> DeviceOrHostAddressKHR
srcComponentType :: ConvertCooperativeVectorMatrixInfoNV -> ComponentTypeKHR
dstComponentType :: ConvertCooperativeVectorMatrixInfoNV -> ComponentTypeKHR
numRows :: ConvertCooperativeVectorMatrixInfoNV -> Word32
numColumns :: ConvertCooperativeVectorMatrixInfoNV -> Word32
srcLayout :: ConvertCooperativeVectorMatrixInfoNV
-> CooperativeVectorMatrixLayoutNV
srcStride :: ConvertCooperativeVectorMatrixInfoNV -> Word64
dstLayout :: ConvertCooperativeVectorMatrixInfoNV
-> CooperativeVectorMatrixLayoutNV
dstStride :: ConvertCooperativeVectorMatrixInfoNV -> Word64
srcSize :: Word64
srcData :: DeviceOrHostAddressConstKHR
dstSize :: Ptr CSize
dstData :: DeviceOrHostAddressKHR
srcComponentType :: ComponentTypeKHR
dstComponentType :: ComponentTypeKHR
numRows :: Word32
numColumns :: Word32
srcLayout :: CooperativeVectorMatrixLayoutNV
srcStride :: Word64
dstLayout :: CooperativeVectorMatrixLayoutNV
dstStride :: Word64
..} IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
srcSize))
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall b.
Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
srcData) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CSize) -> Ptr CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr (Ptr CSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CSize))) (Ptr CSize
dstSize)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall b.
Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceOrHostAddressKHR)) (DeviceOrHostAddressKHR
dstData) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
srcComponentType)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
dstComponentType)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Word32
numRows)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (Word32
numColumns)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr CooperativeVectorMatrixLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CooperativeVectorMatrixLayoutNV)) (CooperativeVectorMatrixLayoutNV
srcLayout)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
srcStride))
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr CooperativeVectorMatrixLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CooperativeVectorMatrixLayoutNV)) (CooperativeVectorMatrixLayoutNV
dstLayout)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
dstStride))
IO b -> ContT b IO b
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
cStructSize :: Int
cStructSize = Int
96
cStructAlignment :: Int
cStructAlignment = Int
8
pokeZeroCStruct :: forall b. Ptr ConvertCooperativeVectorMatrixInfoNV -> IO b -> IO b
pokeZeroCStruct Ptr ConvertCooperativeVectorMatrixInfoNV
p IO b
f = ContT b IO b -> IO b
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT b IO b -> IO b) -> ContT b IO b -> IO b
forall a b. (a -> b) -> a -> b
$ do
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
forall a. Zero a => a
zero))
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall b.
Ptr DeviceOrHostAddressConstKHR
-> DeviceOrHostAddressConstKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr DeviceOrHostAddressConstKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr DeviceOrHostAddressConstKHR)) (DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr (Ptr CSize) -> Ptr CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr (Ptr CSize)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr (Ptr CSize))) (Ptr CSize
forall a. Zero a => a
zero)
((() -> IO b) -> IO b) -> ContT b IO ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((() -> IO b) -> IO b) -> ContT b IO ())
-> ((() -> IO b) -> IO b) -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall b.
Ptr DeviceOrHostAddressKHR
-> DeviceOrHostAddressKHR -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr DeviceOrHostAddressKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr DeviceOrHostAddressKHR)) (DeviceOrHostAddressKHR
forall a. Zero a => a
zero) (IO b -> IO b) -> ((() -> IO b) -> IO b) -> (() -> IO b) -> IO b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((() -> IO b) -> () -> IO b
forall a b. (a -> b) -> a -> b
$ ())
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
56 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
60 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr CooperativeVectorMatrixLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64 :: Ptr CooperativeVectorMatrixLayoutNV)) (CooperativeVectorMatrixLayoutNV
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
72 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
forall a. Zero a => a
zero))
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV
-> Int -> Ptr CooperativeVectorMatrixLayoutNV
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
80 :: Ptr CooperativeVectorMatrixLayoutNV)) (CooperativeVectorMatrixLayoutNV
forall a. Zero a => a
zero)
IO () -> ContT b IO ()
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO () -> ContT b IO ()) -> IO () -> ContT b IO ()
forall a b. (a -> b) -> a -> b
$ Ptr CSize -> CSize -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr ConvertCooperativeVectorMatrixInfoNV
p Ptr ConvertCooperativeVectorMatrixInfoNV -> Int -> Ptr CSize
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
88 :: Ptr CSize)) (Word64 -> CSize
CSize (Word64
forall a. Zero a => a
zero))
IO b -> ContT b IO b
forall (m :: * -> *) a. Monad m => m a -> ContT b m a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO b -> ContT b IO b) -> IO b -> ContT b IO b
forall a b. (a -> b) -> a -> b
$ IO b
f
instance Zero ConvertCooperativeVectorMatrixInfoNV where
zero :: ConvertCooperativeVectorMatrixInfoNV
zero = Word64
-> DeviceOrHostAddressConstKHR
-> Ptr CSize
-> DeviceOrHostAddressKHR
-> ComponentTypeKHR
-> ComponentTypeKHR
-> Word32
-> Word32
-> CooperativeVectorMatrixLayoutNV
-> Word64
-> CooperativeVectorMatrixLayoutNV
-> Word64
-> ConvertCooperativeVectorMatrixInfoNV
ConvertCooperativeVectorMatrixInfoNV
Word64
forall a. Zero a => a
zero
DeviceOrHostAddressConstKHR
forall a. Zero a => a
zero
Ptr CSize
forall a. Zero a => a
zero
DeviceOrHostAddressKHR
forall a. Zero a => a
zero
ComponentTypeKHR
forall a. Zero a => a
zero
ComponentTypeKHR
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
Word32
forall a. Zero a => a
zero
CooperativeVectorMatrixLayoutNV
forall a. Zero a => a
zero
Word64
forall a. Zero a => a
zero
CooperativeVectorMatrixLayoutNV
forall a. Zero a => a
zero
Word64
forall a. Zero a => a
zero
newtype ComponentTypeKHR = ComponentTypeKHR Int32
deriving newtype (ComponentTypeKHR -> ComponentTypeKHR -> Bool
(ComponentTypeKHR -> ComponentTypeKHR -> Bool)
-> (ComponentTypeKHR -> ComponentTypeKHR -> Bool)
-> Eq ComponentTypeKHR
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
== :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
$c/= :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
/= :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
Eq, Eq ComponentTypeKHR
Eq ComponentTypeKHR =>
(ComponentTypeKHR -> ComponentTypeKHR -> Ordering)
-> (ComponentTypeKHR -> ComponentTypeKHR -> Bool)
-> (ComponentTypeKHR -> ComponentTypeKHR -> Bool)
-> (ComponentTypeKHR -> ComponentTypeKHR -> Bool)
-> (ComponentTypeKHR -> ComponentTypeKHR -> Bool)
-> (ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR)
-> (ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR)
-> Ord ComponentTypeKHR
ComponentTypeKHR -> ComponentTypeKHR -> Bool
ComponentTypeKHR -> ComponentTypeKHR -> Ordering
ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR
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 :: ComponentTypeKHR -> ComponentTypeKHR -> Ordering
compare :: ComponentTypeKHR -> ComponentTypeKHR -> Ordering
$c< :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
< :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
$c<= :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
<= :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
$c> :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
> :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
$c>= :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
>= :: ComponentTypeKHR -> ComponentTypeKHR -> Bool
$cmax :: ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR
max :: ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR
$cmin :: ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR
min :: ComponentTypeKHR -> ComponentTypeKHR -> ComponentTypeKHR
Ord, Ptr ComponentTypeKHR -> IO ComponentTypeKHR
Ptr ComponentTypeKHR -> Int -> IO ComponentTypeKHR
Ptr ComponentTypeKHR -> Int -> ComponentTypeKHR -> IO ()
Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
ComponentTypeKHR -> Int
(ComponentTypeKHR -> Int)
-> (ComponentTypeKHR -> Int)
-> (Ptr ComponentTypeKHR -> Int -> IO ComponentTypeKHR)
-> (Ptr ComponentTypeKHR -> Int -> ComponentTypeKHR -> IO ())
-> (forall b. Ptr b -> Int -> IO ComponentTypeKHR)
-> (forall b. Ptr b -> Int -> ComponentTypeKHR -> IO ())
-> (Ptr ComponentTypeKHR -> IO ComponentTypeKHR)
-> (Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ())
-> Storable ComponentTypeKHR
forall b. Ptr b -> Int -> IO ComponentTypeKHR
forall b. Ptr b -> Int -> ComponentTypeKHR -> 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 :: ComponentTypeKHR -> Int
sizeOf :: ComponentTypeKHR -> Int
$calignment :: ComponentTypeKHR -> Int
alignment :: ComponentTypeKHR -> Int
$cpeekElemOff :: Ptr ComponentTypeKHR -> Int -> IO ComponentTypeKHR
peekElemOff :: Ptr ComponentTypeKHR -> Int -> IO ComponentTypeKHR
$cpokeElemOff :: Ptr ComponentTypeKHR -> Int -> ComponentTypeKHR -> IO ()
pokeElemOff :: Ptr ComponentTypeKHR -> Int -> ComponentTypeKHR -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ComponentTypeKHR
peekByteOff :: forall b. Ptr b -> Int -> IO ComponentTypeKHR
$cpokeByteOff :: forall b. Ptr b -> Int -> ComponentTypeKHR -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> ComponentTypeKHR -> IO ()
$cpeek :: Ptr ComponentTypeKHR -> IO ComponentTypeKHR
peek :: Ptr ComponentTypeKHR -> IO ComponentTypeKHR
$cpoke :: Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
poke :: Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
Storable, ComponentTypeKHR
ComponentTypeKHR -> Zero ComponentTypeKHR
forall a. a -> Zero a
$czero :: ComponentTypeKHR
zero :: ComponentTypeKHR
Zero)
pattern $mCOMPONENT_TYPE_FLOAT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT16_KHR = ComponentTypeKHR 0
pattern $mCOMPONENT_TYPE_FLOAT32_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT32_KHR :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT32_KHR = ComponentTypeKHR 1
pattern $mCOMPONENT_TYPE_FLOAT64_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT64_KHR :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT64_KHR = ComponentTypeKHR 2
pattern $mCOMPONENT_TYPE_SINT8_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT8_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT8_KHR = ComponentTypeKHR 3
pattern $mCOMPONENT_TYPE_SINT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT16_KHR = ComponentTypeKHR 4
pattern $mCOMPONENT_TYPE_SINT32_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT32_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT32_KHR = ComponentTypeKHR 5
pattern $mCOMPONENT_TYPE_SINT64_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT64_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT64_KHR = ComponentTypeKHR 6
pattern $mCOMPONENT_TYPE_UINT8_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT8_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT8_KHR = ComponentTypeKHR 7
pattern $mCOMPONENT_TYPE_UINT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT16_KHR = ComponentTypeKHR 8
pattern $mCOMPONENT_TYPE_UINT32_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT32_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT32_KHR = ComponentTypeKHR 9
pattern $mCOMPONENT_TYPE_UINT64_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT64_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT64_KHR = ComponentTypeKHR 10
pattern $mCOMPONENT_TYPE_FLOAT8_E5M2_EXT :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT8_E5M2_EXT :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT8_E5M2_EXT = ComponentTypeKHR 1000491003
pattern $mCOMPONENT_TYPE_FLOAT8_E4M3_EXT :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT8_E4M3_EXT :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT8_E4M3_EXT = ComponentTypeKHR 1000491002
pattern $mCOMPONENT_TYPE_UINT8_PACKED_NV :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT8_PACKED_NV :: ComponentTypeKHR
COMPONENT_TYPE_UINT8_PACKED_NV = ComponentTypeKHR 1000491001
pattern $mCOMPONENT_TYPE_SINT8_PACKED_NV :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT8_PACKED_NV :: ComponentTypeKHR
COMPONENT_TYPE_SINT8_PACKED_NV = ComponentTypeKHR 1000491000
pattern $mCOMPONENT_TYPE_BFLOAT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_BFLOAT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_BFLOAT16_KHR = ComponentTypeKHR 1000141000
{-# COMPLETE
COMPONENT_TYPE_FLOAT16_KHR
, COMPONENT_TYPE_FLOAT32_KHR
, COMPONENT_TYPE_FLOAT64_KHR
, COMPONENT_TYPE_SINT8_KHR
, COMPONENT_TYPE_SINT16_KHR
, COMPONENT_TYPE_SINT32_KHR
, COMPONENT_TYPE_SINT64_KHR
, COMPONENT_TYPE_UINT8_KHR
, COMPONENT_TYPE_UINT16_KHR
, COMPONENT_TYPE_UINT32_KHR
, COMPONENT_TYPE_UINT64_KHR
, COMPONENT_TYPE_FLOAT8_E5M2_EXT
, COMPONENT_TYPE_FLOAT8_E4M3_EXT
, COMPONENT_TYPE_UINT8_PACKED_NV
, COMPONENT_TYPE_SINT8_PACKED_NV
, COMPONENT_TYPE_BFLOAT16_KHR ::
ComponentTypeKHR
#-}
conNameComponentTypeKHR :: String
conNameComponentTypeKHR :: String
conNameComponentTypeKHR = String
"ComponentTypeKHR"
enumPrefixComponentTypeKHR :: String
enumPrefixComponentTypeKHR :: String
enumPrefixComponentTypeKHR = String
"COMPONENT_TYPE_"
showTableComponentTypeKHR :: [(ComponentTypeKHR, String)]
showTableComponentTypeKHR :: [(ComponentTypeKHR, String)]
showTableComponentTypeKHR =
[ (ComponentTypeKHR
COMPONENT_TYPE_FLOAT16_KHR, String
"FLOAT16_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_FLOAT32_KHR, String
"FLOAT32_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_FLOAT64_KHR, String
"FLOAT64_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_SINT8_KHR, String
"SINT8_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_SINT16_KHR, String
"SINT16_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_SINT32_KHR, String
"SINT32_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_SINT64_KHR, String
"SINT64_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_UINT8_KHR, String
"UINT8_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_UINT16_KHR, String
"UINT16_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_UINT32_KHR, String
"UINT32_KHR")
, (ComponentTypeKHR
COMPONENT_TYPE_UINT64_KHR, String
"UINT64_KHR")
,
( ComponentTypeKHR
COMPONENT_TYPE_FLOAT8_E5M2_EXT
, String
"FLOAT8_E5M2_EXT"
)
,
( ComponentTypeKHR
COMPONENT_TYPE_FLOAT8_E4M3_EXT
, String
"FLOAT8_E4M3_EXT"
)
,
( ComponentTypeKHR
COMPONENT_TYPE_UINT8_PACKED_NV
, String
"UINT8_PACKED_NV"
)
,
( ComponentTypeKHR
COMPONENT_TYPE_SINT8_PACKED_NV
, String
"SINT8_PACKED_NV"
)
, (ComponentTypeKHR
COMPONENT_TYPE_BFLOAT16_KHR, String
"BFLOAT16_KHR")
]
instance Show ComponentTypeKHR where
showsPrec :: Int -> ComponentTypeKHR -> ShowS
showsPrec =
String
-> [(ComponentTypeKHR, String)]
-> String
-> (ComponentTypeKHR -> Int32)
-> (Int32 -> ShowS)
-> Int
-> ComponentTypeKHR
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixComponentTypeKHR
[(ComponentTypeKHR, String)]
showTableComponentTypeKHR
String
conNameComponentTypeKHR
(\(ComponentTypeKHR Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read ComponentTypeKHR where
readPrec :: ReadPrec ComponentTypeKHR
readPrec =
String
-> [(ComponentTypeKHR, String)]
-> String
-> (Int32 -> ComponentTypeKHR)
-> ReadPrec ComponentTypeKHR
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixComponentTypeKHR
[(ComponentTypeKHR, String)]
showTableComponentTypeKHR
String
conNameComponentTypeKHR
Int32 -> ComponentTypeKHR
ComponentTypeKHR
newtype CooperativeVectorMatrixLayoutNV = CooperativeVectorMatrixLayoutNV Int32
deriving newtype (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
(CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool)
-> Eq CooperativeVectorMatrixLayoutNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
== :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
$c/= :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
/= :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
Eq, Eq CooperativeVectorMatrixLayoutNV
Eq CooperativeVectorMatrixLayoutNV =>
(CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Ordering)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV)
-> (CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV)
-> Ord CooperativeVectorMatrixLayoutNV
CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Ordering
CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
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 :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Ordering
compare :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Ordering
$c< :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
< :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
$c<= :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
<= :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
$c> :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
> :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
$c>= :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
>= :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> Bool
$cmax :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
max :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
$cmin :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
min :: CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV
Ord, Ptr CooperativeVectorMatrixLayoutNV
-> IO CooperativeVectorMatrixLayoutNV
Ptr CooperativeVectorMatrixLayoutNV
-> Int -> IO CooperativeVectorMatrixLayoutNV
Ptr CooperativeVectorMatrixLayoutNV
-> Int -> CooperativeVectorMatrixLayoutNV -> IO ()
Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
CooperativeVectorMatrixLayoutNV -> Int
(CooperativeVectorMatrixLayoutNV -> Int)
-> (CooperativeVectorMatrixLayoutNV -> Int)
-> (Ptr CooperativeVectorMatrixLayoutNV
-> Int -> IO CooperativeVectorMatrixLayoutNV)
-> (Ptr CooperativeVectorMatrixLayoutNV
-> Int -> CooperativeVectorMatrixLayoutNV -> IO ())
-> (forall b. Ptr b -> Int -> IO CooperativeVectorMatrixLayoutNV)
-> (forall b.
Ptr b -> Int -> CooperativeVectorMatrixLayoutNV -> IO ())
-> (Ptr CooperativeVectorMatrixLayoutNV
-> IO CooperativeVectorMatrixLayoutNV)
-> (Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ())
-> Storable CooperativeVectorMatrixLayoutNV
forall b. Ptr b -> Int -> IO CooperativeVectorMatrixLayoutNV
forall b. Ptr b -> Int -> CooperativeVectorMatrixLayoutNV -> 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 :: CooperativeVectorMatrixLayoutNV -> Int
sizeOf :: CooperativeVectorMatrixLayoutNV -> Int
$calignment :: CooperativeVectorMatrixLayoutNV -> Int
alignment :: CooperativeVectorMatrixLayoutNV -> Int
$cpeekElemOff :: Ptr CooperativeVectorMatrixLayoutNV
-> Int -> IO CooperativeVectorMatrixLayoutNV
peekElemOff :: Ptr CooperativeVectorMatrixLayoutNV
-> Int -> IO CooperativeVectorMatrixLayoutNV
$cpokeElemOff :: Ptr CooperativeVectorMatrixLayoutNV
-> Int -> CooperativeVectorMatrixLayoutNV -> IO ()
pokeElemOff :: Ptr CooperativeVectorMatrixLayoutNV
-> Int -> CooperativeVectorMatrixLayoutNV -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO CooperativeVectorMatrixLayoutNV
peekByteOff :: forall b. Ptr b -> Int -> IO CooperativeVectorMatrixLayoutNV
$cpokeByteOff :: forall b. Ptr b -> Int -> CooperativeVectorMatrixLayoutNV -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> CooperativeVectorMatrixLayoutNV -> IO ()
$cpeek :: Ptr CooperativeVectorMatrixLayoutNV
-> IO CooperativeVectorMatrixLayoutNV
peek :: Ptr CooperativeVectorMatrixLayoutNV
-> IO CooperativeVectorMatrixLayoutNV
$cpoke :: Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
poke :: Ptr CooperativeVectorMatrixLayoutNV
-> CooperativeVectorMatrixLayoutNV -> IO ()
Storable, CooperativeVectorMatrixLayoutNV
CooperativeVectorMatrixLayoutNV
-> Zero CooperativeVectorMatrixLayoutNV
forall a. a -> Zero a
$czero :: CooperativeVectorMatrixLayoutNV
zero :: CooperativeVectorMatrixLayoutNV
Zero)
pattern $mCOOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV :: forall {r}.
CooperativeVectorMatrixLayoutNV
-> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV :: CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV = CooperativeVectorMatrixLayoutNV 0
pattern $mCOOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV :: forall {r}.
CooperativeVectorMatrixLayoutNV
-> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV :: CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV = CooperativeVectorMatrixLayoutNV 1
pattern $mCOOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV :: forall {r}.
CooperativeVectorMatrixLayoutNV
-> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV :: CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV = CooperativeVectorMatrixLayoutNV 2
pattern $mCOOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV :: forall {r}.
CooperativeVectorMatrixLayoutNV
-> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV :: CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV = CooperativeVectorMatrixLayoutNV 3
{-# COMPLETE
COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV
, COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV
, COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV
, COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV ::
CooperativeVectorMatrixLayoutNV
#-}
conNameCooperativeVectorMatrixLayoutNV :: String
conNameCooperativeVectorMatrixLayoutNV :: String
conNameCooperativeVectorMatrixLayoutNV = String
"CooperativeVectorMatrixLayoutNV"
enumPrefixCooperativeVectorMatrixLayoutNV :: String
enumPrefixCooperativeVectorMatrixLayoutNV :: String
enumPrefixCooperativeVectorMatrixLayoutNV = String
"COOPERATIVE_VECTOR_MATRIX_LAYOUT_"
showTableCooperativeVectorMatrixLayoutNV :: [(CooperativeVectorMatrixLayoutNV, String)]
showTableCooperativeVectorMatrixLayoutNV :: [(CooperativeVectorMatrixLayoutNV, String)]
showTableCooperativeVectorMatrixLayoutNV =
[
( CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV
, String
"ROW_MAJOR_NV"
)
,
( CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV
, String
"COLUMN_MAJOR_NV"
)
,
( CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV
, String
"INFERENCING_OPTIMAL_NV"
)
,
( CooperativeVectorMatrixLayoutNV
COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV
, String
"TRAINING_OPTIMAL_NV"
)
]
instance Show CooperativeVectorMatrixLayoutNV where
showsPrec :: Int -> CooperativeVectorMatrixLayoutNV -> ShowS
showsPrec =
String
-> [(CooperativeVectorMatrixLayoutNV, String)]
-> String
-> (CooperativeVectorMatrixLayoutNV -> Int32)
-> (Int32 -> ShowS)
-> Int
-> CooperativeVectorMatrixLayoutNV
-> ShowS
forall a i.
Eq a =>
String
-> [(a, String)]
-> String
-> (a -> i)
-> (i -> ShowS)
-> Int
-> a
-> ShowS
enumShowsPrec
String
enumPrefixCooperativeVectorMatrixLayoutNV
[(CooperativeVectorMatrixLayoutNV, String)]
showTableCooperativeVectorMatrixLayoutNV
String
conNameCooperativeVectorMatrixLayoutNV
(\(CooperativeVectorMatrixLayoutNV Int32
x) -> Int32
x)
(Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec Int
11)
instance Read CooperativeVectorMatrixLayoutNV where
readPrec :: ReadPrec CooperativeVectorMatrixLayoutNV
readPrec =
String
-> [(CooperativeVectorMatrixLayoutNV, String)]
-> String
-> (Int32 -> CooperativeVectorMatrixLayoutNV)
-> ReadPrec CooperativeVectorMatrixLayoutNV
forall i a.
Read i =>
String -> [(a, String)] -> String -> (i -> a) -> ReadPrec a
enumReadPrec
String
enumPrefixCooperativeVectorMatrixLayoutNV
[(CooperativeVectorMatrixLayoutNV, String)]
showTableCooperativeVectorMatrixLayoutNV
String
conNameCooperativeVectorMatrixLayoutNV
Int32 -> CooperativeVectorMatrixLayoutNV
CooperativeVectorMatrixLayoutNV
type NV_COOPERATIVE_VECTOR_SPEC_VERSION = 4
pattern NV_COOPERATIVE_VECTOR_SPEC_VERSION :: forall a . Integral a => a
pattern $mNV_COOPERATIVE_VECTOR_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_COOPERATIVE_VECTOR_SPEC_VERSION :: forall a. Integral a => a
NV_COOPERATIVE_VECTOR_SPEC_VERSION = 4
type NV_COOPERATIVE_VECTOR_EXTENSION_NAME = "VK_NV_cooperative_vector"
pattern NV_COOPERATIVE_VECTOR_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mNV_COOPERATIVE_VECTOR_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_COOPERATIVE_VECTOR_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
NV_COOPERATIVE_VECTOR_EXTENSION_NAME = "VK_NV_cooperative_vector"