diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-05-23 16:28:17 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-05-23 16:28:35 +0200 |
commit | fa6c70a44fc56cc50370e57c460dd61e8f127b51 (patch) | |
tree | 91269761966dccea80a2931542db5a3648f66e18 /SpMV/include/dfatool_host.ah | |
parent | 2e3a43c12df8115fc859248adb14b87e08becb77 (diff) |
SpMV: Add AspectC++ support
Diffstat (limited to 'SpMV/include/dfatool_host.ah')
-rw-r--r-- | SpMV/include/dfatool_host.ah | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/SpMV/include/dfatool_host.ah b/SpMV/include/dfatool_host.ah new file mode 100644 index 0000000..91d44bd --- /dev/null +++ b/SpMV/include/dfatool_host.ah @@ -0,0 +1,31 @@ +#pragma once + +#include <sys/time.h> +#include "dfatool_host_dpu.ah" + +aspect DfatoolHostTiming : public DfatoolHostDPUTiming { + unsigned long n_rows, n_cols, n_nonzero; + unsigned int element_size; + + virtual int getKernel() { return 1; } + + DfatoolHostTiming() { + element_size = sizeof(float); + } + + advice call("% input_params(...)"): after() { + printf("[>>] SpMV | n_dpus=%u\n", NR_DPUS); + } + + advice call("% readCOOMatrix(...)") : after() { + struct COOMatrix* c = tjp->result(); + n_rows = c->numRows; + n_cols = c->numCols; + n_nonzero = c->numNonzeros; + printf("[--] SpMV | n_dpus=%u n_rows=%lu n_cols=%lu n_nonzero=%lu\n", NR_DPUS, n_rows, n_cols, n_nonzero); + } + + advice execution("% main(...)") : after() { + printf("[<<] SpMV | n_dpus=%u n_rows=%lu n_cols=%lu n_nonzero=%lu\n", NR_DPUS, n_rows, n_cols, n_nonzero); + } +}; |