Open main menu

CDOT Wiki β

Changes

GPU621/Fighting Mongooses

792 bytes added, 21:58, 30 November 2016
Group Members
Once project topic is confirmed by Professor [https://ict.senecacollege.ca/?q=staff/szalwinski-chris Chris Szalwinski]), I will be able to proceed with topic research.
 
'''Entry on: November 30th 2016'''
 
==Comparing STL/PPL to TBB: Sorting Algorithm==
 
Let’s compare a simple sorting algorithm between TBB and STL/PPL.
 
====Serial====
 
 
====TBB====
 
 
====STL====
 
 
===Results===
 
 
The clear differentiation in the code is that TBB does not have to operate using random access iterators, while STL’s parallel solution to sorting (and serial solution) does. If TBB sort is run using a vector instead of a simple array, you will see more even times.
 
Conclusion; STL does not currently handle parallelization of simple tasks well, as evidenced by this sort function. Even with this code snippet to lower the workload;
 
if (i % 3 == 0) {
backwardsList.push_back(N - i);
} else {
backwardsList.push_back(i);
}
 
The times are largely the same for STL sorting.
----
23
edits