summaryrefslogtreecommitdiff
path: root/GEMV/baselines
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-07-18 07:42:09 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-07-18 07:42:09 +0200
commitbe405b6d1a1ae6dbf92eecae309de7ee46ca6d3c (patch)
tree499a4760608e49e497a291ae233f6ac1b2744784 /GEMV/baselines
parent972a3ace3808467f98fca9c099ead7900f64f661 (diff)
GEMV: move ifndef T out of NUMA block; set membind only once
Diffstat (limited to 'GEMV/baselines')
-rw-r--r--GEMV/baselines/cpu/gemv_openmp.c14
-rw-r--r--GEMV/baselines/cpu/gemv_utils.h4
2 files changed, 10 insertions, 8 deletions
diff --git a/GEMV/baselines/cpu/gemv_openmp.c b/GEMV/baselines/cpu/gemv_openmp.c
index ed7b794..798f7de 100644
--- a/GEMV/baselines/cpu/gemv_openmp.c
+++ b/GEMV/baselines/cpu/gemv_openmp.c
@@ -2,14 +2,14 @@
#include <stdio.h>
#include "../../support/timer.h"
-#if NUMA
-#include <numaif.h>
-#include <numa.h>
-
#ifndef T
#define T double
#endif
+#if NUMA
+#include <numaif.h>
+#include <numa.h>
+
struct bitmask* bitmask_in;
struct bitmask* bitmask_out;
@@ -70,6 +70,12 @@ int main(int argc, char *argv[])
allocate_dense(rows, cols, &A);
+#if NUMA
+ if (bitmask_in) {
+ numa_free_nodemask(bitmask_in);
+ }
+#endif
+
make_hilbert_mat(rows,cols, &A);
#if NUMA
diff --git a/GEMV/baselines/cpu/gemv_utils.h b/GEMV/baselines/cpu/gemv_utils.h
index 30e4701..de55f19 100644
--- a/GEMV/baselines/cpu/gemv_utils.h
+++ b/GEMV/baselines/cpu/gemv_utils.h
@@ -1,10 +1,6 @@
void allocate_dense(size_t rows,size_t cols, T*** dense) {
#if NUMA
- if (bitmask_in) {
- numa_set_membind(bitmask_in);
- numa_free_nodemask(bitmask_in);
- }
*dense = numa_alloc(sizeof(void*)*rows);
**dense = numa_alloc(sizeof(T)*rows*cols);
#else