gemv: Ensure stack buffer is large enough to handle memory alignment
Ref #478
This commit is contained in:
parent
3c09cea4b2
commit
ab567d8443
|
@ -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…
Reference in New Issue