From d17b33131c14864bd1eae275f49a3f148e21cf29 Mon Sep 17 00:00:00 2001 From: Leo Chan Date: Thu, 22 Oct 2020 01:53:21 -0400 Subject: Squashed commit of the sb-vbs branch. Includes the SD-VBS benchmarks modified to: - Use libextra to loop as realtime jobs - Preallocate memory before starting their main computation - Accept input via stdin instead of via argc Does not include the SD-VBS matlab code. Fixes libextra execution in LITMUS^RT. --- SD-VBS/benchmarks/sift/src/c/diffss.c | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 SD-VBS/benchmarks/sift/src/c/diffss.c (limited to 'SD-VBS/benchmarks/sift/src/c/diffss.c') diff --git a/SD-VBS/benchmarks/sift/src/c/diffss.c b/SD-VBS/benchmarks/sift/src/c/diffss.c new file mode 100644 index 0000000..683cbe7 --- /dev/null +++ b/SD-VBS/benchmarks/sift/src/c/diffss.c @@ -0,0 +1,53 @@ +/******************************** +Author: Sravanthi Kota Venkata +********************************/ + +#include "sift.h" + +/** + DIFFSS Difference of scale space + Returns a scale space DSS obtained by subtracting + consecutive levels of the scale space SS. + + In SIFT, this function is used to compute the difference of + Gaussian scale space from the Gaussian scale space of an image. +**/ + +F2D** diffss(F2D** ss, int num, int intervals) +{ + F2D** dss; + int o, sizeM, sizeN, s, i, j; + F2D *current, *in1, *in2; + + dss = malloc(num*intervals*sizeof(F2D*)); + + for(o=0; oheight; + sizeN = ss[o*intervals+s]->width; + + dss[o*intervals+s] = fMallocHandle(sizeM, sizeN); + + current = dss[o*intervals+s]; + in1 = ss[o*intervals+s+1]; + in2 = ss[o*intervals+s]; + + for(i=0; i