From d666b713716af62708cc9fefe3ab136e7f18b5ae Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Tue, 13 May 2025 16:00:22 +0200 Subject: TS: Add AspectC++ support --- TS/include/dfatool_host.ah | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 TS/include/dfatool_host.ah (limited to 'TS/include/dfatool_host.ah') diff --git a/TS/include/dfatool_host.ah b/TS/include/dfatool_host.ah new file mode 100644 index 0000000..2a45918 --- /dev/null +++ b/TS/include/dfatool_host.ah @@ -0,0 +1,25 @@ +#pragma once + +#include +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + + DfatoolHostTiming() { + element_size = sizeof(DTYPE); + } + + advice call("% input_params(...)") : after() { + Params* p = tjp->result(); + input_size = p->input_size_n; + printf("[>>] TS | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size); + } + + advice call("% streamp(...)") : before() { + printf("[--] TS | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size); + } + + advice execution("% main(...)") : after() { + printf("[<<] TS | n_dpus=%u n_elements=%lu\n", NR_DPUS, input_size); + } +}; -- cgit v1.2.3