WiscSort / wiscSort / RSW / header / msort.h
msort.h
Raw
#ifndef MSORT_H
#define MSORT_H

#include <cstddef>
#include <omp.h>
#include "extsort_rsw.h"

// This function does a merge sort on the input array "arr" of length n. 
// You can add more functions as needed to complete the merge sort,
// but do not change this file. Declare and define your addtional
// functions in the msort.cpp file, but the calls to your addtional functions
// should be wrapped in the "msort" function.

// "threshold" is the lower limit of array size where your function would 
// start making parallel recursive calls. If the size of array goes below
// the threshold, a serial sort algorithm will be used to avoid overhead
// of task scheduling

void msort(record_t * arr, const std::size_t n, const std::size_t threshold);

#endif