From 4bdf96bd6aafbec6bc3f0eab8739d6652878fd24 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 06 Dec 2013 21:26:09 +0000
Subject: [PATCH] New data format

---
 src/matrix.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/matrix.c b/src/matrix.c
index 562a364..5627b87 100644
--- a/src/matrix.c
+++ b/src/matrix.c
@@ -13,6 +13,17 @@
     free(m.vals);
 }
 
+void matrix_add_matrix(matrix from, matrix to)
+{
+    assert(from.rows == to.rows && from.cols == to.cols);
+    int i,j;
+    for(i = 0; i < from.rows; ++i){
+        for(j = 0; j < from.cols; ++j){
+            to.vals[i][j] += from.vals[i][j];
+        }
+    }
+}
+
 matrix make_matrix(int rows, int cols)
 {
     matrix m;

--
Gitblit v1.10.0