From fa6c70a44fc56cc50370e57c460dd61e8f127b51 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 23 May 2025 16:28:17 +0200 Subject: SpMV: Add AspectC++ support --- SpMV/include/common.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 SpMV/include/common.h (limited to 'SpMV/include/common.h') diff --git a/SpMV/include/common.h b/SpMV/include/common.h new file mode 100644 index 0000000..6118814 --- /dev/null +++ b/SpMV/include/common.h @@ -0,0 +1,24 @@ + +/* Common data structures between host and DPUs */ + +#ifndef _COMMON_H_ +#define _COMMON_H_ + +#define ROUND_UP_TO_MULTIPLE_OF_2(x) ((((x) + 1)/2)*2) +#define ROUND_UP_TO_MULTIPLE_OF_8(x) ((((x) + 7)/8)*8) + +struct DPUParams { + uint32_t dpuNumRows; /* Number of rows assigned to the DPU */ + uint32_t dpuRowPtrsOffset; /* Offset of the row pointers */ + uint32_t dpuRowPtrs_m; + uint32_t dpuNonzeros_m; + uint32_t dpuInVector_m; + uint32_t dpuOutVector_m; +}; + +struct Nonzero { + uint32_t col; + float value; +}; + +#endif -- cgit v1.2.3