diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-07-04 09:40:07 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2024-07-04 09:40:07 +0200 |
commit | b08b2c4c2a51e9e49c6d38a153ca5e0269e8272b (patch) | |
tree | 2326d92d33f898194a7357261466adba3c56ad68 /GEMV/baselines/cpu/gemv_utils.h | |
parent | 6ea34c34074793b4989614207ffe414cd3824e6b (diff) |
GEMV: Add NUMA variant for HBM evaluation
Diffstat (limited to 'GEMV/baselines/cpu/gemv_utils.h')
-rw-r--r-- | GEMV/baselines/cpu/gemv_utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/GEMV/baselines/cpu/gemv_utils.h b/GEMV/baselines/cpu/gemv_utils.h index 605f148..c99763a 100644 --- a/GEMV/baselines/cpu/gemv_utils.h +++ b/GEMV/baselines/cpu/gemv_utils.h @@ -1,7 +1,16 @@ void allocate_dense(size_t rows,size_t cols, double*** dense) { +#if NUMA + if (bitmask_in) { + numa_set_membind(bitmask_in); + numa_free_nodemask(bitmask_in); + } + *dense = numa_alloc(sizeof(double)*rows); + **dense = numa_alloc(sizeof(double)*rows*cols); +#else *dense = malloc(sizeof(double)*rows); **dense = malloc(sizeof(double)*rows*cols); +#endif for (size_t i=0; i < rows; i++ ) { (*dense)[i] = (*dense)[0] + i*cols; |