/* matroot.c - calculate the square root of a matrix * * Copyright (C) 2004 Jochen Voss. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * $Id: matroot.c 7208 2006-09-03 16:11:08Z voss $ */ #include #include #include #include #ifdef USECBLAS #include #endif int N = 7; static void set_entry(double *A, int i, int j, double val) { A[j*N+i] = val; } static double get_entry(const double *A, int i, int j) { return A[j*N+i]; } void my_dgemm(int size, double *a, double *b, double *c) { int i, j, k; for (i=0; i