<commit_before>//
//  arraytest.c
//  arraytest
//
//  Created by <NAME> on 1/29/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//
// File: arraytest.c
//
// C program to test arrayinc.asm
//
#include<stdio.h>
#include<stdlib.h>
#include<pthread.h>

void *foo(void *targ)
{
    int tID;// = (int*) targ;
    tID=*((int*) targ);
    printf("%d\n",tID);
    return NULL;
}

void mergeSort(int *arr, int low, int high)
{
    if(low<high)
    {
        int mid = (low + high)/2;
        mergeSort(arr, low, mid);
        mergeSort(arr, mid+1, high);
        int *mergedRes = merge(arr, low, mid, high);
    }
}

int* merge(int arr, int low, int mid, int high)
{
    int size = (int) sizeof(arr)/sizeof(int);
    int *auxArr = malloc(sizeof(int) * size);
    
    printf("%d\n",size);
    return auxArr;
}

int main() {
    int tId1 = 1;
    int tId2 = 2;
    int tId[] = {1,2};
    pthread_t pt[2];
    
    for(int i=0;i<2;i++)
    {
        pthread_create(&pt[i], NULL, foo, (void*) &tId[i] );
        pthread_join(pt[i], NULL);
    }
    
    int size = (int)(sizeof(pt))/(int)sizeof(pthread_t);
    printf("size of Array is %d\n",size);
    return 0;
}
<commit_msg>Updated mergesort<commit_after>//
//  arraytest.c
//  arraytest
//
//  Created by <NAME> on 1/29/15.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//
// File: arraytest.c
//
// C program to test arrayinc.asm
//
#include<stdio.h>
#include<stdlib.h>
#include<pthread.h>

void *foo(void *targ)
{
    int tID;// = (int*) targ;
    tID=*((int*) targ);
    printf("%d\n",tID);
    return NULL;
}

void mergeSort(int *arr, int low, int high)
{
    if(low<high)
    {
        int mid = (low + high)/2;
        mergeSort(arr, low, mid);
        mergeSort(arr, mid+1, high);
        merge(arr, low, mid, high);
    }
}

int* merge(int *arr, int low, int mid, int high)
{
    int size = (int) sizeof(arr)/sizeof(int);
    printf("Array Size %d\n",size);

    int *auxArr = malloc(sizeof(int) * size);
    for(int i=0;i<size;i++)
    {
        auxArr[i] = arr[i];
    }
    
    int current = low;
    int right = mid+1;
    int left = low;
    while((left<=mid)&&(right<high))
    {
        if(auxArr[left]<=auxArr[right])
        {
            arr[current++] = auxArr[left++];
        }else
        {
            arr[current++] = auxArr[right++];
        }
    }
    int remaining = mid-left;
    for(int j=0;j<=remaining;j++)
    {
        arr[left++] = auxArr[j];
    }
    return arr;
}

int main() {
    int tId1 = 1;
    int tId2 = 2;
    int tId[] = {1,2};
    pthread_t pt[2];
    
    for(int i=0;i<2;i++)
    {
        pthread_create(&pt[i], NULL, foo, (void*) &tId[i] );
        pthread_join(pt[i], NULL);
    }
    
    int size = (int)(sizeof(pt))/(int)sizeof(pthread_t);
    printf("size of Array is %d\n",size);
    return 0;
}

{'fraction_non_alphanumeric': 0.19167852062588905, 'fraction_numerical': 0.016002844950213372, 'mean_word_length': 2.2520231213872832, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4030205', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1114, 'n_words': 254}