While this PR, N threads for data processing is created. Each thread number thread_index process all vectors i that (i + thread_index) % max_threads == 0. Encoding result is protected by conditional variables that implements ordered access (see more in comments).
Parallel PQ data encoding using
rayon
crate.rayon
provides fork-join model https://docs.rs/rayon/latest/rayon/fn.scope.html.While this PR, N threads for data processing is created. Each thread number
thread_index
process all vectorsi
that(i + thread_index) % max_threads == 0
. Encoding result is protected by conditional variables that implements ordered access (see more in comments).