Allow to do gemv and ger buffer allocation on the stack
authorJerome Robert <jeromerobert@users.sf.net>
Fri, 26 Dec 2014 13:42:00 +0000 (14:42 +0100)
committerJerome Robert <jeromerobert@users.sf.net>
Sat, 27 Dec 2014 13:33:12 +0000 (14:33 +0100)
commite9d9a8eae3c9ff68b3d3cbcc794cf32735cda61a
tree55170ab7b5c4293b4c6c4229e00f789cb4517a6a
parentcbb3ab80e73f04ebe5b4c6899ec11be9761ac5c0
Allow to do gemv and ger buffer allocation on the stack

ger and gemv call blas_memory_alloc/free which in their turn
call blas_lock. blas_lock create thread contention when matrices
are small and the number of thread is high enough. We avoid
call blas_memory_alloc by replacing it with stack allocation.
This can be enabled with:
make -DMAX_STACK_ALLOC=2048
The given size (in byte) must be high enough to avoid thread contention
and small enough to avoid stack overflow.

Fix #478
Makefile.system
interface/gemv.c
interface/ger.c
kernel/x86_64/sgemv_t_4.c