zgemv: Add a workaround for #746

This commit is contained in:
Jerome Robert 2016-01-24 10:14:41 +01:00
parent 78dcf5c3d5
commit 5fc2203d8a
1 changed files with 6 additions and 0 deletions

View File

@ -239,6 +239,12 @@ void CNAME(enum CBLAS_ORDER order,
buffer_size = (buffer_size + 3) & ~3;
STACK_ALLOC(buffer_size, FLOAT, buffer);
#ifdef ARCH_X86_64
// cgemv_t.S return NaN if there are NaN or Inf in the buffer (see bug #746)
if(trans && stack_alloc_size)
memset(buffer, 0, MIN(BUFFER_SIZE, sizeof(FLOAT) * buffer_size));
#endif
#ifdef SMP
if ( 1L * m * n < 1024L * GEMM_MULTITHREAD_THRESHOLD )