{-# language CPP #-}
-- | = Name
--
-- VK_NV_cooperative_matrix2 - device extension
--
-- = VK_NV_cooperative_matrix2
--
-- [__Name String__]
--     @VK_NV_cooperative_matrix2@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     594
--
-- [__Revision__]
--     1
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_cooperative_matrix VK_KHR_cooperative_matrix>
--
-- [__SPIR-V Dependencies__]
--
--     -   <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_cooperative_matrix2.html SPV_NV_cooperative_matrix2>
--
--     -   <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_tensor_addressing.html SPV_NV_tensor_addressing>
--
-- [__Contact__]
--
--     -   Jeff Bolz
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_cooperative_matrix2] @jeffbolznv%0A*Here describe the issue or question you have about the VK_NV_cooperative_matrix2 extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_NV_cooperative_matrix2.adoc VK_NV_cooperative_matrix2>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2024-08-01
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension provides API support for
--         <https://github.com/KhronosGroup/GLSL/blob/main/extensions/nv/GLSL_NV_cooperative_matrix2.txt GLSL_NV_cooperative_matrix2>
--
-- [__Contributors__]
--
--     -   Jeff Bolz, NVIDIA
--
--     -   Karthik Vaidyanathan, NVIDIA
--
-- == Description
--
-- This extension adds several new features building on the cooperative
-- matrix types added in VK_KHR_cooperative_matrix. The goal is to add and
-- accelerate features beyond just simple GEMM kernels, including adding
-- support for type\/use conversions, reductions, per-element operations,
-- and tensor addressing, and also to improve usability and out-of-the-box
-- performance by adding support for more flexible matrix sizes, and
-- workgroup scope matrices with compiler-managed staging through shared
-- memory.
--
-- The new functionality is defined by the
-- <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_tensor_addressing.html SPV_NV_tensor_addressing>
-- and
-- <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_cooperative_matrix2.html SPV_NV_cooperative_matrix2>
-- SPIR-V extensions and can be used with the
-- <https://github.com/KhronosGroup/GLSL/blob/main/extensions/nv/GLSL_NV_cooperative_matrix2.txt GLSL_NV_cooperative_matrix2>
-- GLSL extension.
--
-- This extension includes support for enumerating the matrix types and
-- dimensions that are supported by the implementation, and which specific
-- features are supported.
--
-- == New Commands
--
-- -   'getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV'
--
-- == New Structures
--
-- -   'CooperativeMatrixFlexibleDimensionsPropertiesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceCooperativeMatrix2FeaturesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceCooperativeMatrix2PropertiesNV'
--
-- == New Enum Constants
--
-- -   'NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME'
--
-- -   'NV_COOPERATIVE_MATRIX_2_SPEC_VERSION'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV'
--
-- == New SPIR-V Capabilities
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-TensorAddressingNV TensorAddressingNV>
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-CooperativeMatrixReductionsNV CooperativeMatrixReductionsNV>
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-CooperativeMatrixConversionsNV CooperativeMatrixConversionsNV>
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-CooperativeMatrixPerElementOperationsNV CooperativeMatrixPerElementOperationsNV>
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-CooperativeMatrixTensorAddressingNV CooperativeMatrixTensorAddressingNV>
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-CooperativeMatrixBlockLoadsNV CooperativeMatrixBlockLoadsNV>
--
-- == Version History
--
-- -   Revision 1, 2024-08-01 (Jeff Bolz)
--
--     -   Initial revision
--
-- == See Also
--
-- No cross-references are available
--
-- == Document Notes
--
-- For more information, see the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VK_NV_cooperative_matrix2 Vulkan Specification>.
--
-- This page is a generated document. Fixes and changes should be made to
-- the generator scripts, not directly.
module Vulkan.Extensions.VK_NV_cooperative_matrix2  ( getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV
                                                    , PhysicalDeviceCooperativeMatrix2FeaturesNV(..)
                                                    , PhysicalDeviceCooperativeMatrix2PropertiesNV(..)
                                                    , CooperativeMatrixFlexibleDimensionsPropertiesNV(..)
                                                    , NV_COOPERATIVE_MATRIX_2_SPEC_VERSION
                                                    , pattern NV_COOPERATIVE_MATRIX_2_SPEC_VERSION
                                                    , NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME
                                                    , pattern NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME
                                                    , ScopeKHR(..)
                                                    , ComponentTypeKHR(..)
                                                    ) where

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 Control.Monad.Trans.Class (lift)
import Control.Monad.Trans.Cont (evalContT)
import Data.Vector (generateM)
import Vulkan.CStruct (FromCStruct)
import Vulkan.CStruct (FromCStruct(..))
import Vulkan.CStruct (ToCStruct)
import Vulkan.CStruct (ToCStruct(..))
import Vulkan.Zero (Zero(..))
import Control.Monad.IO.Class (MonadIO)
import Data.String (IsString)
import Data.Typeable (Typeable)
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 Foreign.Ptr (FunPtr)
import Foreign.Ptr (Ptr)
import Data.Word (Word32)
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.Extensions.VK_NV_cooperative_vector (ComponentTypeKHR)
import Vulkan.Dynamic (InstanceCmds(pVkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV))
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.Extensions.VK_KHR_cooperative_matrix (ScopeKHR)
import Vulkan.Core10.Enums.StructureType (StructureType)
import Vulkan.Exception (VulkanException(..))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV))
import Vulkan.Core10.Enums.StructureType (StructureType(STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV))
import Vulkan.Core10.Enums.Result (Result(SUCCESS))
import Vulkan.Extensions.VK_NV_cooperative_vector (ComponentTypeKHR(..))
import Vulkan.Extensions.VK_KHR_cooperative_matrix (ScopeKHR(..))
foreign import ccall
#if !defined(SAFE_FOREIGN_CALLS)
  unsafe
