From 4052d7b4c0e1a59419f07642b9a33088f5745d28 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 14 May 2025 13:43:55 +0200 Subject: BFS: AspectC++ (and behaviour model) support --- BFS/include/dfatool_host.ah | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 BFS/include/dfatool_host.ah (limited to 'BFS/include/dfatool_host.ah') diff --git a/BFS/include/dfatool_host.ah b/BFS/include/dfatool_host.ah new file mode 100644 index 0000000..592e6ec --- /dev/null +++ b/BFS/include/dfatool_host.ah @@ -0,0 +1,27 @@ +#pragma once + +#include +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + + virtual int getKernel() { return 1; } + + DfatoolHostTiming() { + element_size = sizeof(uint32_t); + } + + advice call("% input_params(...)"): after() { + printf("[>>] BFS | n_dpus=%u\n", NR_DPUS); + } + + advice call("% coo2csr(...)") : after() { + struct CSRGraph *g = tjp->result(); + input_size = g->numNodes; + printf("[--] BFS | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size); + } + + advice execution("% main(...)") : after() { + printf("[<<] BFS | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size); + } +}; -- cgit v1.2.3