summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/svm/src/c/polynomial.c
diff options
context:
space:
mode:
authorleochanj105 <leochanj@live.unc.edu>2021-10-26 13:22:32 -0400
committerleochanj105 <leochanj@live.unc.edu>2021-10-26 13:22:32 -0400
commit14c854543b1a3cf344a371a5b45595657f95786b (patch)
tree70f752880522e5e44669af365754ac0f649dce81 /SD-VBS/benchmarks/svm/src/c/polynomial.c
parent5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff)
add deadlines and costs
Diffstat (limited to 'SD-VBS/benchmarks/svm/src/c/polynomial.c')
-rw-r--r--SD-VBS/benchmarks/svm/src/c/polynomial.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/SD-VBS/benchmarks/svm/src/c/polynomial.c b/SD-VBS/benchmarks/svm/src/c/polynomial.c
deleted file mode 100644
index cce9190..0000000
--- a/SD-VBS/benchmarks/svm/src/c/polynomial.c
+++ /dev/null
@@ -1,42 +0,0 @@
1/********************************
2Author: Sravanthi Kota Venkata
3********************************/
4
5#include "svm.h"
6
7float polynomial(int d, F2D* a, F2D* b, int dim)
8{
9 float ret;
10 F2D *bt, *bt1;
11 int i,j,r,c;
12
13 r = b->height;
14 c = b->width;
15
16 bt = fMallocHandle(c, r);
17
18 for(i=0; i<r; i++)
19 {
20 for(j=0; j<c; j++)
21 {
22 subsref(bt,j,i) = subsref(b,i,j);
23 }
24 }
25
26 bt1 = fMtimes(a, bt);
27 fFreeHandle(bt);
28
29 if(bt1->height == 1 && bt1->width ==1)
30 ret = pow(asubsref(bt1,0),d)/dim;
31 else
32 {
33 fFreeHandle(bt1);
34 return -1;
35 }
36
37 fFreeHandle(bt1);
38 return ret;
39}
40
41
42