Open main menu

CDOT Wiki β

Changes

GPU621/Striking

188 bytes added, 14:52, 8 December 2016
Progress
The debugging example below is used for five odd numbers to be sorted. This is the easiest way to figured out how the threads work together with the simple data.
<table border="0" width="800">
<tr>
<td width="360" align="top">
*How to start debugging
 
The following sequence may guides you start to debug on the visual Studio.
# put breakpoints where you want to take a look by hitting the key F9 in the line or left-click at the front of a line
# Run the program in Debug mode by hitting the green button (or key F5)
# Go to the menu Debug -> Windows to open the windows you need ( see the image belowon your right)
# Choose the windows that you need (e.g. Memory, Threads, Parallel Stacks, Local or Auto and so on.)
# Hit the function keys to run a program:
## F10 to run codes line by line (Step Over)
## F11 to go into a subroutine (Step Into)
(To open windows you need for debugging on Visual Studio, You must run a program in debug mode first)
[[File:debug_windows.png]]
 
 
</td>
<td width="440">
To open windows you need for debugging on Visual Studio, You must run a program in debug mode first. Otherwise, there is no menu to open the windows.
[[File:debug_windows.png|440px|thumb|left|Menu Debug > Windows on VS 2015]]
</td>
</tr>
</table>
*Sample code results
**Data flow of parallel_qsort
<table border="0" width="800">
<tr align="left"><td>[[File:dataflow.png|250px220px|thumb|left|Quick sorting dataflow]]</td><td>Explanation will be here soon. 
Fist set of this quick sorting is that main thread worked for first half of all elements which starts *begin 9 to *end 1. The *mid value was 9 so it swapped *mid for *end. Since mid moved to end, the second half of all elements was the end to the end which only end value are to be sorted; the actual process will be skipped so no value is changed.
108
edits