Merge pull request #552 from jeromerobert/develop

gemv: Ensure stack buffer is large enough to handle memory alignment
This commit is contained in:
Zhang Xianyi 2015-04-24 14:12:12 -05:00
commit 37b00841ac
1 changed files with 4 additions and 0 deletions

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;