1. Measuring the effect of Parallelization
    Using one of the suggested methods in class ( p-threads, OpenMP, C-Sharp or Java Threads) implement an application that adds two integer vectors (A,B) and store the result on vector C. The size of these vectors is to be set at 67108864. Measure the time it takes to do this vector addition for sequential
    implementation and parallel implementation by varying the thread number from 2,3,... some max value you decide. (Hint: You need to make sure each thread gets similar amounts

Recommended Answers

Do you have a question?

Jump to Post

All 2 Replies

Do you have a question?

Note that Java is not deterministic. You can do and time an operation once, but the next time the timing may be completely different. If you do this, and the garbage collector kicks in, your times will be wildly different. Do a hundred measurements of the same operations and average them out, and you may get a "reasonable" value.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.