Divide calculation into threads
Divide calculation into threads