<commit_before>#include "HalideRuntime.h"

#include <stdio.h>
#include <stdlib.h>

#include "error_codes.h"

extern "C" void halide_error(void *user_context, const char *msg) {
    // Silently drop the error
    //printf("%s\n", msg);
}

void check(int result, int correct) {
    if (result != correct) {
        printf("The exit status was %d instead of %d\n", result, correct);
        exit(-1);
    }
}

int main(int argc, char **argv) {

    buffer_t in = {0}, out = {0};

    in.host = (uint8_t *)malloc(64*64*4);
    in.elem_size = 4;
    in.extent[0] = 64;
    in.stride[0] = 1;
    in.extent[1] = 64;
    in.stride[1] = 64;

    out.host = (uint8_t *)malloc(64*4);
    out.elem_size = 4;
    out.extent[0] = 64;
    out.stride[0] = 1;
    out.extent[1] = 64;
    out.stride[1] = 64;

    // First, a successful run.
    int result = error_codes(&in, 64, &out);<commit_msg>Fix bug in error codes test<commit_after>#include "HalideRuntime.h"

#include <stdio.h>
#include <stdlib.h>

#include "error_codes.h"

extern "C" void halide_error(void *user_context, const char *msg) {
    // Silently drop the error
    //printf("%s\n", msg);
}

void check(int result, int correct) {
    if (result != correct) {
        printf("The exit status was %d instead of %d\n", result, correct);
        exit(-1);
    }
}

int main(int argc, char **argv) {

    buffer_t in = {0}, out = {0};

    in.host = (uint8_t *)malloc(64*64*4);
    in.elem_size = 4;
    in.extent[0] = 64;
    in.stride[0] = 1;
    in.extent[1] = 64;
    in.stride[1] = 64;

    out.host = (uint8_t *)malloc(64*64*4);
    out.elem_size = 4;
    out.extent[0] = 64;
    out.stride[0] = 1;
    out.extent[1] = 64;
    out.stride[1] = 64;

    // First, a successful run.
    int result = error_codes(&in, 64, &out);
{'fraction_non_alphanumeric': 0.17613956105796286, 'fraction_numerical': 0.04501969611705121, 'mean_word_length': 2.7041666666666666, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7645038', 'n_tokens_mistral': 757, 'n_tokens_neox': 699, 'n_words': 176}