summaryrefslogtreecommitdiff
path: root/RED/include/dfatool_host.ah
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2025-05-23 15:13:59 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2025-05-23 15:13:59 +0200
commit828846895c8ed472cceea35b66fff53aa63984d6 (patch)
tree4c5230860fa6d04b4e4c975aa2734f4a4454522e /RED/include/dfatool_host.ah
parentb1f82770b817d0558044d3cfb1ef4d36b4492055 (diff)
RED: add AspectC++ support
Diffstat (limited to 'RED/include/dfatool_host.ah')
-rw-r--r--RED/include/dfatool_host.ah29
1 files changed, 29 insertions, 0 deletions
diff --git a/RED/include/dfatool_host.ah b/RED/include/dfatool_host.ah
new file mode 100644
index 0000000..88dfbd8
--- /dev/null
+++ b/RED/include/dfatool_host.ah
@@ -0,0 +1,29 @@
+#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(T);
+ }
+
+ advice call("% input_params(...)") : after() {
+ Params* p = tjp->result();
+ n_elements = p->input_size;
+ printf("[>>] RED | n_dpus=%u n_elements=%lu\n", NR_DPUS, n_elements);
+ }
+
+ advice call("% reduction_host(...)") : after() {
+ printf("[--] RED | n_dpus=%u n_elements=%lu\n", n_dpus, n_elements);
+ }
+
+ advice execution("% main(...)") : after() {
+ printf("[<<] RED | n_dpus=%u n_elements=%lu\n", NR_DPUS, n_elements);
+ }
+};