diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-15 11:08:24 +0200 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-15 11:08:24 +0200 |
| commit | 643e7dc59e8e0799f91ff74df56c52d7d4c10f12 (patch) | |
| tree | 2553ba527ccd0a4dfd542cbb45f899298c8fc60d /NW/include/dfatool_host.ah | |
| parent | 665cc63e16a1a5ac083c3a2df38236ae58025b64 (diff) | |
NW: AspectC++ support
Diffstat (limited to 'NW/include/dfatool_host.ah')
| -rw-r--r-- | NW/include/dfatool_host.ah | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/NW/include/dfatool_host.ah b/NW/include/dfatool_host.ah new file mode 100644 index 0000000..d45aef3 --- /dev/null +++ b/NW/include/dfatool_host.ah @@ -0,0 +1,30 @@ +#pragma once + +#include <sys/time.h> +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + + unsigned long n_elements; + unsigned int element_size; + + virtual int getKernel() { return 1; } + + DfatoolHostTiming() { + element_size = sizeof(uint32_t); + } + + advice call("% input_params(...)"): after() { + Params* p = tjp->result(); + n_elements = p->max_rows; + printf("[>>] NW | n_dpus=%u n_elements=%lu\n", NR_DPUS, n_elements); + } + + advice call("% srand(...)") : after() { + printf("[--] NW | n_dpus=%u n_elements=%lu\n", NR_DPUS, n_elements); + } + + advice execution("% main(...)") : after() { + printf("[<<] NW | n_dpus=%u n_elements=%lu\n", NR_DPUS, n_elements); + } +}; |
