From a2931b65cd3ff5a2e77d9564a95aa3368a24533e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 15 May 2025 08:20:02 +0200 Subject: HST-L: Add AspectC++ support --- HST-L/include/dfatool_host.ah | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 HST-L/include/dfatool_host.ah (limited to 'HST-L/include/dfatool_host.ah') diff --git a/HST-L/include/dfatool_host.ah b/HST-L/include/dfatool_host.ah new file mode 100644 index 0000000..db4e441 --- /dev/null +++ b/HST-L/include/dfatool_host.ah @@ -0,0 +1,31 @@ +#pragma once + +#include +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + unsigned long n_pixels; + unsigned int n_bins; + unsigned int element_size; + + virtual int getKernel() { return 1; } + + DfatoolHostTiming() { + element_size = sizeof(T); + } + + advice call("% input_params(...)") : after() { + Params* p = tjp->result(); + n_pixels = p->input_size; + n_bins = p->bins; + printf("[>>] HST-L | n_dpus=%u n_pixels=%lu n_bins=%u\n", NR_DPUS, n_pixels, n_bins); + } + + advice call("% histogram_host(...)") : after() { + printf("[--] HST-L | n_dpus=%u n_pixels=%lu n_bins=%u\n", NR_DPUS, n_pixels, n_bins); + } + + advice execution("% main(...)") : after() { + printf("[<<] HST-L | n_dpus=%u n_pixels=%lu n_bins=%u\n", NR_DPUS, n_pixels, n_bins); + } +}; -- cgit v1.2.3