#endif
  "dynamic" mkVkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV
  :: FunPtr (Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO Result) -> Ptr PhysicalDevice_T -> Ptr Word32 -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO Result

-- | vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV -
-- Returns properties describing what cooperative matrix types are
-- supported
--
-- = Description
--
-- If @pProperties@ is @NULL@, then the number of flexible dimensions
-- properties available is returned in @pPropertyCount@. Otherwise,
-- @pPropertyCount@ /must/ point to a variable set by the application to
-- the number of elements in the @pProperties@ array, and on return the
-- variable is overwritten with the number of structures actually written
-- to @pProperties@. If @pPropertyCount@ is less than the number flexible
-- dimensions properties available, at most @pPropertyCount@ structures
-- will be written, and 'Vulkan.Core10.Enums.Result.INCOMPLETE' will be
-- returned instead of 'Vulkan.Core10.Enums.Result.SUCCESS', to indicate
-- that not all the available flexible dimensions properties were returned.
--
-- If the
-- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-cooperativeMatrixFlexibleDimensions cooperativeMatrixFlexibleDimensions>
-- feature is not supported, the implementation /must/ advertise zero
-- properties.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV-pPropertyCount-parameter#
--     @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value
--
-- -   #VUID-vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV-pProperties-parameter#
--     If the value referenced by @pPropertyCount@ is not @0@, and
--     @pProperties@ is not @NULL@, @pProperties@ /must/ be a valid pointer
--     to an array of @pPropertyCount@
--     'CooperativeMatrixFlexibleDimensionsPropertiesNV' structures
--
-- == Return Codes
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-successcodes Success>]
--
--     -   'Vulkan.Core10.Enums.Result.INCOMPLETE'
--
--     -   'Vulkan.Core10.Enums.Result.SUCCESS'
--
-- [<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-errorcodes Failure>]
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_DEVICE_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_OUT_OF_HOST_MEMORY'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_UNKNOWN'
--
--     -   'Vulkan.Core10.Enums.Result.ERROR_VALIDATION_FAILED'
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_matrix2 VK_NV_cooperative_matrix2>,
-- 'CooperativeMatrixFlexibleDimensionsPropertiesNV',
-- 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV :: forall io
                                                                  . (MonadIO io)
                                                                 => -- | @physicalDevice@ is the physical device.
                                                                    PhysicalDevice
                                                                 -> io (Result, ("properties" ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV :: forall (io :: * -> *).
MonadIO io =>
PhysicalDevice
-> io
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV PhysicalDevice
physicalDevice = IO
  (Result,
   "properties"
   ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
-> io
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall a. IO a -> io a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO
   (Result,
    "properties"
    ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
 -> io
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> (ContT
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
      IO
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
    -> IO
         (Result,
          "properties"
          ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
-> io
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ContT
  (Result,
   "properties"
   ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
  IO
  (Result,
   "properties"
   ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
-> IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall (m :: * -> *) r. Monad m => ContT r m r -> m r
evalContT (ContT
   (Result,
    "properties"
    ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
   IO
   (Result,
    "properties"
    ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
 -> io
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
-> io
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall a b. (a -> b) -> a -> b
$ do
  let vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNVPtr :: FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32
   -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
   -> IO Result)
vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNVPtr = InstanceCmds
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr Word32
      -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
      -> IO Result)
pVkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV (case PhysicalDevice
physicalDevice of PhysicalDevice{InstanceCmds
instanceCmds :: InstanceCmds
instanceCmds :: PhysicalDevice -> InstanceCmds
instanceCmds} -> InstanceCmds
instanceCmds)
  IO ()
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     IO
     ()
forall (m :: * -> *) a.
Monad m =>
m a
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     m
     a
forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
(MonadTrans t, Monad m) =>
m a -> t m a
lift (IO ()
 -> ContT
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
      IO
      ())
-> IO ()
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     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 CooperativeMatrixFlexibleDimensionsPropertiesNV
   -> IO Result)
vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNVPtr FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32
   -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
   -> IO Result)
-> FunPtr
     (Ptr PhysicalDevice_T
      -> Ptr Word32
      -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
      -> IO Result)
-> Bool
forall a. Eq a => a -> a -> Bool
/= FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32
   -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
   -> 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 vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV is null" Maybe CInt
forall a. Maybe a
Nothing Maybe String
forall a. Maybe a
Nothing
  let vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV' :: Ptr PhysicalDevice_T
-> Ptr Word32
-> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO Result
vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV' = FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32
   -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
   -> IO Result)
-> Ptr PhysicalDevice_T
-> Ptr Word32
-> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO Result
mkVkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV FunPtr
  (Ptr PhysicalDevice_T
   -> Ptr Word32
   -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
   -> IO Result)
vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNVPtr
  let physicalDevice' :: Ptr PhysicalDevice_T
physicalDevice' = PhysicalDevice -> Ptr PhysicalDevice_T
physicalDeviceHandle (PhysicalDevice
physicalDevice)
  pPPropertyCount <- ((Ptr Word32
  -> IO
       (Result,
        "properties"
        ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
 -> IO
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     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 CooperativeMatrixFlexibleDimensionsPropertiesNV))
  -> IO
       (Result,
        "properties"
        ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
 -> ContT
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
      IO
      (Ptr Word32))
-> ((Ptr Word32
     -> IO
          (Result,
           "properties"
           ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
    -> IO
         (Result,
          "properties"
          ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     IO
     (Ptr Word32)
forall a b. (a -> b) -> a -> b
$ IO (Ptr Word32)
-> (Ptr Word32 -> IO ())
-> (Ptr Word32
    -> IO
         (Result,
          "properties"
          ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
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 "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV" (vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV'
                                                                                                       physicalDevice'
                                                                                                       (pPPropertyCount)
                                                                                                       (nullPtr))
  lift $ when (r < SUCCESS) (throwIO (VulkanException r))
  pPropertyCount <- lift $ peek @Word32 pPPropertyCount
  pPProperties <- ContT $ bracket (callocBytes @CooperativeMatrixFlexibleDimensionsPropertiesNV ((fromIntegral (pPropertyCount)) * 56)) free
  _ <- traverse (\Int
i -> ((()
  -> IO
       (Result,
        "properties"
        ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
 -> IO
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     IO
     ()
forall {k} (r :: k) (m :: k -> *) a.
((a -> m r) -> m r) -> ContT r m a
ContT (((()
   -> IO
        (Result,
         "properties"
         ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
  -> IO
       (Result,
        "properties"
        ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
 -> ContT
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
      IO
      ())
-> ((()
     -> IO
          (Result,
           "properties"
           ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
    -> IO
         (Result,
          "properties"
          ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ContT
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
     IO
     ()
forall a b. (a -> b) -> a -> b
$ Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
-> IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall b.
Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> IO b -> IO b
pokeZeroCStruct (Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
pPProperties Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
i Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
56) :: Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV) (IO
   (Result,
    "properties"
    ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
 -> IO
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ((()
     -> IO
          (Result,
           "properties"
           ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
    -> IO
         (Result,
          "properties"
          ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> (()
    -> IO
         (Result,
          "properties"
          ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((()
 -> IO
      (Result,
       "properties"
       ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV))
-> ()
-> IO
     (Result,
      "properties"
      ::: Vector CooperativeMatrixFlexibleDimensionsPropertiesNV)
forall a b. (a -> b) -> a -> b
$ ())) [0..(fromIntegral (pPropertyCount)) - 1]
  r' <- lift $ traceAroundEvent "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV" (vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV'
                                                                                                        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 @CooperativeMatrixFlexibleDimensionsPropertiesNV (((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
pPProperties) Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
forall a. Ptr a -> Int -> Ptr a
`advancePtrBytes` (Int
56 Int -> Int -> Int
forall a. Num a => a -> a -> a
* (Int
i)) :: Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV)))
  pure $ ((r'), pProperties')


-- | VkPhysicalDeviceCooperativeMatrix2FeaturesNV - Structure describing
-- cooperative matrix features that can be supported by an implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceCooperativeMatrix2FeaturesNV' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceFeatures2',
-- it is filled in to indicate whether each corresponding feature is
-- supported. If the application wishes to use a
-- 'Vulkan.Core10.Handles.Device' with any features described by
-- 'PhysicalDeviceCooperativeMatrix2FeaturesNV', it /must/ add an instance
-- of the structure, with the desired feature members set to
-- 'Vulkan.Core10.FundamentalTypes.TRUE', to the @pNext@ chain of
-- 'Vulkan.Core10.Device.DeviceCreateInfo' when creating the
-- 'Vulkan.Core10.Handles.Device'.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_matrix2 VK_NV_cooperative_matrix2>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceCooperativeMatrix2FeaturesNV = PhysicalDeviceCooperativeMatrix2FeaturesNV
  { -- | #features-cooperativeMatrixWorkgroupScope#
    -- @cooperativeMatrixWorkgroupScope@ indicates that the implementation
    -- supports workgroup scope cooperative matrices.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixWorkgroupScope :: Bool
  , -- | #features-cooperativeMatrixFlexibleDimensions#
    -- @cooperativeMatrixFlexibleDimensions@ indicates that the implementation
    -- supports cooperative matrix sizes that are a multiple of the granularity
    -- advertised in 'CooperativeMatrixFlexibleDimensionsPropertiesNV'.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixFlexibleDimensions :: Bool
  , -- | #features-cooperativeMatrixReductions# @cooperativeMatrixReductions@
    -- indicates that the implementation supports the
    -- @CooperativeMatrixReductionsNV@ SPIR-V capability. This allows
    -- performing (row, column, 2x2, or all element) reductions on matrices.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixReductions :: Bool
  , -- | #features-cooperativeMatrixConversions# @cooperativeMatrixConversions@
    -- indicates that the implementation supports the
    -- @CooperativeMatrixConversionsNV@ SPIR-V capability. This allows
    -- converting accumulator matrices to A or B matrices.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixConversions :: Bool
  , -- | #features-cooperativeMatrixPerElementOperations#
    -- @cooperativeMatrixPerElementOperations@ indicates that the
    -- implementation supports the @CooperativeMatrixPerElementOperationsNV@
    -- SPIR-V capability. This allows performing element-wise operations on
    -- matrix elements using a callback function.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixPerElementOperations :: Bool
  , -- | #features-cooperativeMatrixTensorAddressing#
    -- @cooperativeMatrixTensorAddressing@ indicates that the implementation
    -- supports the @TensorAddressingNV@ and
    -- @CooperativeMatrixTensorAddressingNV@ SPIR-V capabilities. This allows
    -- using tensor layout and tensor view types for matrix loads and stores.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixTensorAddressing :: Bool
  , -- | #features-cooperativeMatrixBlockLoads# @cooperativeMatrixBlockLoads@
    -- indicates that the implementation supports the
    -- @CooperativeMatrixBlockLoadsNV@ SPIR-V capability. This allows setting
    -- block size for loads and using a callback function to decode block
    -- elements.
    PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixBlockLoads :: Bool
  }
  deriving (Typeable, PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
(PhysicalDeviceCooperativeMatrix2FeaturesNV
 -> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool)
-> (PhysicalDeviceCooperativeMatrix2FeaturesNV
    -> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool)
-> Eq PhysicalDeviceCooperativeMatrix2FeaturesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
== :: PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
$c/= :: PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
/= :: PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceCooperativeMatrix2FeaturesNV)
#endif
deriving instance Show PhysicalDeviceCooperativeMatrix2FeaturesNV

instance ToCStruct PhysicalDeviceCooperativeMatrix2FeaturesNV where
  withCStruct :: forall b.
PhysicalDeviceCooperativeMatrix2FeaturesNV
-> (Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b) -> IO b
withCStruct PhysicalDeviceCooperativeMatrix2FeaturesNV
x Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b
f = Int
-> (Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b) -> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
48 ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b) -> IO b)
-> (Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b) -> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p -> Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b -> IO b
forall b.
Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p PhysicalDeviceCooperativeMatrix2FeaturesNV
x (Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b
f Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p PhysicalDeviceCooperativeMatrix2FeaturesNV{Bool
cooperativeMatrixWorkgroupScope :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixFlexibleDimensions :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixReductions :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixConversions :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixPerElementOperations :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixTensorAddressing :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixBlockLoads :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Bool
cooperativeMatrixWorkgroupScope :: Bool
cooperativeMatrixFlexibleDimensions :: Bool
cooperativeMatrixReductions :: Bool
cooperativeMatrixConversions :: Bool
cooperativeMatrixPerElementOperations :: Bool
cooperativeMatrixTensorAddressing :: Bool
cooperativeMatrixBlockLoads :: Bool
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> 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 PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixWorkgroupScope))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixFlexibleDimensions))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixReductions))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixConversions))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixPerElementOperations))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixTensorAddressing))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
cooperativeMatrixBlockLoads))
    IO b
f
  cStructSize :: Int
cStructSize = Int
48
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> 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 PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> 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 PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> 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 PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> 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 Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: 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 PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: 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 PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> 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))
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    IO b
f

instance FromCStruct PhysicalDeviceCooperativeMatrix2FeaturesNV where
  peekCStruct :: Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> IO PhysicalDeviceCooperativeMatrix2FeaturesNV
peekCStruct Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p = do
    cooperativeMatrixWorkgroupScope <- forall a. Storable a => Ptr a -> IO a
peek @Bool32 ((Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
p Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Bool32))
    cooperativeMatrixFlexibleDimensions <- peek @Bool32 ((p `plusPtr` 20 :: Ptr Bool32))
    cooperativeMatrixReductions <- peek @Bool32 ((p `plusPtr` 24 :: Ptr Bool32))
    cooperativeMatrixConversions <- peek @Bool32 ((p `plusPtr` 28 :: Ptr Bool32))
    cooperativeMatrixPerElementOperations <- peek @Bool32 ((p `plusPtr` 32 :: Ptr Bool32))
    cooperativeMatrixTensorAddressing <- peek @Bool32 ((p `plusPtr` 36 :: Ptr Bool32))
    cooperativeMatrixBlockLoads <- peek @Bool32 ((p `plusPtr` 40 :: Ptr Bool32))
    pure $ PhysicalDeviceCooperativeMatrix2FeaturesNV
             (bool32ToBool cooperativeMatrixWorkgroupScope)
             (bool32ToBool cooperativeMatrixFlexibleDimensions)
             (bool32ToBool cooperativeMatrixReductions)
             (bool32ToBool cooperativeMatrixConversions)
             (bool32ToBool cooperativeMatrixPerElementOperations)
             (bool32ToBool cooperativeMatrixTensorAddressing)
             (bool32ToBool cooperativeMatrixBlockLoads)

instance Storable PhysicalDeviceCooperativeMatrix2FeaturesNV where
  sizeOf :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int
sizeOf ~PhysicalDeviceCooperativeMatrix2FeaturesNV
_ = Int
48
  alignment :: PhysicalDeviceCooperativeMatrix2FeaturesNV -> Int
alignment ~PhysicalDeviceCooperativeMatrix2FeaturesNV
_ = Int
8
  peek :: Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> IO PhysicalDeviceCooperativeMatrix2FeaturesNV
peek = Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> IO PhysicalDeviceCooperativeMatrix2FeaturesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO ()
poke Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
poked = Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
-> PhysicalDeviceCooperativeMatrix2FeaturesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
ptr PhysicalDeviceCooperativeMatrix2FeaturesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceCooperativeMatrix2FeaturesNV where
  zero :: PhysicalDeviceCooperativeMatrix2FeaturesNV
zero = Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> PhysicalDeviceCooperativeMatrix2FeaturesNV
PhysicalDeviceCooperativeMatrix2FeaturesNV
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero
           Bool
forall a. Zero a => a
zero


-- | VkPhysicalDeviceCooperativeMatrix2PropertiesNV - Structure describing
-- cooperative matrix properties supported by an implementation
--
-- = Description
--
-- If the 'PhysicalDeviceCooperativeMatrix2PropertiesNV' structure is
-- included in the @pNext@ chain of the
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2'
-- structure passed to
-- 'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.getPhysicalDeviceProperties2',
-- it is filled in with each corresponding implementation-dependent
-- property.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_matrix2 VK_NV_cooperative_matrix2>,
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceCooperativeMatrix2PropertiesNV = PhysicalDeviceCooperativeMatrix2PropertiesNV
  { -- | #limits-cooperativeMatrixWorkgroupScopeMaxWorkgroupSize#
    -- @cooperativeMatrixWorkgroupScopeMaxWorkgroupSize@ is the maximum number
    -- of invocations in a workgroup when the module uses
    -- @OpTypeCooperativeMatrixKHR@ with @Scope@ equal to @Workgroup@.
    PhysicalDeviceCooperativeMatrix2PropertiesNV -> Word32
cooperativeMatrixWorkgroupScopeMaxWorkgroupSize :: Word32
  , -- | #limits-cooperativeMatrixFlexibleDimensionsMaxDimension#
    -- @cooperativeMatrixFlexibleDimensionsMaxDimension@ is the maximum
    -- supported dimension for cooperative matrix types when the
    -- <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#features-cooperativeMatrixFlexibleDimensions cooperativeMatrixFlexibleDimensions>
    -- feature is enabled.
    PhysicalDeviceCooperativeMatrix2PropertiesNV -> Word32
cooperativeMatrixFlexibleDimensionsMaxDimension :: Word32
  , -- | #limits-cooperativeMatrixWorkgroupScopeReservedSharedMemory#
    -- @cooperativeMatrixWorkgroupScopeReservedSharedMemory@ is the number of
    -- bytes of shared memory reserved for the implementation when the module
    -- uses @OpTypeCooperativeMatrixKHR@ with @Scope@ equal to @Workgroup@.
    PhysicalDeviceCooperativeMatrix2PropertiesNV -> Word32
cooperativeMatrixWorkgroupScopeReservedSharedMemory :: Word32
  }
  deriving (Typeable, PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool
(PhysicalDeviceCooperativeMatrix2PropertiesNV
 -> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool)
-> (PhysicalDeviceCooperativeMatrix2PropertiesNV
    -> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool)
-> Eq PhysicalDeviceCooperativeMatrix2PropertiesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool
== :: PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool
$c/= :: PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool
/= :: PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (PhysicalDeviceCooperativeMatrix2PropertiesNV)
#endif
deriving instance Show PhysicalDeviceCooperativeMatrix2PropertiesNV

instance ToCStruct PhysicalDeviceCooperativeMatrix2PropertiesNV where
  withCStruct :: forall b.
PhysicalDeviceCooperativeMatrix2PropertiesNV
-> (Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b)
-> IO b
withCStruct PhysicalDeviceCooperativeMatrix2PropertiesNV
x Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b
f = Int
-> (Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
32 ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b)
 -> IO b)
-> (Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p -> Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b -> IO b
forall b.
Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p PhysicalDeviceCooperativeMatrix2PropertiesNV
x (Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b
f Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p)
  pokeCStruct :: forall b.
Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p PhysicalDeviceCooperativeMatrix2PropertiesNV{Word32
cooperativeMatrixWorkgroupScopeMaxWorkgroupSize :: PhysicalDeviceCooperativeMatrix2PropertiesNV -> Word32
cooperativeMatrixFlexibleDimensionsMaxDimension :: PhysicalDeviceCooperativeMatrix2PropertiesNV -> Word32
cooperativeMatrixWorkgroupScopeReservedSharedMemory :: PhysicalDeviceCooperativeMatrix2PropertiesNV -> Word32
cooperativeMatrixWorkgroupScopeMaxWorkgroupSize :: Word32
cooperativeMatrixFlexibleDimensionsMaxDimension :: Word32
cooperativeMatrixWorkgroupScopeReservedSharedMemory :: Word32
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
cooperativeMatrixWorkgroupScopeMaxWorkgroupSize)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
cooperativeMatrixFlexibleDimensionsMaxDimension)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
cooperativeMatrixWorkgroupScopeReservedSharedMemory)
    IO b
f
  cStructSize :: Int
cStructSize = Int
32
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct PhysicalDeviceCooperativeMatrix2PropertiesNV where
  peekCStruct :: Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> IO PhysicalDeviceCooperativeMatrix2PropertiesNV
peekCStruct Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p = do
    cooperativeMatrixWorkgroupScopeMaxWorkgroupSize <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
p Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    cooperativeMatrixFlexibleDimensionsMaxDimension <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
    cooperativeMatrixWorkgroupScopeReservedSharedMemory <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
    pure $ PhysicalDeviceCooperativeMatrix2PropertiesNV
             cooperativeMatrixWorkgroupScopeMaxWorkgroupSize
             cooperativeMatrixFlexibleDimensionsMaxDimension
             cooperativeMatrixWorkgroupScopeReservedSharedMemory

instance Storable PhysicalDeviceCooperativeMatrix2PropertiesNV where
  sizeOf :: PhysicalDeviceCooperativeMatrix2PropertiesNV -> Int
sizeOf ~PhysicalDeviceCooperativeMatrix2PropertiesNV
_ = Int
32
  alignment :: PhysicalDeviceCooperativeMatrix2PropertiesNV -> Int
alignment ~PhysicalDeviceCooperativeMatrix2PropertiesNV
_ = Int
8
  peek :: Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> IO PhysicalDeviceCooperativeMatrix2PropertiesNV
peek = Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> IO PhysicalDeviceCooperativeMatrix2PropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO ()
poke Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
poked = Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO () -> IO ()
forall b.
Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
-> PhysicalDeviceCooperativeMatrix2PropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
ptr PhysicalDeviceCooperativeMatrix2PropertiesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero PhysicalDeviceCooperativeMatrix2PropertiesNV where
  zero :: PhysicalDeviceCooperativeMatrix2PropertiesNV
zero = Word32
-> Word32 -> Word32 -> PhysicalDeviceCooperativeMatrix2PropertiesNV
PhysicalDeviceCooperativeMatrix2PropertiesNV
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero


-- | VkCooperativeMatrixFlexibleDimensionsPropertiesNV - Structure specifying
-- cooperative matrix properties
--
-- = Description
--
-- Rather than explicitly enumerating a list of supported sizes,
-- 'CooperativeMatrixFlexibleDimensionsPropertiesNV' advertises size
-- granularities, where the matrix /must/ be a multiple of the advertised
-- size. The M and K granularities apply to rows and columns of matrices
-- with @Use@ of @MatrixA@, K, and N apply to rows and columns of matrices
-- with @Use@ of @MatrixB@, M, and N apply to rows and columns of matrices
-- with @Use@ of @MatrixAccumulator@.
--
-- For a given type combination, if multiple workgroup sizes are supported
-- there /may/ be multiple
-- 'CooperativeMatrixFlexibleDimensionsPropertiesNV' structures with
-- different granularities.
--
-- All granularity values /must/ be powers of two.
--
-- Different A\/B types may require different granularities but share the
-- same accumulator type. In such a case, the supported granularity for a
-- matrix with the accumulator type would be the smallest advertised
-- granularity.
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_matrix2 VK_NV_cooperative_matrix2>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Extensions.VK_NV_cooperative_vector.ComponentTypeKHR',
-- 'Vulkan.Extensions.VK_KHR_cooperative_matrix.ScopeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV'
data CooperativeMatrixFlexibleDimensionsPropertiesNV = CooperativeMatrixFlexibleDimensionsPropertiesNV
  { -- | @MGranularity@ is the granularity of the number of rows in matrices @A@,
    -- @C@, and 'Vulkan.Core10.Enums.Result.Result'. The rows /must/ be an
    -- integer multiple of this value.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
mGranularity :: Word32
  , -- | @NGranularity@ is the granularity of columns in matrices @B@, @C@,
    -- 'Vulkan.Core10.Enums.Result.Result'. The columns /must/ be an integer
    -- multiple of this value.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
nGranularity :: Word32
  , -- | @KGranularity@ is the granularity of columns in matrix @A@ and rows in
    -- matrix @B@. The columns\/rows /must/ be an integer multiple of this
    -- value.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
kGranularity :: Word32
  , -- | @AType@ is the component type of matrix @A@, of type
    -- 'Vulkan.Extensions.VK_NV_cooperative_vector.ComponentTypeKHR'.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
aType :: ComponentTypeKHR
  , -- | @BType@ is the component type of matrix @B@, of type
    -- 'Vulkan.Extensions.VK_NV_cooperative_vector.ComponentTypeKHR'.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
bType :: ComponentTypeKHR
  , -- | @CType@ is the component type of matrix @C@, of type
    -- 'Vulkan.Extensions.VK_NV_cooperative_vector.ComponentTypeKHR'.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
cType :: ComponentTypeKHR
  , -- | @ResultType@ is the component type of matrix
    -- 'Vulkan.Core10.Enums.Result.Result', of type
    -- 'Vulkan.Extensions.VK_NV_cooperative_vector.ComponentTypeKHR'.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
resultType :: ComponentTypeKHR
  , -- | @saturatingAccumulation@ indicates whether the @SaturatingAccumulation@
    -- operand to @OpCooperativeMatrixMulAddKHR@ /must/ be present or not. If
    -- it is 'Vulkan.Core10.FundamentalTypes.TRUE', the
    -- @SaturatingAccumulation@ operand /must/ be present. If it is
    -- 'Vulkan.Core10.FundamentalTypes.FALSE', the @SaturatingAccumulation@
    -- operand /must/ not be present.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
saturatingAccumulation :: Bool
  , -- | @scope@ is the scope of all the matrix types, of type
    -- 'Vulkan.Extensions.VK_KHR_cooperative_matrix.ScopeKHR'.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> ScopeKHR
scope :: ScopeKHR
  , -- | @workgroupInvocations@ is the number of invocations in the local
    -- workgroup when this combination of values is supported.
    CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
workgroupInvocations :: Word32
  }
  deriving (Typeable, CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
(CooperativeMatrixFlexibleDimensionsPropertiesNV
 -> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool)
-> (CooperativeMatrixFlexibleDimensionsPropertiesNV
    -> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool)
-> Eq CooperativeMatrixFlexibleDimensionsPropertiesNV
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
== :: CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
$c/= :: CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
/= :: CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
Eq)
#if defined(GENERIC_INSTANCES)
deriving instance Generic (CooperativeMatrixFlexibleDimensionsPropertiesNV)
#endif
deriving instance Show CooperativeMatrixFlexibleDimensionsPropertiesNV

instance ToCStruct CooperativeMatrixFlexibleDimensionsPropertiesNV where
  withCStruct :: forall b.
CooperativeMatrixFlexibleDimensionsPropertiesNV
-> (Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b)
-> IO b
withCStruct CooperativeMatrixFlexibleDimensionsPropertiesNV
x Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b
f = Int
-> (Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b)
-> IO b
forall a b. Int -> (Ptr a -> IO b) -> IO b
allocaBytes Int
56 ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b)
 -> IO b)
-> (Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b)
-> IO b
forall a b. (a -> b) -> a -> b
$ \Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p -> Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b -> IO b
forall b.
Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p CooperativeMatrixFlexibleDimensionsPropertiesNV
x (Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b
f Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p)
  pokeCStruct :: forall b.
Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b -> IO b
pokeCStruct Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p CooperativeMatrixFlexibleDimensionsPropertiesNV{Bool
Word32
ScopeKHR
ComponentTypeKHR
mGranularity :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
nGranularity :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
kGranularity :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
aType :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
bType :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
cType :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
resultType :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> ComponentTypeKHR
saturatingAccumulation :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Bool
scope :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> ScopeKHR
workgroupInvocations :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Word32
mGranularity :: Word32
nGranularity :: Word32
kGranularity :: Word32
aType :: ComponentTypeKHR
bType :: ComponentTypeKHR
cType :: ComponentTypeKHR
resultType :: ComponentTypeKHR
saturatingAccumulation :: Bool
scope :: ScopeKHR
workgroupInvocations :: Word32
..} IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
mGranularity)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
nGranularity)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
kGranularity)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
28 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
aType)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
bType)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
cType)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
resultType)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
saturatingAccumulation))
    Ptr ScopeKHR -> ScopeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ScopeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ScopeKHR)) (ScopeKHR
scope)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Word32
workgroupInvocations)
    IO b
