Skip to content

Commit 2e19d8e

Browse files
committed
formatting
1 parent 242ecce commit 2e19d8e

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

benchrunner/cxx/benchmarks.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ void *cilksort(void *const pbase, size_t total_elems, size_t size, __compar_fn_t
2828
void *cilksort_par(void *const pbase, size_t total_elems, size_t size, __compar_fn_t cmp);
2929
template <typename T> T *bottomUpMergeSort(T *a, T *b, int n);
3030

31+
// Relating to C++ templatized versions
32+
int64_t *bottom_up_merge_sort_int(int64_t *pbase, size_t total_elems);
33+
int64_t *insertionsort_int(int64_t *pbase, size_t total_elems);
34+
int64_t *quicksort_int(int64_t *pbase, size_t total_elems);
35+
3136
// Microbenchmarks.
3237
int64_t* __attribute__ ((noinline)) fill_array_seq(size_t total_elems, int64_t val);
3338
int64_t* __attribute__ ((noinline)) fill_array_par(size_t total_elems, int64_t val);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "benchmarks.h"
2+
#include "insertionsort.cpp"
3+
4+
int64_t *insertionsort_int(int64_t *pbase, size_t total_elems){
5+
return insertionsort_inplace<int64_t>(pbase, total_elems);
6+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include "benchmarks.h"
2+
#include "mergesort.cpp"
3+
4+
5+
int64_t *bottom_up_merge_sort_int(int64_t *pbase, size_t total_elems){
6+
7+
int64_t *copy_pbase = new int64_t[total_elems];
8+
copyArray<int64_t>(pbase, copy_pbase, total_elems);
9+
return bottomUpMergeSort<int64_t>(pbase, copy_pbase, total_elems);
10+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "benchmarks.h"
2+
#include "quicksort.cpp"
3+
4+
int64_t *quicksort_int(int64_t *pbase, size_t total_elems){
5+
return quicksort_inplace<int64_t>(pbase, total_elems);
6+
}

0 commit comments

Comments
 (0)