From 4625a16ffdcf3b9f7bfc37046e70f4ecb87234ab Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 06 Jun 2016 20:22:45 +0000
Subject: [PATCH] tactics

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

diff --git a/src/blas.c b/src/blas.c
index 35a4c40..00f0c3a 100644
--- a/src/blas.c
+++ b/src/blas.c
@@ -2,6 +2,14 @@
 #include "math.h"
 #include <assert.h>
 
+void weighted_sum_cpu(float *a, float *b, float *s, int n, float *c)
+{
+    int i;
+    for(i = 0; i < n; ++i){
+        c[i] = s[i]*a[i] + (1-s[i])*(b ? b[i] : 0);
+    }
+}
+
 void shortcut_cpu(int batch, int w1, int h1, int c1, float *add, int w2, int h2, int c2, float *out)
 {
     int stride = w1/w2;

--
Gitblit v1.10.0