mirror of
https://github.com/amd/blis.git
synced 2026-05-05 15:01:13 +00:00
More memory alignment-related tweaks.
Details: - Renamed BLIS_MEMORY_ALIGNMENT_SIZE to BLIS_CONTIG_MEM_ALIGN_SIZE. - Renamed BLIS_ENABLE_MEMORY_ALIGNMENT to BLIS_ENABLE_SYSTEM_MEM_ALIGN. - Added BLIS_SYSTEM_MEM_ALIGN_SIZE, which controls only the alignment passed into posix_memalign() or equivalent. - Defined new function, bli_align_dim_to_cmem(), which applies the contiguous memory alignment (rather than the system/malloc alignment).
This commit is contained in:
@@ -41,9 +41,9 @@ void* bli_malloc( siz_t size )
|
||||
|
||||
if ( size == 0 ) return NULL;
|
||||
|
||||
#ifdef BLIS_ENABLE_MEMORY_ALIGNMENT
|
||||
#ifdef BLIS_ENABLE_SYSTEM_MEM_ALIGN
|
||||
r_val = posix_memalign( &p,
|
||||
( size_t ) BLIS_MEMORY_ALIGNMENT_SIZE,
|
||||
( size_t ) BLIS_SYSTEM_MEM_ALIGN_SIZE,
|
||||
( size_t ) size );
|
||||
|
||||
if ( r_val != 0 ) bli_abort();
|
||||
|
||||
Reference in New Issue
Block a user