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:
Field G. Van Zee
2013-03-26 15:10:16 -05:00
parent 9682ef61db
commit fb68087f87
8 changed files with 47 additions and 28 deletions

View File

@@ -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();