mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 15:05:00 -07:00
encoding/cbor: support simd vectors
This commit is contained in:
@@ -44,6 +44,7 @@ Foo :: struct {
|
||||
smallest: big.Int,
|
||||
ignore_this: ^Foo `cbor:"-"`,
|
||||
mat: matrix[4, 4]f32,
|
||||
vec: #simd [4]f64,
|
||||
}
|
||||
|
||||
FooBar :: enum {
|
||||
@@ -97,6 +98,7 @@ test_marshalling :: proc(t: ^testing.T) {
|
||||
small_onetwenty = -i128(max(u64)),
|
||||
ignore_this = &Foo{},
|
||||
mat = 1,
|
||||
vec = 2,
|
||||
}
|
||||
|
||||
big.atoi(&f.biggest, "1234567891011121314151617181920")
|
||||
@@ -145,6 +147,12 @@ test_marshalling :: proc(t: ^testing.T) {
|
||||
"now": 1(1701117968),
|
||||
"pos": 1212,
|
||||
"str": "Hellope",
|
||||
"vec": [
|
||||
2.0000,
|
||||
2.0000,
|
||||
2.0000,
|
||||
2.0000
|
||||
],
|
||||
"yes": true,
|
||||
"comp": [
|
||||
32.0000,
|
||||
|
||||
Reference in New Issue
Block a user