-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathsort.h
More file actions
executable file
·50 lines (43 loc) · 1.11 KB
/
sort.h
File metadata and controls
executable file
·50 lines (43 loc) · 1.11 KB
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
41
42
43
44
45
46
47
48
49
50
/*
* =====================================================================================
*
* Filename: array.h
*
* Description:
*
* Compiler: nvcc V6.0.1
*
* Author: Eugenio Pacceli Reis da Fonseca
* Icaro Harry
*
* Organization: DCC/UFMG
*
* =====================================================================================
*/
#ifndef TRADITIONAL_SORT
#define TRADITIONAL_SORT 1
#include<time.h>
#define SELECTION 0
#define INSERTION 1
#define SHELL 2
#define QUICK 3
#define HEAP 4
#define MERGE 5
#define GPUQUICK 6
#define GPUMERGE 7
#define UNDEFINED -1
extern int numberOfComparisons;
extern int numberOfSwaps;
extern clock_t start, end;
extern double elapsed_time;
void selection_sort(int *vet, int tam);
void insertion_sort(int *array, int size);
void shell_sort(int *vet, int size);
void quick_sort(int vet[], int left, int right);
void heap_sort(int vet[], int n);
void merge_sort(int* vet, int n);
int* sort_array(int *vet, int size, int method);
double get_elapsed_time();
int get_swaps();
int get_comparisons();
#endif