f
  cStructSize :: Int
cStructSize = Int
56
  cStructAlignment :: Int
cStructAlignment = Int
8
  pokeZeroCStruct :: forall b.
Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b -> IO b
pokeZeroCStruct Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p IO b
f = do
    Ptr StructureType -> StructureType -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr StructureType
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: Ptr StructureType)) (StructureType
STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV)
    Ptr (Ptr ()) -> Ptr () -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr (Ptr ())
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: Ptr (Ptr ()))) (Ptr ()
forall a. Ptr a
nullPtr)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
20 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
24 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> 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 CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
32 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
36 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
    Ptr ComponentTypeKHR -> ComponentTypeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ComponentTypeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
40 :: Ptr ComponentTypeKHR)) (ComponentTypeKHR
forall a. Zero a => a
zero)
    Ptr Bool32 -> Bool32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Bool32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
44 :: Ptr Bool32)) (Bool -> Bool32
boolToBool32 (Bool
forall a. Zero a => a
zero))
    Ptr ScopeKHR -> ScopeKHR -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr ScopeKHR
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
48 :: Ptr ScopeKHR)) (ScopeKHR
forall a. Zero a => a
zero)
    Ptr Word32 -> Word32 -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
52 :: Ptr Word32)) (Word32
forall a. Zero a => a
zero)
    IO b
