<commit_before>#include "Halide.h"
#include "wrapper_tutorial_01.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>

#define NN 10
#define MM 10

int main(int, char**)
{
    buffer_t input_buf = {0};
    input_buf.host = (unsigned char *) malloc(NN*MM*sizeof(unsigned char));
    input_buf.stride[0] = 1;
    input_buf.stride[1] = 1;
    input_buf.extent[0] = NN;
    input_buf.extent[1] = MM;
    input_buf.min[0] = 0;
    input_buf.min[1] = 0;
    input_buf.elem_size = 1;

    init_1D_buffer(&input_buf, NN*MM, 9);
    std::cout << "Array (after initialization)" << std::endl;
    print_1D_buffer(&input_buf, NN*MM);

    Halide::Buffer<uint8_t> halide_input_buf(input_buf);

    function0(halide_input_buf.raw_buffer());

    std::cout << "Array after the Halide pipeline" << std::endl;<commit_msg>Fix tutorial 01<commit_after>#include "Halide.h"
#include "wrapper_tutorial_01.h"
#include "tiramisu/utils.h"
#include <cstdlib>
#include <iostream>

#define NN 10
#define MM 10

int main(int, char**)
{
    buffer_t input_buf = allocate_2D_buffer(NN, MM);
    init_2D_buffer_val(&input_buf, NN, MM, 9);

    std::cout << "Array (after initialization)" << std::endl;
    print_2D_buffer(&input_buf, NN, MM);

    Halide::Buffer<uint8_t> halide_input_buf(input_buf);

    function0(halide_input_buf.raw_buffer());

    std::cout << "Array after the Halide pipeline" << std::endl;
{'fraction_non_alphanumeric': 0.1530758226037196, 'fraction_numerical': 0.026466380543633764, 'mean_word_length': 4.686991869918699, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 9, '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': '4649171', 'n_tokens_mistral': 577, 'n_tokens_neox': 528, 'n_words': 107}