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

@@ -60,12 +60,15 @@
// -- MEMORY ALLOCATOR ---------------------------------------------------------
// Enable memory alignment?
// NOTE: This should stay enabled!
#define BLIS_ENABLE_MEMORY_ALIGNMENT 1
// Enable memory alignment when allocating memory from operating system?
#define BLIS_ENABLE_SYSTEM_MEM_ALIGN 1
// Set the memory alignment boundary size.
#define BLIS_MEMORY_ALIGNMENT_SIZE 16
// Alignment size used when allocating memory from operating system.
#define BLIS_SYSTEM_MEM_ALIGN_SIZE 16
// Alignment size used when allocating contiguous memory from memory
// allocator.
#define BLIS_CONTIG_MEM_ALIGN_SIZE 16
// The number of MC x KC, KC x NC, and MC x NC blocks to reserve in the
// contiguous memory pools.