mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Add reflect.length + reflect.capacity support for #simd[N]T
This commit is contained in:
@@ -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