chap3
This commit is contained in:
21
bac2/os/chap3/group01-chap3/mergeSort.h
Normal file
21
bac2/os/chap3/group01-chap3/mergeSort.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <pthread.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#define THREADS 4
|
||||
#define merge_init(array, size) {(array), 0, {1, (size)}}
|
||||
|
||||
typedef struct{
|
||||
int start;
|
||||
int final;
|
||||
} SLICE;
|
||||
|
||||
typedef struct {
|
||||
int* array;
|
||||
int _depth;
|
||||
SLICE slice;
|
||||
} mrg_t;
|
||||
|
||||
void* merge_sort(void*);
|
||||
void merge(int array[], uint8_t start, uint8_t middle, uint8_t final);
|
Reference in New Issue
Block a user