Odin
Odin copied to clipboard
Execution hangs on insert to `map[K]#simd[N]V`
Context
Odin report:
Odin: dev-2022-09-nightly:74458ab0
OS: Windows 11 Home Basic (version: 21H2), build 22000.856
CPU: AMD Ryzen 9 5900X 12-Core Processor
RAM: 32671 MiB
Expected Behavior
Maps with #simd
values should not hang on insert.
Current Behavior
They sometimes hang on insert.
Failure Information (for bugs)
Steps to Reproduce
The following code hangs on my machine (at iteration 1, 68). However if I uncomment the identical code using a non #simd
valued map before it, then the simd map insertion after it executes just fine.
package main
import "core:fmt"
main :: proc() {
// regular_map := make(map[[2]u32][4]f64)
// defer delete(regular_map)
// for i in 0..<100 {
// for j in 0..<100 {
// fmt.println("Inserting", i, j)
// regular_map[{u32(i), u32(j)}] = [4]f64{0, 1, 0, 1}
// }
// }
// fmt.println("Finished Regular Map")
simd_map := make(map[[2]u32]#simd[4]f64)
defer delete(simd_map)
for i in 0..<100 {
for j in 0..<100 {
fmt.println("Inserting", i, j)
simd_map[{u32(i), u32(j)}] = #simd[4]f64{0, 1, 0, 1}
}
}
fmt.println("Finished Simd Map")
}