Relative Content

Tag Archive for multithreadingrust

How do I avoid copying the array in multithreading processing?

I have an algorithm (its details are not important) that evaluates a vector step by step. Each new value in the vector is a result of calculations over several old ones, such that new values can be calculated independently or parallelly. The size of the vector is supposed to be large (thousands or millions). So on each step I represent the vector as chunks and I spawn a thread for each chunk. After the calculations in the threads I save the result back into the vector.

How do I avoid copying the array in multithreading processing?

I have an algorithm (its details are not important) that evaluates a vector step by step. Each new value in the vector is a result of calculations over several old ones, such that new values can be calculated independently or parallelly. The size of the vector is supposed to be large (thousands or millions). So on each step I represent the vector as chunks and I spawn a thread for each chunk. After the calculations in the threads I save the result back into the vector.

How do I avoid copying the array in multithreading processing?

I have an algorithm (its details are not important) that evaluates a vector step by step. Each new value in the vector is a result of calculations over several old ones, such that new values can be calculated independently or parallelly. The size of the vector is supposed to be large (thousands or millions). So on each step I represent the vector as chunks and I spawn a thread for each chunk. After the calculations in the threads I save the result back into the vector.