|
And there are many other cases, in which multi-threading can endecrease general time for algorithm execution. For example mathematical calculations.
(A+B)*(C+D).
.(A+B) and (C+D) calculations can be executed simultaneously, because A,B and C,D variables are not dependent on execution step. But for “*” operation we should wait for execution of these 2 threads: .(A+B) and (C+D) – operands are dependent from previous step of execution
Is there any automated tools or techniques to find potential able for multi-threading parts in general algorithm (to find ability to execute simultaneously (A+B) and (C+D) in the example)? If no it is wonderful to develop one, program, which makes multi - threadable algorithm from single threaded one.
|