// Simple matrix/vector demo program #include #include int main(int argc, char **argv) { if(argc < 4){ printf("usage: matrix_vector_multiply \n"); printf(" rows cols: ints, size of the matrix to use\n"); printf(" print?: int, 1 for printing, 0 for no output\n"); return -1; } int rows = atoi(argv[1]); int cols = atoi(argv[2]); int print = atoi(argv[3]); int i,j; // Raw matrix as a 1D array, initialize double *data = malloc(rows * cols * sizeof(double)); for(i=0; i