<commit_before>/*
 * Sequential implementation of matrix multiplication.
 */

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

int main(int argc, char *argv[]) {
	int **A = NULL;
	int **B = NULL;
	int **C = NULL;
	int size = 0;

	int argsParsed = 0;
	struct arguments *args = calloc(1, sizeof(struct arguments));
	
	argsParsed = parse_args(argc, argv, args);
	if (argsParsed == 1) {
		exit(EXIT_FAILURE);
	}

	size = args->size;

	/* allocate memory space for matrices */
	A = allocMatrixInt(size);
	B = allocMatrixInt(size);
	C = allocMatrixInt(size);
	
	/* initialize matrix contents */
	initMatrixInt(A, size);
	initMatrixInt(B, size);

	printTOD();

	/* multiply */
	multiply(A, B, C, size, 0, size - 1);

	printTOD();

	freeMatrixInt(A, size);
	freeMatrixInt(B, size);
	freeMatrixInt(C, size);
	exit(EXIT_SUCCESS);
}<commit_msg>Free args struct.<commit_after>/*
 * Sequential implementation of matrix multiplication.
 */

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

int main(int argc, char *argv[]) {
	int **A = NULL;
	int **B = NULL;
	int **C = NULL;
	int size = 0;

	int argsParsed = 0;
	struct arguments *args = calloc(1, sizeof(struct arguments));
	
	argsParsed = parse_args(argc, argv, args);
	if (argsParsed == 1) {
		exit(EXIT_FAILURE);
	}

	size = args->size;

	/* allocate memory space for matrices */
	A = allocMatrixInt(size);
	B = allocMatrixInt(size);
	C = allocMatrixInt(size);
	
	/* initialize matrix contents */
	initMatrixInt(A, size);
	initMatrixInt(B, size);

	printTOD();

	/* multiply */
	multiply(A, B, C, size, 0, size - 1);

	printTOD();

	freeMatrixInt(A, size);
	freeMatrixInt(B, size);
	freeMatrixInt(C, size);
	free(args);
	exit(EXIT_SUCCESS);
}
{'fraction_non_alphanumeric': 0.15953079178885632, 'fraction_numerical': 0.007038123167155425, 'mean_word_length': 4.13855421686747, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3457549', 'n_tokens_mistral': 657, 'n_tokens_neox': 617, 'n_words': 169}