Added C functions for linear algebra, to be converted to kraken and used as benchmark

This commit is contained in:
Chris Fadden
2015-03-18 18:35:00 -04:00
parent a268f1b768
commit d2fc32d0fb
12 changed files with 386 additions and 58 deletions

View File

@@ -0,0 +1,31 @@
#include <stdio.h>
#include "ChrisMatrix.h"
int main(int argc, char** argv)
{
double** A;
int m = 3;
int n = 3;
int i, j;
A = malloc(sizeof(double*) * m);
for(i = 0; i < m; i++)
A[i] = malloc(sizeof(double) * n);
int k = 0;
for(i = 0; i < m; i++)
{
for(j = 0; j < n; j++)
{
A[i][j] = k;
k++;
}//end j loop
}//end i loop
printMatrix(m, n, A);
transpose(m,n,A);
printMatrix(m,n,A);
printf("Hello World\n");
return 0;
}