From cf32e7e9b843560eb7ec3ed16e5b19f0f7156724 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@burninator.cs.washington.edu>
Date: Sat, 25 Jun 2016 23:12:00 +0000
Subject: [PATCH] colors

---
 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