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