diff options
author | Juan Gomez Luna <juan.gomez@safari.ethz.ch> | 2021-06-16 19:46:05 +0200 |
---|---|---|
committer | Juan Gomez Luna <juan.gomez@safari.ethz.ch> | 2021-06-16 19:46:05 +0200 |
commit | 3de4b495fb176eba9a0eb517a4ce05903cb67acb (patch) | |
tree | fc6776a94549d2d4039898f183dbbeb2ce013ba9 /Microbenchmarks/CPU-DPU/dpu | |
parent | ef5c3688c486b80a56d3c1cded25f2b2387f2668 (diff) |
PrIM -- first commit
Diffstat (limited to 'Microbenchmarks/CPU-DPU/dpu')
-rw-r--r-- | Microbenchmarks/CPU-DPU/dpu/task.c | 36 |
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; +} |