From bfffadc75502cadb5d05909435a2167db5204325 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 04 Feb 2015 20:41:20 +0000
Subject: [PATCH] Stable place to commit
---
src/utils.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/utils.c b/src/utils.c
index 96062b0..8261682 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -11,6 +11,7 @@
{
int i,j;
for(i =0 ; i < M; ++i){
+ printf("%d ", i+1);
for(j = 0; j < N; ++j){
printf("%10.6f, ", A[i*N+j]);
}
@@ -261,6 +262,16 @@
}
}
+float mag_array(float *a, int n)
+{
+ int i;
+ float sum = 0;
+ for(i = 0; i < n; ++i){
+ sum += a[i]*a[i];
+ }
+ return sqrt(sum);
+}
+
void scale_array(float *a, int n, float s)
{
int i;
--
Gitblit v1.10.0