Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (20 sloc) 535 Bytes
#ifndef even_odd_sort_hpp
#define even_odd_sort_hpp
#define CSCE_SORT_DEBUG false
#include <algorithm>
#include <cmath>
#include <math.h>
#include <thread>
#include <mutex>
#include "sortable.hpp"
class even_odd_sort : public sortable {
public:
even_odd_sort(int _nthreads);
std::string name() const;
void sort_array(int array[], int n);
private:
std::mutex cout_mutex;
void sort_thread(int array[], int start, int stop);
void merge_thread(int array[], int start, int mid, int stop);
};
#endif /* even_odd_sort_hpp */