f

instance FromCStruct CooperativeMatrixFlexibleDimensionsPropertiesNV where
  peekCStruct :: Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO CooperativeMatrixFlexibleDimensionsPropertiesNV
peekCStruct Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p = do
    mGranularity <- forall a. Storable a => Ptr a -> IO a
peek @Word32 ((Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
p Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> Int -> Ptr Word32
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
16 :: Ptr Word32))
    nGranularity <- peek @Word32 ((p `plusPtr` 20 :: Ptr Word32))
    kGranularity <- peek @Word32 ((p `plusPtr` 24 :: Ptr Word32))
    aType <- peek @ComponentTypeKHR ((p `plusPtr` 28 :: Ptr ComponentTypeKHR))
    bType <- peek @ComponentTypeKHR ((p `plusPtr` 32 :: Ptr ComponentTypeKHR))
    cType <- peek @ComponentTypeKHR ((p `plusPtr` 36 :: Ptr ComponentTypeKHR))
    resultType <- peek @ComponentTypeKHR ((p `plusPtr` 40 :: Ptr ComponentTypeKHR))
    saturatingAccumulation <- peek @Bool32 ((p `plusPtr` 44 :: Ptr Bool32))
    scope <- peek @ScopeKHR ((p `plusPtr` 48 :: Ptr ScopeKHR))
    workgroupInvocations <- peek @Word32 ((p `plusPtr` 52 :: Ptr Word32))
    pure $ CooperativeMatrixFlexibleDimensionsPropertiesNV
             mGranularity
             nGranularity
             kGranularity
             aType
             bType
             cType
             resultType
             (bool32ToBool saturatingAccumulation)
             scope
             workgroupInvocations

