diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-14 13:43:55 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-14 13:43:55 +0200 |
commit | 4052d7b4c0e1a59419f07642b9a33088f5745d28 (patch) | |
tree | 23fb0907d1ffad55331e0e8fcf71ac2d876f4851 /BFS/include/dfatool_host.ah | |
parent | aed00e149b8a3677a89416eaa112ea6c5249150b (diff) |
BFS: AspectC++ (and behaviour model) support
Diffstat (limited to 'BFS/include/dfatool_host.ah')
-rw-r--r-- | BFS/include/dfatool_host.ah | 27 |
1 files changed, 27 insertions, 0 deletions
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 <sys/time.h> +#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); + } +}; |