diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-15 10:13:23 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-15 10:13:23 +0200 |
commit | 665cc63e16a1a5ac083c3a2df38236ae58025b64 (patch) | |
tree | c153ad46b6673fd2627d5988c360f8ec00b84fac /MLP/include/dfatool_host.ah | |
parent | 28f4fec42cc1eeec9718d1534728afaf9ac540f8 (diff) |
MLP: Add AspectC++ support
Diffstat (limited to 'MLP/include/dfatool_host.ah')
-rw-r--r-- | MLP/include/dfatool_host.ah | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/MLP/include/dfatool_host.ah b/MLP/include/dfatool_host.ah new file mode 100644 index 0000000..8cc4db5 --- /dev/null +++ b/MLP/include/dfatool_host.ah @@ -0,0 +1,31 @@ +#pragma once + +#include <sys/time.h> +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + + unsigned int n_rows, n_cols; + 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_rows = p->m_size; + n_cols = p->n_size; + printf("[>>] MLP | n_dpus=%u n_rows=%u n_cols=%u\n", NR_DPUS, n_rows, n_cols); + } + + advice call("% binarySearch(...)") : after() { + printf("[--] MLP | n_dpus=%u n_rows=%u n_cols=%u\n", NR_DPUS, n_rows, n_cols); + } + + advice execution("% main(...)") : after() { + printf("[<<] MLP | n_dpus=%u n_rows=%u n_cols=%u\n", NR_DPUS, n_rows, n_cols); + } +}; |