Browse Source

Merge pull request #552 from jeromerobert/develop

gemv: Ensure stack buffer is large enough to handle memory alignment
tags/v0.2.15^2
Zhang Xianyi 11 years ago
parent
commit
37b00841ac
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      interface/gemv.c

+ 4
- 0
interface/gemv.c View File

@@ -38,6 +38,7 @@

#include <stdio.h>
#include "common.h"
#include "l1param.h"
#ifdef FUNCTION_PROFILE
#include "functable.h"
#endif
@@ -214,6 +215,9 @@ void CNAME(enum CBLAS_ORDER order,
volatile int stack_alloc_size = 0;
//for gemv_n and gemv_t, try to allocate on stack
stack_alloc_size = m + n;
#ifdef ALIGNED_ACCESS
stack_alloc_size += 3;
#endif
if(stack_alloc_size < 128)
//dgemv_n.S require a 128 bytes buffer
stack_alloc_size = 128;


Loading…
Cancel
Save