Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4879 from martin-frbg/issue4868-2
Browse files Browse the repository at this point in the history
Ensure a memory buffer has been allocated for each thread before invoking it (take 2)
  • Loading branch information
martin-frbg authored Aug 15, 2024
2 parents dd71df8 + d24b3cf commit 3ee9e9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion driver/others/blas_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,11 @@ fprintf(STDERR, "Server[%2ld] Calculation started. Mode = 0x%03x M = %3ld N=%3l
main_status[cpu] = MAIN_RUNNING1;
#endif

if (buffer == NULL) blas_thread_buffer[cpu] = blas_memory_alloc(2);
if (buffer == NULL) {
blas_thread_buffer[cpu] = blas_memory_alloc(2);
buffer = blas_thread_buffer[cpu];
}


//For target LOONGSON3R5, applying an offset to the buffer is essential
//for minimizing cache conflicts and optimizing performance.
Expand Down

0 comments on commit 3ee9e9d

Please sign in to comment.