instance Storable CooperativeMatrixFlexibleDimensionsPropertiesNV where
  sizeOf :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Int
sizeOf ~CooperativeMatrixFlexibleDimensionsPropertiesNV
_ = Int
56
  alignment :: CooperativeMatrixFlexibleDimensionsPropertiesNV -> Int
alignment ~CooperativeMatrixFlexibleDimensionsPropertiesNV
_ = Int
8
  peek :: Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO CooperativeMatrixFlexibleDimensionsPropertiesNV
peek = Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO CooperativeMatrixFlexibleDimensionsPropertiesNV
forall a. FromCStruct a => Ptr a -> IO a
peekCStruct
  poke :: Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO ()
poke Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
poked = Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV
-> IO ()
-> IO ()
forall b.
Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
-> CooperativeMatrixFlexibleDimensionsPropertiesNV -> IO b -> IO b
forall a b. ToCStruct a => Ptr a -> a -> IO b -> IO b
pokeCStruct Ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
ptr CooperativeMatrixFlexibleDimensionsPropertiesNV
poked (() -> IO ()
forall a. a -> IO a
forall (f :: * -> *) a. Applicative f => a -> f a
pure ())

instance Zero CooperativeMatrixFlexibleDimensionsPropertiesNV where
  zero :: CooperativeMatrixFlexibleDimensionsPropertiesNV
