Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia Namespace Reference

Checks if endianess was detected correctly at compile-time. More...

Enumerations

enum  PrefetchHint : int { PREFETCH_HINT_T0 = 3 , PREFETCH_HINT_T1 = 2 , PREFETCH_HINT_T2 = 1 , PREFETCH_HINT_NTA = 0 }
 

Functions

bool CheckEndianess ()
 
template<class T >
void dont_optimize (T const &value)
 
template<class T >
void dont_optimize (T &value)
 
GAIA_FORCEINLINE void prefetch (const void *x, int hint)
 Prefetch intrinsic.
 
template<class F , class... Args>
constexpr decltype(auto) invoke (F &&f, Args &&... args) noexcept(std::is_nothrow_invocable_v< F, Args... >)
 

Variables

constexpr uint32_t BadIndex = uint32_t(-1)
 

Detailed Description

Checks if endianess was detected correctly at compile-time.

Returns
True if endianess defined in GAIA_LITTLE_ENDIAN/GAIA_END_ENDIAN is correct. False otherwise.
Warning
If false is returned, flip the values in GAIA_LITTLE_ENDIAN and GAIA_BIG_ENDIAN.

Enumeration Type Documentation

◆ PrefetchHint

enum gaia::PrefetchHint : int
Enumerator
PREFETCH_HINT_T0 

Temporal data — prefetch data into all levels of the cache hierarchy.

PREFETCH_HINT_T1 

Temporal data with respect to first level cache misses — prefetch data into L2 cache and higher.

PREFETCH_HINT_T2 

Temporal data with respect to second level cache misses — prefetch data into L3 cache and higher, or an implementation-specific choice.

PREFETCH_HINT_NTA 

Non-temporal data with respect to all cache levels — prefetch data into non-temporal cache structure and into a location close to the processor, minimizing cache pollution.