StuBS
Loading...
Searching...
No Matches
cache.h File Reference

Helper for cache alignment. More...

#include "debug/assert.h"
Include dependency graph for cache.h:
This graph shows which files directly or indirectly include this file:

Macros

#define assert_cache_aligned(TYPE)    static_assert(sizeof(TYPE) % CACHE_LINE_SIZE == 0, STRINGIFY(TYPE) "Not aligned on cache boundary")
 Compile time check of cache alignment.
 

Detailed Description

Helper for cache alignment.

Macro Definition Documentation

◆ assert_cache_aligned

#define assert_cache_aligned ( TYPE)     static_assert(sizeof(TYPE) % CACHE_LINE_SIZE == 0, STRINGIFY(TYPE) "Not aligned on cache boundary")

Compile time check of cache alignment.

Parameters
TYPEdata type to check