diff --git a/opoptimize.c b/opoptimize.c new file mode 100644 index 0000000..64683b0 --- /dev/null +++ b/opoptimize.c @@ -0,0 +1,236 @@ +#include +#include +#include +#include + +#define ROW 4 +#define COL 4 +#define MAX 16 + +typedef void (*vector_add_func)(float* , float* , float* , int ); +typedef void (*matmul_func)(float** ,float** ,float** ,int ); +typedef void (*spare_matmul_func)(float*, int*, int*, int, float*, int*, int*, int, float*, int*, int*, int*); + +void test_vector_add(vector_add_func func,const char * attributive){ + int size=1024; + float *A = malloc(size * sizeof(float )); + float *B = malloc(size * sizeof(float )); + float *C = malloc(size * sizeof(float )); + + for (int i=0;i