@@ -298,7 +298,7 @@ macro_rules! where_clause {
298
298
299
299
/// Nicer notation for [`TypeSet`] values.
300
300
macro_rules! typeset {
301
- ( ( vecN or scalar < $scalar: ident > ) ) => (
301
+ ( ( vecN or scalar < $scalar: tt > ) ) => (
302
302
TypeSet {
303
303
constructors: ConstructorSet :: VECN . union ( ConstructorSet :: SCALAR ) ,
304
304
scalars: scalar!( $scalar) ,
@@ -310,7 +310,7 @@ macro_rules! typeset {
310
310
scalars: scalar!( $scalar) ,
311
311
}
312
312
) ;
313
- ( $scalar: ident ) => (
313
+ ( $scalar: tt ) => (
314
314
TypeSet {
315
315
constructors: ConstructorSet :: SCALAR ,
316
316
scalars: scalar!( $scalar) ,
@@ -322,11 +322,14 @@ macro_rules! typeset {
322
322
macro_rules! scalar {
323
323
( numeric ) => ( ScalarSet :: NUMERIC ) ;
324
324
( float ) => ( ScalarSet :: ANY_FLOAT ) ;
325
+ ( ( concrete integer ) ) => ( ScalarSet :: CONCRETE_INTEGER ) ;
326
+ ( u32 ) => ( ScalarSet :: UINT_32 ) ;
325
327
}
326
328
327
329
/// Nicer notation for [`ReturnType`] values.
328
330
macro_rules! return_type {
329
331
( T ) => { ReturnType :: Match ( 0 ) } ;
332
+ ( S ) => { ReturnType :: Match ( 1 ) } ;
330
333
( ( scalar T ) ) => { ReturnType :: MatchScalar ( 0 ) } ;
331
334
}
332
335
@@ -378,6 +381,7 @@ impl crate::MathFunction {
378
381
Mf :: Atan2 => b ! ( ( T , T ) -> T where ( T : ( vecN or scalar<float>) ) ) ,
379
382
380
383
Mf :: Dot => b ! ( ( T , T ) -> ( scalar T ) where ( T : ( vecN<numeric>) ) ) ,
384
+ Mf :: InsertBits => b ! ( ( T , T , S , S ) -> S where ( T : ( vecN or scalar<( concrete integer) >) , S : u32 ) ) ,
381
385
/*
382
386
// Functions of three floating-point arguments, extended
383
387
// element-wise to vectors.
@@ -426,7 +430,6 @@ impl crate::MathFunction {
426
430
Mf::FaceForward => todo!(),
427
431
Mf::Fma => todo!(),
428
432
Mf::Frexp => todo!(),
429
- Mf::InsertBits => todo!(),
430
433
Mf::Inverse => todo!(),
431
434
Mf::Ldexp => todo!(),
432
435
Mf::Mix => todo!(),
0 commit comments