{-# language CPP #-}
-- | = Name
--
-- VK_NV_cooperative_vector - device extension
--
-- = VK_NV_cooperative_vector
--
-- [__Name String__]
--     @VK_NV_cooperative_vector@
--
-- [__Extension Type__]
--     Device extension
--
-- [__Registered Extension Number__]
--     492
--
-- [__Revision__]
--     4
--
-- [__Ratification Status__]
--     Not ratified
--
-- [__Extension and Version Dependencies__]
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_get_physical_device_properties2 VK_KHR_get_physical_device_properties2>
--     or
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#versions-1.1 Vulkan Version 1.1>
--
-- [__SPIR-V Dependencies__]
--
--     -   <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_cooperative_vector.html SPV_NV_cooperative_vector>
--
-- [__Contact__]
--
--     -   Jeff Bolz
--         <https://github.com/KhronosGroup/Vulkan-Docs/issues/new?body=[VK_NV_cooperative_vector] @jeffbolznv%0A*Here describe the issue or question you have about the VK_NV_cooperative_vector extension* >
--
-- [__Extension Proposal__]
--     <https://github.com/KhronosGroup/Vulkan-Docs/tree/main/proposals/VK_NV_cooperative_vector.adoc VK_NV_cooperative_vector>
--
-- == Other Extension Metadata
--
-- [__Last Modified Date__]
--     2024-05-23
--
-- [__Interactions and External Dependencies__]
--
--     -   This extension requires
--         <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_cooperative_vector.html SPV_NV_cooperative_vector>
--
--     -   This extension provides API support for
--         <https://github.com/KhronosGroup/GLSL/blob/main/extensions/nv/GLSL_NV_cooperative_vector.txt GL_NV_cooperative_vector>
--
-- [__Contributors__]
--
--     -   Jeff Bolz, NVIDIA
--
-- == Description
--
-- This extension adds support for using cooperative vector types in
-- SPIR-V. Unlike cooperative matrix types, a variable with a cooperative
-- vector type is logically stored in the invocation it belongs to, but
-- they can cooperate behind the scenes when performing matrix-vector
-- multiplies. Cooperative vectors do not require a fully occupied subgroup
-- or uniform control flow like cooperative matrices, although these do
-- increase the likelihood of being on the fast path. And unlike normal
-- vector types, they have arbitrary length and support a relatively
-- limited set of operations. These types are intended to help accelerate
-- the evaluation of small neural networks, where each invocation is
-- performing its own independent evaluation of the network.
--
-- Cooperative vector types are defined by the
-- <https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_cooperative_vector.html SPV_NV_cooperative_vector>
-- SPIR-V extension and can be used with the
-- <https://github.com/KhronosGroup/GLSL/blob/main/extensions/nv/GLSL_NV_cooperative_vector.txt GL_NV_cooperative_vector>
-- GLSL extension.
--
-- This extension includes support for enumerating the combinations of
-- types that are supported by the implementation, and for converting
-- matrix data to and from an optimized opaque layout.
--
-- == New Commands
--
-- -   'cmdConvertCooperativeVectorMatrixNV'
--
-- -   'convertCooperativeVectorMatrixNV'
--
-- -   'getPhysicalDeviceCooperativeVectorPropertiesNV'
--
-- == New Structures
--
-- -   'ConvertCooperativeVectorMatrixInfoNV'
--
-- -   'CooperativeVectorPropertiesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceFeatures2',
--     'Vulkan.Core10.Device.DeviceCreateInfo':
--
--     -   'PhysicalDeviceCooperativeVectorFeaturesNV'
--
-- -   Extending
--     'Vulkan.Core11.Promoted_From_VK_KHR_get_physical_device_properties2.PhysicalDeviceProperties2':
--
--     -   'PhysicalDeviceCooperativeVectorPropertiesNV'
--
-- == New Unions
--
-- -   'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressConstKHR'
--
-- -   'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressKHR'
--
-- == New Enums
--
-- -   'ComponentTypeKHR'
--
-- -   'CooperativeVectorMatrixLayoutNV'
--
-- == New Enum Constants
--
-- -   'NV_COOPERATIVE_VECTOR_EXTENSION_NAME'
--
-- -   'NV_COOPERATIVE_VECTOR_SPEC_VERSION'
--
-- -   Extending 'ComponentTypeKHR':
--
--     -   'COMPONENT_TYPE_FLOAT_E4M3_NV'
--
--     -   'COMPONENT_TYPE_FLOAT_E5M2_NV'
--
--     -   'COMPONENT_TYPE_SINT8_PACKED_NV'
--
--     -   'COMPONENT_TYPE_UINT8_PACKED_NV'
--
-- -   Extending
--     'Vulkan.Core13.Enums.PipelineStageFlags2.PipelineStageFlagBits2':
--
--     -   'Vulkan.Core13.Enums.PipelineStageFlags2.PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV'
--
-- -   Extending 'Vulkan.Core10.Enums.StructureType.StructureType':
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_COOPERATIVE_VECTOR_PROPERTIES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_FEATURES_NV'
--
--     -   'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_VECTOR_PROPERTIES_NV'
--
-- == New SPIR-V Capabilities
--
-- -   <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#spirvenv-capabilities-table-CooperativeVectorNV CooperativeVectorNV>
--
-- == Version History
--
-- -   Revision 4, 2024-05-23 (Jeff Bolz)
--
--     -   Add maxCooperativeVectorComponents
--
-- -   Revision 3, 2024-05-23 (Jeff Bolz)
--
--     -   Add training functions
--
-- -   Revision 2, 2024-02-10 (Jeff Bolz)
--
--     -   Add device-side matrix conversion
--
-- -   Revision 1, 2023-12-13 (Jeff Bolz)
--
--     -   Initial revisions
--
-- == 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_vector 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_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

-- | vkGetPhysicalDeviceCooperativeVectorPropertiesNV - Returns properties
-- describing what cooperative vector types are supported
--
-- = Description
--
-- If @pProperties@ is @NULL@, then the number of cooperative vector
-- properties available is returned in @pPropertyCount@. Otherwise,
-- @pPropertyCount@ /must/ point to a variable set by the user 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 of
-- cooperative vector 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 cooperative vector properties were
-- returned.
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkGetPhysicalDeviceCooperativeVectorPropertiesNV-physicalDevice-parameter#
--     @physicalDevice@ /must/ be a valid
--     'Vulkan.Core10.Handles.PhysicalDevice' handle
--
-- -   #VUID-vkGetPhysicalDeviceCooperativeVectorPropertiesNV-pPropertyCount-parameter#
--     @pPropertyCount@ /must/ be a valid pointer to a @uint32_t@ value
--
-- -   #VUID-vkGetPhysicalDeviceCooperativeVectorPropertiesNV-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@ 'CooperativeVectorPropertiesNV'
--     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_vector VK_NV_cooperative_vector>,
-- 'CooperativeVectorPropertiesNV', 'Vulkan.Core10.Handles.PhysicalDevice'
getPhysicalDeviceCooperativeVectorPropertiesNV :: forall io
                                                . (MonadIO io)
                                               => -- | @physicalDevice@ is the physical device.
                                                  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

-- | vkConvertCooperativeVectorMatrixNV - Convert a cooperative vector matrix
-- from one layout and type to another
--
-- = Description
--
-- If @pInfo->dstData@ is @NULL@, then the number of bytes required to
-- store the converted matrix is returned in @pDstSize@. Otherwise,
-- @pInfo->pDstSize@ /must/ point to a variable set by the user to the
-- number of bytes in @pInfo->dstData@, and on return the variable is
-- overwritten with the number of bytes actually written to
-- @pInfo->dstData@. @pInfo->srcData@ /can/ be @NULL@ when @pInfo->dstData@
-- is @NULL@. If @pInfo->pDstSize@ is less than the number of bytes
-- required to store the converted matrix, no bytes will be written, and
-- 'Vulkan.Core10.Enums.Result.INCOMPLETE' will be returned instead of
-- 'Vulkan.Core10.Enums.Result.SUCCESS', to indicate that not enough space
-- was provided.
--
-- == Valid Usage
--
-- -   #VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10073# If
--     @pInfo->srcData.hostAddress@ is @NULL@, then
--     @pInfo->dstData.hostAddress@ /must/ be @NULL@
--
-- -   #VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10074# If
--     @pInfo->srcData.hostAddress@ is not @NULL@, then @pInfo->srcSize@
--     /must/ be large enough to contain the source matrix, based either on
--     the standard matrix layout or based on the size filled out by this
--     command
--
-- -   #VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10075# If
--     @pInfo->dstData.hostAddress@ is not @NULL@, then the value pointed
--     to by @pInfo->pDstSize@ /must/ be large enough to contain the
--     destination matrix, based either on the standard matrix layout or
--     based on the size filled out by this command
--
-- -   #VUID-vkConvertCooperativeVectorMatrixNV-pInfo-10076# If
--     @pInfo->dstData.hostAddress@ is not @NULL@, the source and
--     destination memory ranges /must/ not overlap
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkConvertCooperativeVectorMatrixNV-device-parameter# @device@
--     /must/ be a valid 'Vulkan.Core10.Handles.Device' handle
--
-- -   #VUID-vkConvertCooperativeVectorMatrixNV-pInfo-parameter# @pInfo@
--     /must/ be a valid pointer to a valid
--     'ConvertCooperativeVectorMatrixInfoNV' structure
--
-- == 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_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_vector VK_NV_cooperative_vector>,
-- 'ConvertCooperativeVectorMatrixInfoNV', 'Vulkan.Core10.Handles.Device'
convertCooperativeVectorMatrixNV :: forall io
                                  . (MonadIO io)
                                 => -- | @device@ is the device.
                                    Device
                                 -> -- | @pInfo@ is a pointer to a 'ConvertCooperativeVectorMatrixInfoNV'
                                    -- structure containing information about the layout conversion.
                                    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 ()

-- | vkCmdConvertCooperativeVectorMatrixNV - Convert a cooperative vector
-- matrix from one layout and type to another
--
-- = Description
--
-- This command does the same conversions as
-- 'convertCooperativeVectorMatrixNV', but executes on the device. One
-- conversion is performed for each of the @infoCount@ elements of
-- @pInfos@.
--
-- This command’s execution is synchronized using
-- 'Vulkan.Core13.Enums.PipelineStageFlags2.PIPELINE_STAGE_2_CONVERT_COOPERATIVE_VECTOR_MATRIX_BIT_NV'.
--
-- == Valid Usage
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10083# For each
--     element of @pInfo@, @srcData.deviceAddress@ /must/ be a valid
--     'Vulkan.Core10.FundamentalTypes.DeviceAddress'
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10895# For each
--     element of @pInfo@, @dstData.deviceAddress@ /must/ be a valid
--     'Vulkan.Core10.FundamentalTypes.DeviceAddress'
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10084# For each
--     element of @pInfo@, @srcData.deviceAddress@ /must/ be 64 byte
--     aligned
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10085# For each
--     element of @pInfo@, @dstData.deviceAddress@ /must/ be 64 byte
--     aligned
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10086# For each
--     element of @pInfo@, @srcSize@ /must/ be large enough to contain the
--     source matrix, based either on the standard matrix layout or based
--     on the size filled out by 'convertCooperativeVectorMatrixNV'
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfo-10087# For each
--     element of @pInfo@, the value pointed to by @pDstSize@ /must/ be
--     large enough to contain the destination matrix, based either on the
--     standard matrix layout or based on the size filled out by
--     'convertCooperativeVectorMatrixNV'
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-None-10088# Memory
--     accessed by the sources and destinations of all of the conversions
--     /must/ not overlap
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-commandBuffer-parameter#
--     @commandBuffer@ /must/ be a valid
--     'Vulkan.Core10.Handles.CommandBuffer' handle
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-pInfos-parameter#
--     @pInfos@ /must/ be a valid pointer to an array of @infoCount@ valid
--     'ConvertCooperativeVectorMatrixInfoNV' structures
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-commandBuffer-recording#
--     @commandBuffer@ /must/ be in the
--     <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#commandbuffers-lifecycle recording state>
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-commandBuffer-cmdpool#
--     The 'Vulkan.Core10.Handles.CommandPool' that @commandBuffer@ was
--     allocated from /must/ support
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT', or
--     'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_GRAPHICS_BIT' operations
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-renderpass# This command
--     /must/ only be called outside of a render pass instance
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-suspended# This command
--     /must/ not be called between suspended render pass instances
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-videocoding# This
--     command /must/ only be called outside of a video coding scope
--
-- -   #VUID-vkCmdConvertCooperativeVectorMatrixNV-infoCount-arraylength#
--     @infoCount@ /must/ be greater than @0@
--
-- == Host Synchronization
--
-- -   Host access to @commandBuffer@ /must/ be externally synchronized
--
-- -   Host access to the 'Vulkan.Core10.Handles.CommandPool' that
--     @commandBuffer@ was allocated from /must/ be externally synchronized
--
-- == Command Properties
--
-- \'
--
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
-- | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkCommandBufferLevel Command Buffer Levels> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginRenderPass Render Pass Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#vkCmdBeginVideoCodingKHR Video Coding Scope> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VkQueueFlagBits Supported Queue Types> | <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#fundamentals-queueoperation-command-types Command Type> |
-- +============================================================================================================================+========================================================================================================================+=============================================================================================================================+=======================================================================================================================+========================================================================================================================================+
-- | Primary                                                                                                                    | Outside                                                                                                                | Outside                                                                                                                     | VK_QUEUE_COMPUTE_BIT                                                                                                  | Action                                                                                                                                 |
-- | Secondary                                                                                                                  |                                                                                                                        |                                                                                                                             | VK_QUEUE_GRAPHICS_BIT                                                                                                 |                                                                                                                                        |
-- +----------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+
--
-- == Conditional Rendering
--
-- vkCmdConvertCooperativeVectorMatrixNV is not affected by
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#drawing-conditional-rendering conditional rendering>
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_vector VK_NV_cooperative_vector>,
-- 'Vulkan.Core10.Handles.CommandBuffer',
-- 'ConvertCooperativeVectorMatrixInfoNV'
cmdConvertCooperativeVectorMatrixNV :: forall io
                                     . (MonadIO io)
                                    => -- | @commandBuffer@ is the command buffer into which the command will be
                                       -- recorded.
                                       CommandBuffer
                                    -> -- | @pInfos@ is a pointer to an array of
                                       -- 'ConvertCooperativeVectorMatrixInfoNV' structures containing information
                                       -- about the layout conversion.
                                       ("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 $ ()


-- No documentation found for TopLevel "VK_COMPONENT_TYPE_FLOAT_E4M3_NV"
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


-- No documentation found for TopLevel "VK_COMPONENT_TYPE_FLOAT_E5M2_NV"
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


-- | VkPhysicalDeviceCooperativeVectorFeaturesNV - Structure describing
-- cooperative vector features that can be supported by an implementation
--
-- = Members
--
-- This structure describes the following features:
--
-- = Description
--
-- If the 'PhysicalDeviceCooperativeVectorFeaturesNV' 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
-- 'PhysicalDeviceCooperativeVectorFeaturesNV', 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_vector VK_NV_cooperative_vector>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceCooperativeVectorFeaturesNV = PhysicalDeviceCooperativeVectorFeaturesNV
  { -- | #features-cooperativeVector# @cooperativeVector@ indicates that the
    -- implementation supports the @CooperativeVectorNV@ SPIR-V capability.
    PhysicalDeviceCooperativeVectorFeaturesNV -> Bool
cooperativeVector :: Bool
  , -- | #features-cooperativeVectorTraining# @cooperativeVectorTraining@
    -- indicates that the implementation supports the
    -- @CooperativeVectorTrainingNV@ SPIR-V capability.
    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


-- | VkCooperativeVectorPropertiesNV - Structure specifying cooperative
-- vector properties
--
-- = Description
--
-- 'COMPONENT_TYPE_SINT8_PACKED_NV' and 'COMPONENT_TYPE_UINT8_PACKED_NV'
-- /must/ not be used for members other than @inputInterpretation@.
--
-- The following combinations /must/ be supported (each row is a required
-- combination):
--
-- +-------------+---------------------+----------------------+--------------------+-------------+
-- | inputType   | inputInterpretation | matrixInterpretation | biasInterpretation | resultType  |
-- +=============+=====================+======================+====================+=============+
-- | FLOAT16     | FLOAT16             | FLOAT16              | FLOAT16            | FLOAT16     |
-- +-------------+---------------------+----------------------+--------------------+-------------+
-- | UINT32      | SINT8_PACKED        | SINT8                | SINT32             | SINT32      |
-- +-------------+---------------------+----------------------+--------------------+-------------+
-- | SINT8       | SINT8               | SINT8                | SINT32             | SINT32      |
-- +-------------+---------------------+----------------------+--------------------+-------------+
-- | FLOAT32     | SINT8               | SINT8                | SINT32             | SINT32      |
-- +-------------+---------------------+----------------------+--------------------+-------------+
-- | FLOAT16     | FLOAT_E4M3          | FLOAT_E4M3           | FLOAT16            | FLOAT16     |
-- +-------------+---------------------+----------------------+--------------------+-------------+
-- | FLOAT16     | FLOAT_E5M2          | FLOAT_E5M2           | FLOAT16            | FLOAT16     |
-- +-------------+---------------------+----------------------+--------------------+-------------+
--
-- == Valid Usage (Implicit)
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_vector VK_NV_cooperative_vector>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32', 'ComponentTypeKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'getPhysicalDeviceCooperativeVectorPropertiesNV'
data CooperativeVectorPropertiesNV = CooperativeVectorPropertiesNV
  { -- | @inputType@ is the component type of vector @Input@, of type
    -- 'ComponentTypeKHR'.
    --
    -- #VUID-VkCooperativeVectorPropertiesNV-inputType-parameter# @inputType@
    -- /must/ be a valid 'ComponentTypeKHR' value
    CooperativeVectorPropertiesNV -> ComponentTypeKHR
inputType :: ComponentTypeKHR
  , -- | @inputInterpretation@ is the value of @InputInterpretation@, of type
    -- 'ComponentTypeKHR'.
    --
    -- #VUID-VkCooperativeVectorPropertiesNV-inputInterpretation-parameter#
    -- @inputInterpretation@ /must/ be a valid 'ComponentTypeKHR' value
    CooperativeVectorPropertiesNV -> ComponentTypeKHR
inputInterpretation :: ComponentTypeKHR
  , -- | @matrixInterpretation@ is the value of @MatrixInterpretation@, of type
    -- 'ComponentTypeKHR'.
    --
    -- #VUID-VkCooperativeVectorPropertiesNV-matrixInterpretation-parameter#
    -- @matrixInterpretation@ /must/ be a valid 'ComponentTypeKHR' value
    CooperativeVectorPropertiesNV -> ComponentTypeKHR
matrixInterpretation :: ComponentTypeKHR
  , -- | @biasInterpretation@ is the value of @BiasInterpretation@, of type
    -- 'ComponentTypeKHR'.
    --
    -- #VUID-VkCooperativeVectorPropertiesNV-biasInterpretation-parameter#
    -- @biasInterpretation@ /must/ be a valid 'ComponentTypeKHR' value
    CooperativeVectorPropertiesNV -> ComponentTypeKHR
biasInterpretation :: ComponentTypeKHR
  , -- | @resultType@ is the component type of
    -- 'Vulkan.Core10.Enums.Result.Result' @Type@, of type 'ComponentTypeKHR'.
    --
    -- #VUID-VkCooperativeVectorPropertiesNV-resultType-parameter# @resultType@
    -- /must/ be a valid 'ComponentTypeKHR' value
    CooperativeVectorPropertiesNV -> ComponentTypeKHR
resultType :: ComponentTypeKHR
  , -- | @transpose@ is a boolean indicating whether opaque layout matrices with
    -- this combination of input and output types supports transposition.
    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


-- | VkPhysicalDeviceCooperativeVectorPropertiesNV - Structure describing
-- cooperative vector properties supported by an implementation
--
-- = Description
--
-- If the 'PhysicalDeviceCooperativeVectorPropertiesNV' 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_vector VK_NV_cooperative_vector>,
-- 'Vulkan.Core10.FundamentalTypes.Bool32',
-- 'Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlags',
-- 'Vulkan.Core10.Enums.StructureType.StructureType'
data PhysicalDeviceCooperativeVectorPropertiesNV = PhysicalDeviceCooperativeVectorPropertiesNV
  { -- | #limits-cooperativeVectorSupportedStages#
    -- @cooperativeVectorSupportedStages@ is a bitfield of
    -- 'Vulkan.Core10.Enums.ShaderStageFlagBits.ShaderStageFlagBits' describing
    -- the shader stages that cooperative vector instructions are supported in.
    -- @cooperativeVectorSupportedStages@ will have the
    -- 'Vulkan.Core10.Enums.ShaderStageFlagBits.SHADER_STAGE_COMPUTE_BIT' bit
    -- set if any of the physical device’s queues support
    -- 'Vulkan.Core10.Enums.QueueFlagBits.QUEUE_COMPUTE_BIT'.
    PhysicalDeviceCooperativeVectorPropertiesNV -> ShaderStageFlags
cooperativeVectorSupportedStages :: ShaderStageFlags
  , -- | #limits-cooperativeVectorTrainingFloat16Accumulation#
    -- @cooperativeVectorTrainingFloat16Accumulation@ is
    -- 'Vulkan.Core10.FundamentalTypes.TRUE' if the implementation supports
    -- cooperative vector training functions accumulating 16-bit floating-point
    -- results.
    PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
cooperativeVectorTrainingFloat16Accumulation :: Bool
  , -- | #limits-cooperativeVectorTrainingFloat32Accumulation#
    -- @cooperativeVectorTrainingFloat32Accumulation@ is
    -- 'Vulkan.Core10.FundamentalTypes.TRUE' if the implementation supports
    -- cooperative vector training functions accumulating 32-bit floating-point
    -- results.
    PhysicalDeviceCooperativeVectorPropertiesNV -> Bool
cooperativeVectorTrainingFloat32Accumulation :: Bool
  , -- | #limits-maxCooperativeVectorComponents# @maxCooperativeVectorComponents@
    -- indicates the maximum number of components that /can/ be in a
    -- cooperative vector.
    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


-- | VkConvertCooperativeVectorMatrixInfoNV - Structure specifying a request
-- to convert the layout and type of a cooperative vector matrix
--
-- = Description
--
-- When called from 'cmdConvertCooperativeVectorMatrixNV', the
-- @deviceAddress@ members of @srcData@ and @dstData@ are used. When called
-- from 'convertCooperativeVectorMatrixNV', the @hostAddress@ members of
-- @srcData@ and @dstData@ are used.
--
-- For each of the source and destination matrix, if the layout is not
-- either 'COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV' or
-- 'COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV', then the
-- corresponding stride parameter is ignored.
--
-- The size of the destination is only a function of the destination layout
-- information, and does not depend on the source layout information.
--
-- Conversion /can/ be used to convert between 'COMPONENT_TYPE_FLOAT32_KHR'
-- or 'COMPONENT_TYPE_FLOAT16_KHR' and any supported lower-precision
-- floating-point type. In this case, the conversion uses
-- round-to-nearest-even rounding.
--
-- == Valid Usage
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-srcLayout-10077# If
--     @srcLayout@ is row-major or column-major, then @srcStride@ /must/ be
--     greater than the length of a row\/column, and a multiple of the
--     element size
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-dstLayout-10078# If
--     @dstLayout@ is row-major or column-major, then @dstStride@ /must/ be
--     greater than the length of a row\/column, and a multiple of the
--     element size
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-srcComponentType-10079#
--     If @srcComponentType@ is not a supported
--     'CooperativeVectorPropertiesNV'::@matrixInterpretation@ value as
--     reported by 'getPhysicalDeviceCooperativeVectorPropertiesNV', then
--     @srcComponentType@ /must/ be 'COMPONENT_TYPE_FLOAT32_KHR'
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-dstComponentType-10080#
--     If @dstComponentType@ is not a supported
--     'CooperativeVectorPropertiesNV'::@matrixInterpretation@ value as
--     reported by 'getPhysicalDeviceCooperativeVectorPropertiesNV', then
--     @dstComponentType@ /must/ be 'COMPONENT_TYPE_FLOAT32_KHR'
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-srcComponentType-10081#
--     If @srcComponentType@ and @dstComponentType@ are not equal, then one
--     /must/ be 'COMPONENT_TYPE_FLOAT32_KHR' or
--     'COMPONENT_TYPE_FLOAT16_KHR' and the other /must/ be a
--     lower-precision floating-point type
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-dstComponentType-10082#
--     If @dstComponentType@ is 'COMPONENT_TYPE_FLOAT_E4M3_NV' or
--     'COMPONENT_TYPE_FLOAT_E5M2_NV', then @dstLayout@ /must/ be
--     'COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV' or
--     'COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV'
--
-- == Valid Usage (Implicit)
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-sType-sType# @sType@
--     /must/ be
--     'Vulkan.Core10.Enums.StructureType.STRUCTURE_TYPE_CONVERT_COOPERATIVE_VECTOR_MATRIX_INFO_NV'
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-pNext-pNext# @pNext@
--     /must/ be @NULL@
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-srcData-parameter#
--     @srcData@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressConstKHR'
--     union
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-pDstSize-parameter#
--     @pDstSize@ /must/ be a valid pointer to a @size_t@ value
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-dstData-parameter#
--     @dstData@ /must/ be a valid
--     'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressKHR'
--     union
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-srcComponentType-parameter#
--     @srcComponentType@ /must/ be a valid 'ComponentTypeKHR' value
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-dstComponentType-parameter#
--     @dstComponentType@ /must/ be a valid 'ComponentTypeKHR' value
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-srcLayout-parameter#
--     @srcLayout@ /must/ be a valid 'CooperativeVectorMatrixLayoutNV'
--     value
--
-- -   #VUID-VkConvertCooperativeVectorMatrixInfoNV-dstLayout-parameter#
--     @dstLayout@ /must/ be a valid 'CooperativeVectorMatrixLayoutNV'
--     value
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_vector VK_NV_cooperative_vector>,
-- 'ComponentTypeKHR', 'CooperativeVectorMatrixLayoutNV',
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressConstKHR',
-- 'Vulkan.Extensions.VK_KHR_acceleration_structure.DeviceOrHostAddressKHR',
-- 'Vulkan.Core10.Enums.StructureType.StructureType',
-- 'cmdConvertCooperativeVectorMatrixNV',
-- 'convertCooperativeVectorMatrixNV'
data ConvertCooperativeVectorMatrixInfoNV = ConvertCooperativeVectorMatrixInfoNV
  { -- | @srcSize@ is the length in bytes of @srcData@.
    ConvertCooperativeVectorMatrixInfoNV -> Word64
srcSize :: Word64
  , -- | @srcData@ is either @NULL@ or a pointer to the source data in the source
    -- layout.
    ConvertCooperativeVectorMatrixInfoNV -> DeviceOrHostAddressConstKHR
srcData :: DeviceOrHostAddressConstKHR
  , -- | @pDstSize@ is a pointer to an integer related to the number of bytes
    -- required or requested to convert.
    ConvertCooperativeVectorMatrixInfoNV -> Ptr CSize
dstSize :: Ptr CSize
  , -- | @dstData@ is either @NULL@ or a pointer to the destination data in the
    -- destination layout.
    ConvertCooperativeVectorMatrixInfoNV -> DeviceOrHostAddressKHR
dstData :: DeviceOrHostAddressKHR
  , -- | @srcComponentType@ is the type of a source matrix element.
    ConvertCooperativeVectorMatrixInfoNV -> ComponentTypeKHR
srcComponentType :: ComponentTypeKHR
  , -- | @dstComponentType@ is the type of a destination matrix element.
    ConvertCooperativeVectorMatrixInfoNV -> ComponentTypeKHR
dstComponentType :: ComponentTypeKHR
  , -- | @numRows@ is the number of rows in the matrix.
    ConvertCooperativeVectorMatrixInfoNV -> Word32
numRows :: Word32
  , -- | @numColumns@ is the number of columns in the matrix.
    ConvertCooperativeVectorMatrixInfoNV -> Word32
numColumns :: Word32
  , -- | @srcLayout@ is the layout of the source matrix.
    ConvertCooperativeVectorMatrixInfoNV
-> CooperativeVectorMatrixLayoutNV
srcLayout :: CooperativeVectorMatrixLayoutNV
  , -- | @srcStride@ is the number of bytes between a consecutive row or column
    -- (depending on @srcLayout@) of the source matrix, if it is row-major or
    -- column-major.
    ConvertCooperativeVectorMatrixInfoNV -> Word64
srcStride :: Word64
  , -- | @dstLayout@ is the layout the matrix is converted to.
    ConvertCooperativeVectorMatrixInfoNV
-> CooperativeVectorMatrixLayoutNV
dstLayout :: CooperativeVectorMatrixLayoutNV
  , -- | @dstStride@ is the number of bytes between a consecutive row or column
    -- (depending on @dstLayout@) of destination matrix, if it is row-major or
    -- column-major.
    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


-- | VkComponentTypeKHR - Specify SPIR-V cooperative matrix component type
--
-- = Description
--
-- -   'COMPONENT_TYPE_FLOAT16_KHR' corresponds to SPIR-V @OpTypeFloat@ 16.
--
-- -   'COMPONENT_TYPE_FLOAT32_KHR' corresponds to SPIR-V @OpTypeFloat@ 32.
--
-- -   'COMPONENT_TYPE_FLOAT64_KHR' corresponds to SPIR-V @OpTypeFloat@ 64.
--
-- -   'COMPONENT_TYPE_SINT8_KHR' corresponds to SPIR-V @OpTypeInt@ 8 0\/1.
--
-- -   'COMPONENT_TYPE_SINT16_KHR' corresponds to SPIR-V @OpTypeInt@ 16
--     0\/1.
--
-- -   'COMPONENT_TYPE_SINT32_KHR' corresponds to SPIR-V @OpTypeInt@ 32
--     0\/1.
--
-- -   'COMPONENT_TYPE_SINT64_KHR' corresponds to SPIR-V @OpTypeInt@ 64
--     0\/1.
--
-- -   'COMPONENT_TYPE_UINT8_KHR' corresponds to SPIR-V @OpTypeInt@ 8 0\/1.
--
-- -   'COMPONENT_TYPE_UINT16_KHR' corresponds to SPIR-V @OpTypeInt@ 16
--     0\/1.
--
-- -   'COMPONENT_TYPE_UINT32_KHR' corresponds to SPIR-V @OpTypeInt@ 32
--     0\/1.
--
-- -   'COMPONENT_TYPE_UINT64_KHR' corresponds to SPIR-V @OpTypeInt@ 64
--     0\/1.
--
-- -   'COMPONENT_TYPE_BFLOAT16_KHR' corresponds to SPIR-V @OpTypeFloat@ 16
--     BFloat16KHR.
--
-- -   'COMPONENT_TYPE_SINT8_PACKED_NV' corresponds to four 8-bit signed
--     integers packed in a 32-bit unsigned integer.
--
-- -   'COMPONENT_TYPE_UINT8_PACKED_NV' corresponds to four 8-bit unsigned
--     integers packed in a 32-bit unsigned integer.
--
-- -   'COMPONENT_TYPE_FLOAT_E4M3_NV' corresponds to a floating-point type
--     with a sign bit in the most significant bit, followed by four
--     exponent bits, followed by three mantissa bits.
--
-- -   'COMPONENT_TYPE_FLOAT_E5M2_NV' corresponds to a floating-point type
--     with a sign bit in the most significant bit, followed by five
--     exponent bits, followed by two mantissa bits.
--
-- -   'COMPONENT_TYPE_FLOAT8_E4M3_EXT' corresponds to SPIR-V @OpTypeFloat@
--     8 Float8E4M3EXT.
--
-- -   'COMPONENT_TYPE_FLOAT8_E5M2_EXT' corresponds to SPIR-V @OpTypeFloat@
--     8 Float8E5M2EXT.
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_KHR_cooperative_matrix VK_KHR_cooperative_matrix>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_matrix VK_NV_cooperative_matrix>,
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_vector VK_NV_cooperative_vector>,
-- 'ConvertCooperativeVectorMatrixInfoNV',
-- 'Vulkan.Extensions.VK_NV_cooperative_matrix2.CooperativeMatrixFlexibleDimensionsPropertiesNV',
-- 'Vulkan.Extensions.VK_KHR_cooperative_matrix.CooperativeMatrixPropertiesKHR',
-- 'Vulkan.Extensions.VK_NV_cooperative_matrix.CooperativeMatrixPropertiesNV',
-- 'CooperativeVectorPropertiesNV'
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)

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_FLOAT16_KHR"
pattern $mCOMPONENT_TYPE_FLOAT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT16_KHR = ComponentTypeKHR 0

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_FLOAT32_KHR"
pattern $mCOMPONENT_TYPE_FLOAT32_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT32_KHR :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT32_KHR = ComponentTypeKHR 1

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_FLOAT64_KHR"
pattern $mCOMPONENT_TYPE_FLOAT64_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_FLOAT64_KHR :: ComponentTypeKHR
COMPONENT_TYPE_FLOAT64_KHR = ComponentTypeKHR 2

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_SINT8_KHR"
pattern $mCOMPONENT_TYPE_SINT8_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT8_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT8_KHR = ComponentTypeKHR 3

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_SINT16_KHR"
pattern $mCOMPONENT_TYPE_SINT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT16_KHR = ComponentTypeKHR 4

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_SINT32_KHR"
pattern $mCOMPONENT_TYPE_SINT32_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT32_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT32_KHR = ComponentTypeKHR 5

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_SINT64_KHR"
pattern $mCOMPONENT_TYPE_SINT64_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_SINT64_KHR :: ComponentTypeKHR
COMPONENT_TYPE_SINT64_KHR = ComponentTypeKHR 6

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_UINT8_KHR"
pattern $mCOMPONENT_TYPE_UINT8_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT8_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT8_KHR = ComponentTypeKHR 7

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_UINT16_KHR"
pattern $mCOMPONENT_TYPE_UINT16_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT16_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT16_KHR = ComponentTypeKHR 8

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_UINT32_KHR"
pattern $mCOMPONENT_TYPE_UINT32_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT32_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT32_KHR = ComponentTypeKHR 9

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_UINT64_KHR"
pattern $mCOMPONENT_TYPE_UINT64_KHR :: forall {r}. ComponentTypeKHR -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOMPONENT_TYPE_UINT64_KHR :: ComponentTypeKHR
COMPONENT_TYPE_UINT64_KHR = ComponentTypeKHR 10

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_FLOAT8_E5M2_EXT"
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

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_FLOAT8_E4M3_EXT"
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

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_UINT8_PACKED_NV"
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

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_SINT8_PACKED_NV"
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

-- No documentation found for Nested "VkComponentTypeKHR" "VK_COMPONENT_TYPE_BFLOAT16_KHR"
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

-- | VkCooperativeVectorMatrixLayoutNV - Specify cooperative vector matrix
-- layout
--
-- = Description
--
-- -   'COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV' corresponds to
--     SPIR-V @RowMajorNV@ layout.
--
-- -   'COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV' corresponds to
--     SPIR-V @ColumnMajorNV@ layout.
--
-- -   'COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV'
--     corresponds to SPIR-V @InferencingOptimalNV@ layout.
--
-- -   'COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV' corresponds
--     to SPIR-V @TrainingOptimalNV@ layout.
--
-- All enum values match the corresponding SPIR-V value.
--
-- Row-major layout has elements of each row stored consecutively in
-- memory, with a controllable stride from the start of one row to the
-- start of the next row. Column-major layout has elements of each column
-- stored consecutively in memory, with a controllable stride from the
-- start of one column to the start of the next column. Inferencing-optimal
-- and Training-optimal layouts are implementation-dependent, and the
-- application /can/ convert a matrix to those layouts using
-- 'convertCooperativeVectorMatrixNV' or
-- 'cmdConvertCooperativeVectorMatrixNV'. Training-optimal layout with
-- 'COMPONENT_TYPE_FLOAT16_KHR' or 'COMPONENT_TYPE_FLOAT32_KHR' type has
-- the additional guarantee that the application /can/ reinterpret the data
-- as an array of elements and perform element-wise operations on the data,
-- and finite values in any padding elements do not affect the result of a
-- matrix-vector multiply (inf\/NaN values /may/ still cause NaN values in
-- the result).
--
-- = See Also
--
-- <https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#VK_NV_cooperative_vector VK_NV_cooperative_vector>,
-- 'ConvertCooperativeVectorMatrixInfoNV'
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)

-- No documentation found for Nested "VkCooperativeVectorMatrixLayoutNV" "VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV"
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

-- No documentation found for Nested "VkCooperativeVectorMatrixLayoutNV" "VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_COLUMN_MAJOR_NV"
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

-- No documentation found for Nested "VkCooperativeVectorMatrixLayoutNV" "VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_INFERENCING_OPTIMAL_NV"
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

-- No documentation found for Nested "VkCooperativeVectorMatrixLayoutNV" "VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_TRAINING_OPTIMAL_NV"
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

-- No documentation found for TopLevel "VK_NV_COOPERATIVE_VECTOR_SPEC_VERSION"
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"

-- No documentation found for TopLevel "VK_NV_COOPERATIVE_VECTOR_EXTENSION_NAME"
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"