This commit is contained in:
Debucquoy
2023-12-21 23:36:03 +01:00
parent 990b77ed18
commit babed7eb09
35 changed files with 11061 additions and 39 deletions

View 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);