gemv: Ensure stack buffer is large enough to handle memory alignment

Ref #478
This commit is contained in:
Jerome Robert 2015-04-21 10:12:01 +02:00
parent 3c09cea4b2
commit ab567d8443
1 changed files with 4 additions and 0 deletions

View File

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