summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common
diff options
context:
space:
mode:
authorleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
committerleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
commit25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 (patch)
treeba80e76d25d9ca9486092e2f6b6d76f0e3352bf7 /SD-VBS/common
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
Diffstat (limited to 'SD-VBS/common')
-rw-r--r--SD-VBS/common/c/extra.h31
-rw-r--r--SD-VBS/common/makefiles/Makefile.common11
-rwxr-xr-xSD-VBS/common/matlab/README.txt7
-rw-r--r--SD-VBS/common/matlab/cycle.h514
-rw-r--r--SD-VBS/common/matlab/fSelfCheck.m27
-rw-r--r--SD-VBS/common/matlab/fWriteMatrix.m18
-rw-r--r--SD-VBS/common/matlab/photonEndTiming.c15
-rwxr-xr-xSD-VBS/common/matlab/photonEndTiming.mexa64bin6686 -> 0 bytes
-rwxr-xr-xSD-VBS/common/matlab/photonEndTiming.mexglxbin4984 -> 0 bytes
-rw-r--r--SD-VBS/common/matlab/photonPrintTiming.m11
-rw-r--r--SD-VBS/common/matlab/photonReportTiming.m7
-rw-r--r--SD-VBS/common/matlab/photonStartTiming.c15
-rwxr-xr-xSD-VBS/common/matlab/photonStartTiming.mexa64bin6688 -> 0 bytes
-rwxr-xr-xSD-VBS/common/matlab/photonStartTiming.mexglxbin4986 -> 0 bytes
-rwxr-xr-xSD-VBS/common/matlab/product.m30
-rw-r--r--SD-VBS/common/matlab/randWrapper.m17
-rw-r--r--SD-VBS/common/matlab/randn.m22
-rw-r--r--SD-VBS/common/matlab/randnWrapper.m17
-rw-r--r--SD-VBS/common/matlab/readFile.m22
-rw-r--r--SD-VBS/common/matlab/readImage.m60
-rwxr-xr-xSD-VBS/common/matlab/read_image8u_bmp.m66
-rwxr-xr-xSD-VBS/common/matlab/reshapeMatrix.m13
-rw-r--r--SD-VBS/common/matlab/selfCheck.m27
-rwxr-xr-xSD-VBS/common/matlab/testProductFunction.m21
-rwxr-xr-xSD-VBS/common/matlab/testReshapeFunction.m21
-rw-r--r--SD-VBS/common/matlab/timingFuncs/cycle.h514
-rw-r--r--SD-VBS/common/matlab/timingFuncs/photonEndTiming.c15
-rwxr-xr-xSD-VBS/common/matlab/timingFuncs/photonEndTiming.mexglxbin4984 -> 0 bytes
-rw-r--r--SD-VBS/common/matlab/timingFuncs/photonPrintTiming.m5
-rw-r--r--SD-VBS/common/matlab/timingFuncs/photonReportTiming.m7
-rw-r--r--SD-VBS/common/matlab/timingFuncs/photonStartTiming.c15
-rwxr-xr-xSD-VBS/common/matlab/timingFuncs/photonStartTiming.mexglxbin4986 -> 0 bytes
-rw-r--r--SD-VBS/common/matlab/writeMatrix.m19
-rwxr-xr-xSD-VBS/common/matlab/write_image8u_bmp.m88
-rwxr-xr-xSD-VBS/common/toolbox/toolbox_basic/matlab_tools.zipbin26722 -> 0 bytes
35 files changed, 10 insertions, 1625 deletions
diff --git a/SD-VBS/common/c/extra.h b/SD-VBS/common/c/extra.h
index 3215951..dbf1c95 100644
--- a/SD-VBS/common/c/extra.h
+++ b/SD-VBS/common/c/extra.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * Copyright 2019 Sims Hill Osborne and Joshua Bakita 2 * Copyright 2019 Sims Hill Osborne and 2020 Joshua Bakita
3 * 3 *
4 * This header provides facilities by which to separably run and time TACLeBench 4 * This header provides facilities by which to separably run and time TACLeBench
5 * To use this for paired task timing, define PAIRED (pass CFLAGS=-DPAIRED to make) 5 * To use this for paired task timing, define PAIRED (pass CFLAGS=-DPAIRED to make)
@@ -29,7 +29,7 @@ extern int sched_getcpu();
29#include <sys/syscall.h> 29#include <sys/syscall.h>
30#endif 30#endif
31 31
32#define LITMUS 0 32#define LITMUS 1
33#define MC2 0 33#define MC2 0
34#define MMDC_PROF 0 34#define MMDC_PROF 0
35 35
@@ -200,20 +200,6 @@ static void _rt_load_params_itrl(int argc, char **argv) {
200 perror("Unable to migrate to specified CPU"); \ 200 perror("Unable to migrate to specified CPU"); \
201 exit(1); \ 201 exit(1); \
202 } \ 202 } \
203 struct reservation_config res; \
204 res.id = gettid(); \
205 res.cpu = cpu; \
206 res.priority = LITMUS_HIGHEST_PRIORITY; \
207 /* we take over half the CPU time (these are ns) */ \
208 res.polling_params.budget = ms2ns(3000); \
209 res.polling_params.period = ms2ns(3000); \
210 res.polling_params.offset = 0; \
211 res.polling_params.relative_deadline = ms2ns(3000); \
212 /* Not 100% sure that we should use periodic polling */ \
213 if (reservation_create(PERIODIC_POLLING, &res) < 0) { \
214 perror("Unable to create reservation"); \
215 exit(1); \
216 } \
217 struct rt_task rt_param; \ 203 struct rt_task rt_param; \
218 init_rt_task_param(&rt_param); \ 204 init_rt_task_param(&rt_param); \
219 /* Supposedly the next two parameters are irrelevant when reservations are enabled, but I'm leaving them anyway... */ \ 205 /* Supposedly the next two parameters are irrelevant when reservations are enabled, but I'm leaving them anyway... */ \
@@ -223,7 +209,7 @@ static void _rt_load_params_itrl(int argc, char **argv) {
223 rt_param.cls = RT_CLASS_HARD; \ 209 rt_param.cls = RT_CLASS_HARD; \
224 rt_param.release_policy = TASK_PERIODIC; \ 210 rt_param.release_policy = TASK_PERIODIC; \
225 rt_param.budget_policy = NO_ENFORCEMENT; \ 211 rt_param.budget_policy = NO_ENFORCEMENT; \
226 rt_param.cpu = cpu; \ 212 rt_param.cpu = _rt_core; \
227 if (set_rt_task_param(gettid(), &rt_param) < 0) { \ 213 if (set_rt_task_param(gettid(), &rt_param) < 0) { \
228 perror("Unable to set real-time parameters"); \ 214 perror("Unable to set real-time parameters"); \
229 exit(1); \ 215 exit(1); \
@@ -244,13 +230,7 @@ static void _rt_load_params_itrl(int argc, char **argv) {
244 230
245#if MC2 231#if MC2
246#define MC2_SETUP \ 232#define MC2_SETUP \
247 struct mc2_task mc2_param; \ 233
248 mc2_param.res_id = gettid(); \
249 mc2_param.crit = CRIT_LEVEL_A; \
250 if (set_mc2_task_param(gettid(), &mc2_param) < 0) { \
251 perror("Unable to set MC^2 task params"); \
252 exit(1); \
253 } \
254 set_page_color(rt_param.cpu); 234 set_page_color(rt_param.cpu);
255#else 235#else
256#define MC2_SETUP 236#define MC2_SETUP
@@ -261,7 +241,6 @@ static void _rt_load_params_itrl(int argc, char **argv) {
261 perror("Unable to become a real-time task"); \ 241 perror("Unable to become a real-time task"); \
262 exit(1); \ 242 exit(1); \
263 } \ 243 } \
264 reservation_destroy(gettid(), rt_param.cpu);
265 244
266#if __arm__ 245#if __arm__
267// On ARM, manually flush the cache 246// On ARM, manually flush the cache
@@ -417,7 +396,7 @@ static void _rt_start_loop() {
417 FIRST_UNLOCK 396 FIRST_UNLOCK
418 FIRST_LOCK 397 FIRST_LOCK
419#endif /* PAIRED */ 398#endif /* PAIRED */
420 FLUSH_CACHES 399 //FLUSH_CACHES
421#ifdef PAIRED 400#ifdef PAIRED
422 BARRIER_SYNC 401 BARRIER_SYNC
423#endif /* PAIRED */ 402#endif /* PAIRED */
diff --git a/SD-VBS/common/makefiles/Makefile.common b/SD-VBS/common/makefiles/Makefile.common
index 7fc8824..144adb2 100644
--- a/SD-VBS/common/makefiles/Makefile.common
+++ b/SD-VBS/common/makefiles/Makefile.common
@@ -18,8 +18,7 @@ endif
18endif 18endif
19 19
20CC=gcc 20CC=gcc
21override CFLAGS += -DGCC -D$(INPUT) -pthread -DCHECK 21override CFLAGS += -DGCC -D$(INPUT) -pthread -DCHECK
22
23COMMON_DIR := $(TOP_DIR)/common/c 22COMMON_DIR := $(TOP_DIR)/common/c
24M_COMMON := $(TOP_DIR)/common/matlab 23M_COMMON := $(TOP_DIR)/common/matlab
25M_TOOLBOX=$(TOP_DIR)/common/toolbox 24M_TOOLBOX=$(TOP_DIR)/common/toolbox
@@ -29,7 +28,7 @@ PRELOAD_TIMES_DIR := $(TOP_DIR)/preload-times/$(BMARK)
29MTIMING_DIR := $(TOP_DIR)/cycles/$(BMARK) 28MTIMING_DIR := $(TOP_DIR)/cycles/$(BMARK)
30BMARK_DIR := $(TOP_DIR)/benchmarks/$(BMARK) 29BMARK_DIR := $(TOP_DIR)/benchmarks/$(BMARK)
31TOOL_DIR := $(TOP_DIR)/tools 30TOOL_DIR := $(TOP_DIR)/tools
32 31LIBLITMUS := /home/litmus/liblitmus
33#The options set below and specific to each benchmark. Disparity takes 2 input images, whereas Tracking can take any >1 input images =. 32#The options set below and specific to each benchmark. Disparity takes 2 input images, whereas Tracking can take any >1 input images =.
34 33
35# Variables exported from the benchmark specific Makefiles: 34# Variables exported from the benchmark specific Makefiles:
@@ -56,8 +55,8 @@ COMMON_SRC := $(wildcard $(COMMON_DIR)/*.c)
56# RULES 55# RULES
57 56
58EXE = 57EXE =
59INCLUDES = -I$(COMMON_DIR) -I$(C_DIR) 58INCLUDES = -I$(COMMON_DIR) -I$(C_DIR) -I${LIBLITMUS}/include -I${LIBLITMUS}/arch/arm/include
60COMPILE_C = $(CC) $(CFLAGS) -lm -O2 $(INCLUDES) 59COMPILE_C = $(CC) $(CFLAGS) $(INCLUDES) -O2
61#COMPILE_C = $(CC) $(CFLAGS) -DGENERATE_OUTPUT -lm -O2 $(INCLUDES) 60#COMPILE_C = $(CC) $(CFLAGS) -DGENERATE_OUTPUT -lm -O2 $(INCLUDES)
62COMPILE_G = $(CC) $(CFLAGS) -g -lm $(INCLUDES) 61COMPILE_G = $(CC) $(CFLAGS) -g -lm $(INCLUDES)
63COMPILE_PG = $(COMPILE_G) -pg 62COMPILE_PG = $(COMPILE_G) -pg
@@ -108,7 +107,7 @@ compile-preload:
108compile: $(C_SRC) 107compile: $(C_SRC)
109 @echo 108 @echo
110 @echo -e "Benchmark\t\t- $(BMARK)" 109 @echo -e "Benchmark\t\t- $(BMARK)"
111 @$(COMPILE_C) $(COMMON_SRC) $(C_SRC) -lrt -lm -w -o $(BMARK)$(EXE) 110 @$(COMPILE_C) $(COMMON_SRC) $(C_SRC) -lrt -L$(LIBLITMUS) -llitmus -lm -w -o $(BMARK)$(EXE)
112 111
113compile-prof: $(C_SRC) 112compile-prof: $(C_SRC)
114 @echo 113 @echo
diff --git a/SD-VBS/common/matlab/README.txt b/SD-VBS/common/matlab/README.txt
deleted file mode 100755
index 0513aaa..0000000
--- a/