summaryrefslogtreecommitdiff
path: root/GEMV/baselines/cpu/gemv_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'GEMV/baselines/cpu/gemv_utils.h')
-rw-r--r--GEMV/baselines/cpu/gemv_utils.h9
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;