summaryrefslogtreecommitdiff
path: root/Microbenchmarks/CPU-DPU/dpu/task.c
diff options
context:
space:
mode:
Diffstat (limited to 'Microbenchmarks/CPU-DPU/dpu/task.c')
-rw-r--r--Microbenchmarks/CPU-DPU/dpu/task.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/Microbenchmarks/CPU-DPU/dpu/task.c b/Microbenchmarks/CPU-DPU/dpu/task.c
new file mode 100644
index 0000000..cb68b4c
--- /dev/null
+++ b/Microbenchmarks/CPU-DPU/dpu/task.c
@@ -0,0 +1,36 @@
+/*
+* Empty kernel with multiple tasklets
+*
+*/
+#include <stdint.h>
+#include <stdio.h>
+#include <defs.h>
+#include <mram.h>
+#include <alloc.h>
+#include <perfcounter.h>
+#include <barrier.h>
+
+#include "../support/common.h"
+
+__host dpu_arguments_t DPU_INPUT_ARGUMENTS;
+
+// Barrier
+BARRIER_INIT(my_barrier, NR_TASKLETS);
+
+extern int main_kernel1(void);
+
+int (*kernels[nr_kernels])(void) = {main_kernel1};
+
+int main(void) {
+ // Kernel
+ return kernels[DPU_INPUT_ARGUMENTS.kernel]();
+}
+
+// main_kernel1
+int main_kernel1() {
+#if PRINT
+ unsigned int tasklet_id = me();
+ printf("tasklet_id = %u\n", tasklet_id);
+#endif
+ return 0;
+}