C Specification
Each VkConvertCooperativeVectorMatrixInfoNV structure describes a
request to convert the layout and type of a cooperative vector matrix.
The VkConvertCooperativeVectorMatrixInfoNV structure is defined as:
// Provided by VK_NV_cooperative_vector
typedef struct VkConvertCooperativeVectorMatrixInfoNV {
VkStructureType sType;
const void* pNext;
size_t srcSize;
VkDeviceOrHostAddressConstKHR srcData;
size_t* pDstSize;
VkDeviceOrHostAddressKHR dstData;
VkComponentTypeKHR srcComponentType;
VkComponentTypeKHR dstComponentType;
uint32_t numRows;
uint32_t numColumns;
VkCooperativeVectorMatrixLayoutNV srcLayout;
size_t srcStride;
VkCooperativeVectorMatrixLayoutNV dstLayout;
size_t dstStride;
} VkConvertCooperativeVectorMatrixInfoNV;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
srcSizeis the length in bytes ofsrcData. -
srcDatais eitherNULLor a pointer to the source data in the source layout. -
pDstSizeis a pointer to an integer related to the number of bytes required or requested to convert. -
dstDatais eitherNULLor a pointer to the destination data in the destination layout. -
srcComponentTypeis the type of a source matrix element. -
dstComponentTypeis the type of a destination matrix element. -
numRowsis the number of rows in the matrix. -
numColumnsis the number of columns in the matrix. -
srcLayoutis the layout of the source matrix. -
srcStrideis the number of bytes between a consecutive row or column (depending onsrcLayout) of the source matrix, if it is row-major or column-major. -
dstLayoutis the layout the matrix is converted to. -
dstStrideis the number of bytes between a consecutive row or column (depending ondstLayout) of destination matrix, if it is row-major or column-major.
Description
When called from vkCmdConvertCooperativeVectorMatrixNV, the
deviceAddress members of srcData and dstData are used.
When called from vkConvertCooperativeVectorMatrixNV, the
hostAddress members of srcData and dstData are used.
For each of the source and destination matrix, if the layout is not either
VK_COOPERATIVE_VECTOR_MATRIX_LAYOUT_ROW_MAJOR_NV or
VK_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
VK_COMPONENT_TYPE_FLOAT32_KHR or VK_COMPONENT_TYPE_FLOAT16_KHR
and any supported lower-precision floating-point type.
In this case, the conversion uses round-to-nearest-even rounding.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.