@@ -437,6 +437,16 @@ impl From<VectorSize> for u32 {
437437 }
438438}
439439
440+ /// Number of components in a cooperative vector.
441+ #[ repr( u8 ) ]
442+ #[ derive( Clone , Copy , Debug , Hash , Eq , Ord , PartialEq , PartialOrd ) ]
443+ #[ cfg_attr( feature = "serialize" , derive( Serialize ) ) ]
444+ #[ cfg_attr( feature = "deserialize" , derive( Deserialize ) ) ]
445+ #[ cfg_attr( feature = "arbitrary" , derive( Arbitrary ) ) ]
446+ pub enum CooperativeVectorSize {
447+ Eight = 8 ,
448+ }
449+
440450/// Primitive type for a scalar.
441451#[ repr( u8 ) ]
442452#[ derive( Clone , Copy , Debug , Hash , Eq , Ord , PartialEq , PartialOrd ) ]
@@ -464,6 +474,24 @@ pub enum ScalarKind {
464474 AbstractFloat ,
465475}
466476
477+ /// Primitive type for a scalar.
478+ #[ repr( u8 ) ]
479+ #[ derive( Clone , Copy , Debug , Hash , Eq , Ord , PartialEq , PartialOrd ) ]
480+ #[ cfg_attr( feature = "serialize" , derive( Serialize ) ) ]
481+ #[ cfg_attr( feature = "deserialize" , derive( Deserialize ) ) ]
482+ #[ cfg_attr( feature = "arbitrary" , derive( Arbitrary ) ) ]
483+ pub enum CooperativeScalar {
484+ F32 ,
485+ }
486+
487+ impl CooperativeScalar {
488+ pub const fn width ( & self ) -> Bytes {
489+ match * self {
490+ Self :: F32 => 4 ,
491+ }
492+ }
493+ }
494+
467495/// Characteristics of a scalar type.
468496#[ derive( Clone , Copy , Debug , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
469497#[ cfg_attr( feature = "serialize" , derive( Serialize ) ) ]
@@ -712,6 +740,13 @@ pub enum TypeInner {
712740 rows : VectorSize ,
713741 scalar : Scalar ,
714742 } ,
743+ /// Matrix that is cooperatively processed by all the threads
744+ /// in an opaque mapping.
745+ CooperativeMatrix {
746+ columns : CooperativeVectorSize ,
747+ rows : CooperativeVectorSize ,
748+ scalar : CooperativeScalar ,
749+ } ,
715750 /// Atomic scalar.
716751 Atomic ( Scalar ) ,
717752 /// Pointer to another type.
0 commit comments