@@ -16,7 +16,7 @@ const boolCast = callableSchema({
1616 }
1717 return ! ! v ;
1818 } ,
19- codegenImpl : ( ctx , args ) => ctx . gen . typeInstantiation ( bool , args ) ,
19+ codegenImpl : ( ctx , [ v ] ) => ctx . gen . typeInstantiation ( bool , v ? [ v ] : [ ] ) ,
2020} ) ;
2121
2222/**
@@ -65,7 +65,7 @@ const u32Cast = callableSchema({
6565 // Integer input: treat as bit reinterpretation (i32 -> u32)
6666 return ( v & 0xffffffff ) >>> 0 ;
6767 } ,
68- codegenImpl : ( ctx , args ) => ctx . gen . typeInstantiation ( u32 , args ) ,
68+ codegenImpl : ( ctx , [ v ] ) => ctx . gen . typeInstantiation ( u32 , v ? [ v ] : [ ] ) ,
6969} ) ;
7070
7171/**
@@ -105,7 +105,7 @@ const i32Cast = callableSchema({
105105 }
106106 return v | 0 ;
107107 } ,
108- codegenImpl : ( ctx , args ) => ctx . gen . typeInstantiation ( i32 , args ) ,
108+ codegenImpl : ( ctx , [ v ] ) => ctx . gen . typeInstantiation ( i32 , v ? [ v ] : [ ] ) ,
109109} ) ;
110110
111111export const u16 : U16 = {
@@ -148,7 +148,7 @@ const f32Cast = callableSchema({
148148 }
149149 return Math . fround ( v ) ;
150150 } ,
151- codegenImpl : ( ctx , args ) => ctx . gen . typeInstantiation ( f32 , args ) ,
151+ codegenImpl : ( ctx , [ v ] ) => ctx . gen . typeInstantiation ( f32 , v ? [ v ] : [ ] ) ,
152152} ) ;
153153
154154/**
@@ -275,7 +275,7 @@ const f16Cast = callableSchema({
275275 return roundToF16 ( v ) ;
276276 } ,
277277 // TODO: make usage of f16() in GPU mode check for feature availability and throw if not available
278- codegenImpl : ( ctx , args ) => ctx . gen . typeInstantiation ( f16 , args ) ,
278+ codegenImpl : ( ctx , [ v ] ) => ctx . gen . typeInstantiation ( f16 , v ? [ v ] : [ ] ) ,
279279} ) ;
280280
281281/**
0 commit comments