Add reflect.length + reflect.capacity support for #simd[N]T
This commit is contained in:
1 parent
f4ce84dfb4
commit
41d4ddbc5e
1 file changed
+8
@@ -261,7 +261,11 @@ length :: proc(val: any) -> int {
|
|||||||
} else {
|
} else {
|
||||||
return (^runtime.Raw_String)(val.data).len
|
return (^runtime.Raw_String)(val.data).len
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Type_Info_Simd_Vector:
|
||||||
|
return a.count
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -287,7 +291,11 @@ capacity :: proc(val: any) -> int {
|
|||||||
|
|
||||||
case Type_Info_Map:
|
case Type_Info_Map:
|
||||||
return runtime.map_cap((^runtime.Raw_Map)(val.data)^)
|
return runtime.map_cap((^runtime.Raw_Map)(val.data)^)
|
||||||
|
|
||||||
|
case Type_Info_Simd_Vector:
|
||||||
|
return a.count
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user