Add comments.
This commit is contained in:
parent
5bca484555
commit
2c129e97a1
1 changed files with 11 additions and 0 deletions
11
ms.h
11
ms.h
|
@ -8,10 +8,21 @@
|
|||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
/* Merge arrays left and right into res array.
|
||||
*/
|
||||
void mymerge(int left[], size_t leftlen, int right[], size_t rightlen, int res[]);
|
||||
|
||||
/* Sort arr of size len using mergesort.
|
||||
*/
|
||||
int mymergesort(int arr[], size_t len);
|
||||
|
||||
/* Sort arr of size len using mergesort.
|
||||
* This function uses parallel processes for sorting.
|
||||
* It is implemented by forking new process for right
|
||||
* part of array. New child is forked only if
|
||||
* current subarray len is less or equal than original
|
||||
* array len / cnt parameter.
|
||||
*/
|
||||
int mymergesortp(int arr[], size_t len, int cnt);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue