Open main menu

CDOT Wiki β

Changes

K2

213 bytes added, 20:20, 16 April 2018
Assignment3
The bitonic sorting algorithm is devised for the input length n being a power of 2.
To check the noticeable time gap, we put 2^1516, 2^20, 2^2524.
<source>
void bitonicSort(int* array, int N){
Let's see how this algorithm works to sort and explanation of several terms.
 
[[File:BitonicSort1.png]]
Below is the comparison between bitonic sort using GPU, quick sort using CPU, bitonic sort using CPU.
[[File:BitonicGraph.jpg|500px|thumb|left|sorting algorithms comparison result]]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
==Assignment3==
While working on the project, we discovered that cudaMemcpy(HtoD) and (DtoH) takes long time.​
Use so, we decided to use pinned memory instead of pageable memory​ cudaHostAlloc();​to improve its performance.
"It cudaHostAlloc() will allocate pinned memory which is always stored in RAM and can be accessed by GPU's DMA(direct memory access) directly"
[[File:Resultone.png|500px|thumb|left|pinned memory vs pageable memory]]
[[File:Resultone.png|500px|thumb|left|                          using pinned memory vs is 2 times faster than pageable memory]]
44
edits