How to add two arrays in Java in parallel manner? -


for example, there 2 huge (length 2-3 million) of array float [] or double []. need them add up. how it? there libraries this?

employ fixed thread-pool number of threads equaling number of processor cores. submit many tasks there threads. each task receives index range needs sum. in main thread collect results futures returned executorservice.submit , sum them final result.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -