medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 24083ea511f6047397f14030a65d7b712555938f
parent 2362a641256c6f161fd56a6ba288fad4198390f2
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Jan 17 23:24:00 +0000

Add CACHE_LINE_SIZE/CACHE_LINE_PADDING

Diffstat:
intrinsics.h | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/intrinsics.h b/intrinsics.h @@ -38,6 +38,9 @@ typedef double f64; #define megabytes( mb ) ( kilobytes( mb ) * size_t( 1024 ) ) #define gigabytes( gb ) ( megabytes( gb ) * size_t( 1024 ) ) +#define CACHE_LINE_SIZE 64 +#define CACHE_LINE_PADDING u8 cache_line_spacing##__COUNTER__[ CACHE_LINE_SIZE ] + template< typename T > T min( T a, T b ) { return a < b ? a : b;