zero = Word32
-> Word32
-> Word32
-> ComponentTypeKHR
-> ComponentTypeKHR
-> ComponentTypeKHR
-> ComponentTypeKHR
-> Bool
-> ScopeKHR
-> Word32
-> CooperativeMatrixFlexibleDimensionsPropertiesNV
CooperativeMatrixFlexibleDimensionsPropertiesNV
           Word32
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero
           Word32
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
           ScopeKHR
forall a. Zero a => a
zero
           Word32
forall a. Zero a => a
zero


type NV_COOPERATIVE_MATRIX_2_SPEC_VERSION = 1

-- No documentation found for TopLevel "VK_NV_COOPERATIVE_MATRIX_2_SPEC_VERSION"
pattern NV_COOPERATIVE_MATRIX_2_SPEC_VERSION :: forall a . Integral a => a
pattern $mNV_COOPERATIVE_MATRIX_2_SPEC_VERSION :: forall {r} {a}.
Integral a =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_COOPERATIVE_MATRIX_2_SPEC_VERSION :: forall a. Integral a => a
NV_COOPERATIVE_MATRIX_2_SPEC_VERSION = 1


type NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME = "VK_NV_cooperative_matrix2"

-- No documentation found for TopLevel "VK_NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME"
pattern NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME :: forall a . (Eq a, IsString a) => a
pattern $mNV_COOPERATIVE_MATRIX_2_EXTENSION_NAME :: forall {r} {a}.
(Eq a, IsString a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bNV_COOPERATIVE_MATRIX_2_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
NV_COOPERATIVE_MATRIX_2_EXTENSION_NAME = "VK_NV_cooperative_matrix2"