-
Notifications
You must be signed in to change notification settings - Fork 10
/
CSortingMain.cpp
40 lines (29 loc) · 1.11 KB
/
CSortingMain.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/******************************************************************************
GPU Computing / GPGPU Praktikum source code.
******************************************************************************/
#include "CSortingMain.h"
#include "CSortTask.h"
#include <iostream>
using namespace std;
///////////////////////////////////////////////////////////////////////////////
// CAssignment2
bool CSortingMain::DoCompute()
{
// Task 1: parallel reduction
cout << "########################################" << endl;
cout << "Running sort task..." << endl << endl;
{
// set work size and size of input array
size_t LocalWorkSize[3] = { 256, 1, 1 };
unsigned int arraySize = 1024 * 1024;
// info output
cout << "Start sorting array of size " << arraySize;
cout << " using LocalWorkSize " << LocalWorkSize[0] << endl << endl;
// create sorting task and start it
CSortTask sorting(arraySize, LocalWorkSize);
RunComputeTask(sorting, LocalWorkSize);
}
return true;
}
///////////////////////////////////////////////////////////////////////////////
// NOTE: With bigger arrays we need to compile for 64-Bit!