Foundation
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Foundation::Core Namespace Reference

Lock-free atomic primitives and implementations of data structures. More...

Namespaces

namespace  Ranges
 Ranges extensions.
 

Classes

class  Allocator
 Allocator interface (noexcept) More...
 
class  AllocatorHeap
 General purpose heap allocator. More...
 
class  AllocatorStack
 Implements a lock-free stack-based bump allocator. More...
 
struct  Arena
 A memory arena allocated from an Allocator. More...
 
class  AtomicPool
 Atomic, bounded object pool of fixed allocation sizes. Being a sibling to AtomicStack - key differences being how objects are allocated in a fixed-size arena and is never freed back to the system. Deallocation returns objects to the pool for reuse. That - and you get stable pointers to objects directly. More...
 
class  AtomicStack
 Atomic, unbounded LIFO stack with lock-free push and pop operations. More...
 
struct  BitmaskEnumWrapper
 Wrapper for bitmask enum types that provides bitwise operators. More...
 
class  DynamicPool
 Mutex-protected, dynamically sized object pool with stable object pointers. More...
 
struct  FUUID
 128-bit identifier. Two flavors, both well-formed per RFC 9562: More...
 
struct  Job
 
class  JobBarrier
 
struct  JobBarrierState
 
class  JobCallable
 
class  JobContext
 
class  JobHandle
 
struct  JobNode
 
struct  JobPool
 
class  JobSystem
 
struct  JobSystemDesc
 
struct  LambdaJob
 
class  LambdaJobCallable
 
class  MemoryMappedFile
 
class  MPMCQueue
 Atomic, bounded multi-producer multi-consumer FIFO ring buffer with a fixed maximum size. More...
 
struct  Optional
 std::optional with convenience Get()/GetIf() methods. More...
 
struct  ScopedArena
 RAII wrapper for an arena allocated from an Allocator. More...
 
class  SPSCQueue
 Atomic, bounded single-producer single-consumer FIFO ring buffer with a fixed maximum size. More...
 
struct  StackArena
 A fixed-size stack memory arena. More...
 
struct  StlAllocator
 std::allocator adaptor for Foundation::Core::Allocator More...
 
struct  StlDefaultAllocator
 
struct  StlDeleter
 Custom deleter for Foundation::Core::UniquePtr and Foundation::Core::SharedPtr that uses a Foundation::Core::Allocator to deallocate memory. More...
 
class  ThreadPool
 Atomic, lock-free Thread Pool implementation with fixed bounds. More...
 
struct  Variant
 std::variant with C++23 visit() behavior and convenience Get()/GetIf() methods. Also read upon https://bitbashing.io/std-visit.html - which is not used here. More...
 
class  XorShift128
 

Typedefs

using size_type = std::size_t
 
using pointer = void *
 
template<typename T , typename Deleter = StlDeleter<T>>
using UniquePtr = std::unique_ptr< T, Deleter >
 std::unique_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.
 
template<typename T >
using SharedPtr = std::shared_ptr< T >
 std::shared_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.
 
template<typename T >
using WeakPtr = std::weak_ptr< T >
 
template<typename T >
using Atomic = std::atomic< T >
 Alias of std::atomic<T>.
 
template<typename First , typename Second >
using Pair = std::pair< First, Second >
 Alias for std::pair
 
template<typename... Args>
using Tuple = std::tuple< Args... >
 Alias for std::tuple
 
template<typename T , size_t Size>
using Array = std::array< T, Size >
 Alias for std::array
 
template<size_t Size>
using Bitset = std::bitset< Size >
 Alias for std::bitset
 
using StringView = std::basic_string_view< char >
 Alias for std::basic_string_view<char>
 
template<typename T >
using Span = std::span< T >
 Alias for std::span
 
using String = std::basic_string< char, std::char_traits< char >, StlDefaultAllocator< char > >
 Alias for std::basic_string<char>, without an explicit allocator constructor.
 
using StringAlloc = std::basic_string< char, std::char_traits< char >, StlAllocator< char > >
 std::basic_string<char> with explicit Foundation::Core::StlAllocator constructor
 
template<typename T >
using Vector = std::vector< T, StlAllocator< T > >
 std::vector with explicit Foundation::Core::StlAllocator constructor
 
template<typename T , typename Predicate = std::less<T>>
using Set = std::set< T, Predicate, StlAllocator< T > >
 std::set with explicit Foundation::Core::StlAllocator constructor
 
template<typename T , typename Predicate = std::less<T>>
using MultiSet = std::multiset< T, Predicate, StlAllocator< T > >
 std::multiset with explicit Foundation::Core::StlAllocator constructor
 
template<typename K , typename V , typename Predicate = std::less<K>>
using Map = std::map< K, V, Predicate, StlAllocator< Pair< const K, V > > >
 std::map with explicit Foundation::Core::StlAllocator constructor
 
template<typename K , typename V , typename Hash = std::hash<K>, typename KeyEq = std::equal_to<K>>
using HashMap = std::unordered_map< K, V, Hash, KeyEq, StlAllocator< Pair< const K, V > > >
 std::unordered_map with explicit Foundation::Core::StlAllocator constructor.
 
template<typename K , typename Hash = std::hash<K>, typename KeyEq = std::equal_to<K>>
using HashSet = std::unordered_set< K, Hash, KeyEq, StlAllocator< K > >
 std::unordered_set with explicit Foundation::Core::StlAllocator constructor.
 
template<typename K , typename V , typename Predicate = std::less<K>>
using MultiMap = std::multimap< K, V, Predicate, StlAllocator< Pair< const K, V > > >
 std::multimap with explicit Foundation::Core::StlAllocator constructor
 
template<typename T >
using Deque = std::deque< T, StlAllocator< T > >
 std::deque with explicit Foundation::Core::StlAllocator constructor
 
template<typename T >
using Stack = std::stack< T, Deque< T > >
 std::stack with explicit Foundation::Core::StlAllocator constructor
 
template<typename T >
using List = std::list< T, StlAllocator< T > >
 std::list with explicit Foundation::Core::StlAllocator constructor
 
template<typename T , typename Container = Deque<T>>
using Queue = std::queue< T, Container >
 std::queue with explicit Foundation::Core::StlAllocator constructor
 
template<typename T , typename Predicate = std::less<T>, typename Container = Vector<T>>
using PriorityQueue = std::priority_queue< T, Container, Predicate >
 std::priority_queue with explicit Foundation::Core::StlAllocator constructor
 
template<typename T = void>
using Promise = std::promise< T >
 
template<typename T = void>
using Future = std::future< T >
 
using CondVar = std::condition_variable
 
using Mutex = std::mutex
 
using Thread = std::thread
 Alias of std::thread.
 
using JobQueue = MPMCQueue< UniquePtr< Job > >
 Backing job queue type for ThreadPool.
 
using JobQueues = std::array< JobQueue, kJobPriorityCount >
 

Enumerations

enum class  JobStatus : uint8_t {
  Waiting , Queued , Running , Completed ,
  Failed , Cancelled
}
 
enum class  MemoryMappedAccess { ReadOnly , ReadWrite }
 
enum class  JobPriority : size_t { Low , Normal , High }
 

Functions

constexpr uintptr_t AlignUp (const uintptr_t value, const uintptr_t alignment)
 
constexpr uintptr_t AlignDown (const uintptr_t value, const uintptr_t alignment)
 
template<typename Base , typename Derived , typename... Args>
Base * ConstructBase (Allocator *resource, Args &&... args)
 Placement new helper for constructing an object of type Derived (which can be a subclass of Base) using a Foundation::Core::Allocator.
 
template<typename T , typename... Args>
T * Construct (Allocator *resource, Args &&... args)
 Convenience placement new with object of type T using a Foundation::Core::Allocator.
 
template<typename T >
void Destruct (Allocator *resource, T *obj)
 Convenience destructor for objects allocated with Construct or ConstructBase.
 
template<typename Base , typename Derived , typename... Args>
UniquePtr< Base > ConstructUniqueBase (Allocator *resource, Args &&... args)
 Helper function for constructing a pinned resource with a Foundation::Core::Allocator.
 
template<typename T , typename... Args>
UniquePtr< T > ConstructUnique (Allocator *resource, Args &&... args)
 Convenience wrapper for calling ConstructUniqueBase when Base and Derived are the same type.
 
template<typename Base , typename Derived , typename... Args>
SharedPtr< Base > ConstructSharedBase (Allocator *resource, Args &&... args)
 Helper function for constructing a ref-counted resource with a Foundation::Core::Allocator.
 
template<typename T , typename... Args>
SharedPtr< T > ConstructShared (Allocator *resource, Args &&... args)
 Convenience wrapper for calling ConstructSharedBase when Base and Derived are the same type.
 
AllocatorGetGlobalAllocator ()
 
template<typename T >
InterlockedMin (Atomic< T > &atomic, T value, std::memory_order order=std::memory_order_seq_cst)
 
template<typename T >
InterlockedMax (Atomic< T > &atomic, T value, std::memory_order order=std::memory_order_seq_cst)
 
template<typename T >
Span< const char > AsBytes (Span< T > data)
 
template<typename T >
requires std::is_trivially_copyable_v<T>
Span< const T > AsSpan (T const &data)
 Helper to construct one const r-value as a single element span.
 
template<typename T , typename... Args>
Span< T > ConstructSpan (Allocator *resource, size_t size, Args &&... args)
 Convenience function for constructing a Span with memory allocated from a Foundation::Core::Allocator. Possibly constructs objects in-place if they are not trivially constructible (e.g. non-PODs)
 
template<typename T >
void DestructSpan (Allocator *resource, Span< T > span)
 Convenience function for destructing a Span allocated with ConstructSpan. Calls destructors in-place if the type is not trivially destructible (e.g. non-PODs)
 
template<typename... Args>
constexpr String Format (fmt::format_string< Args... > format, Args &&... args)
 String wrapper for Format().
 
template<typename T >
constexpr uint64_t FNV1a64 (Span< const T > span) noexcept
 
constexpr uint64_t FNV1a64CombineByte (uint64_t hash, uint8_t value) noexcept
 
uint64_t FNV1a64CombineBytes (uint64_t hash, void const *data, size_t size) noexcept
 
template<std::integral T>
constexpr uint64_t FNV1a64Combine (uint64_t hash, T value) noexcept
 
template<typename T >
requires std::is_enum_v<T>
constexpr uint64_t FNV1a64Combine (uint64_t hash, T value) noexcept
 
constexpr uint64_t FNV1a64Combine (uint64_t hash, float value) noexcept
 
constexpr uint64_t FNV1a64Combine (uint64_t hash, double value) noexcept
 
template<typename... T>
constexpr uint64_t FNV1a64 (T... values) noexcept
 
template<typename T >
constexpr uint64_t FNV1a64 (T *data, size_t size) noexcept
 
template<typename... Args>
void Print (fmt::format_string< Args... > format, Args &&... args)
 
template<typename... Args>
void Println (fmt::format_string< Args... > format, Args &&... args)
 
FUUID UUIDv4 (FUUID id, uint64_t version) noexcept
 
uint64_t SplitMix64 (uint64_t state) noexcept
 

Variables

constexpr size_t kDefaultStackArenaSize = 12 * 1024
 
constexpr uint64_t kFNV1a64OffsetBasis = 14695981039346656037ull
 
constexpr uint64_t kFNV1a64Prime = 1099511628211ull
 
constexpr size_t kJobPriorityCount = static_cast<size_t>(JobPriority::High) + 1
 
static constexpr FUUID kNilUUID {}
 

Detailed Description

Lock-free atomic primitives and implementations of data structures.

Note
References:

Typedef Documentation

◆ Array

template<typename T , size_t Size>
using Foundation::Core::Array = typedef std::array<T, Size>

Alias for std::array

◆ Atomic

template<typename T >
using Foundation::Core::Atomic = typedef std::atomic<T>

Alias of std::atomic<T>.

◆ Bitset

template<size_t Size>
using Foundation::Core::Bitset = typedef std::bitset<Size>

Alias for std::bitset

◆ CondVar

using Foundation::Core::CondVar = typedef std::condition_variable

◆ Deque

template<typename T >
using Foundation::Core::Deque = typedef std::deque<T, StlAllocator<T> >

std::deque with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ Future

template<typename T = void>
using Foundation::Core::Future = typedef std::future<T>

◆ HashMap

template<typename K , typename V , typename Hash = std::hash<K>, typename KeyEq = std::equal_to<K>>
using Foundation::Core::HashMap = typedef std::unordered_map<K, V, Hash, KeyEq, StlAllocator<Pair<const K, V> >>

std::unordered_map with explicit Foundation::Core::StlAllocator constructor.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ HashSet

template<typename K , typename Hash = std::hash<K>, typename KeyEq = std::equal_to<K>>
using Foundation::Core::HashSet = typedef std::unordered_set<K, Hash, KeyEq, StlAllocator<K> >

std::unordered_set with explicit Foundation::Core::StlAllocator constructor.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ JobQueue

Backing job queue type for ThreadPool.

◆ JobQueues

◆ List

template<typename T >
using Foundation::Core::List = typedef std::list<T, StlAllocator<T> >

std::list with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ Map

template<typename K , typename V , typename Predicate = std::less<K>>
using Foundation::Core::Map = typedef std::map<K, V, Predicate, StlAllocator<Pair<const K, V> >>

std::map with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ MultiMap

template<typename K , typename V , typename Predicate = std::less<K>>
using Foundation::Core::MultiMap = typedef std::multimap<K, V, Predicate, StlAllocator<Pair<const K, V> >>

std::multimap with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ MultiSet

template<typename T , typename Predicate = std::less<T>>
using Foundation::Core::MultiSet = typedef std::multiset<T, Predicate, StlAllocator<T> >

std::multiset with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ Mutex

using Foundation::Core::Mutex = typedef std::mutex

◆ Pair

template<typename First , typename Second >
using Foundation::Core::Pair = typedef std::pair<First, Second>

Alias for std::pair

◆ pointer

using Foundation::Core::pointer = typedef void*

◆ PriorityQueue

template<typename T , typename Predicate = std::less<T>, typename Container = Vector<T>>
using Foundation::Core::PriorityQueue = typedef std::priority_queue<T, Container, Predicate>

std::priority_queue with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ Promise

template<typename T = void>
using Foundation::Core::Promise = typedef std::promise<T>

◆ Queue

template<typename T , typename Container = Deque<T>>
using Foundation::Core::Queue = typedef std::queue<T, Container>

std::queue with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ Set

template<typename T , typename Predicate = std::less<T>>
using Foundation::Core::Set = typedef std::set<T, Predicate, StlAllocator<T> >

std::set with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ SharedPtr

template<typename T >
using Foundation::Core::SharedPtr = typedef std::shared_ptr<T>

std::shared_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.

◆ size_type

using Foundation::Core::size_type = typedef std::size_t

◆ Span

template<typename T >
using Foundation::Core::Span = typedef std::span<T>

Alias for std::span

◆ Stack

template<typename T >
using Foundation::Core::Stack = typedef std::stack<T, Deque<T> >

std::stack with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ String

using Foundation::Core::String = typedef std::basic_string<char, std::char_traits<char>, StlDefaultAllocator<char> >

Alias for std::basic_string<char>, without an explicit allocator constructor.

Allocation of strings on heap is done with the default GLOBAL_ALLOC, and construction without an allocator is allowed.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ StringAlloc

using Foundation::Core::StringAlloc = typedef std::basic_string<char, std::char_traits<char>, StlAllocator<char> >

std::basic_string<char> with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ StringView

using Foundation::Core::StringView = typedef std::basic_string_view<char>

Alias for std::basic_string_view<char>

◆ Thread

using Foundation::Core::Thread = typedef std::thread

Alias of std::thread.

Note
Consumers MUST ensure the thread is joined before destruction.

◆ Tuple

template<typename... Args>
using Foundation::Core::Tuple = typedef std::tuple<Args...>

Alias for std::tuple

◆ UniquePtr

template<typename T , typename Deleter = StlDeleter<T>>
using Foundation::Core::UniquePtr = typedef std::unique_ptr<T, Deleter>

std::unique_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.

Construction without a Foundation::Core::Allocator pointer is disallowed, and will result in a compile-time error.

◆ Vector

template<typename T >
using Foundation::Core::Vector = typedef std::vector<T, StlAllocator<T> >

std::vector with explicit Foundation::Core::StlAllocator constructor

Construction without an allocator is disallowed, and will result in a compile-time error.

Note
Thread-safety is not guaranteed as with other STL containers.

◆ WeakPtr

template<typename T >
using Foundation::Core::WeakPtr = typedef std::weak_ptr<T>

Enumeration Type Documentation

◆ JobPriority

enum class Foundation::Core::JobPriority : size_t
strong
Enumerator
Low 
Normal 
High 

◆ JobStatus

enum class Foundation::Core::JobStatus : uint8_t
strong
Enumerator
Waiting 
Queued 
Running 
Completed 
Failed 
Cancelled 

◆ MemoryMappedAccess

Enumerator
ReadOnly 
ReadWrite 

Function Documentation

◆ AlignDown()

constexpr uintptr_t Foundation::Core::AlignDown ( const uintptr_t  value,
const uintptr_t  alignment 
)
constexpr

◆ AlignUp()

constexpr uintptr_t Foundation::Core::AlignUp ( const uintptr_t  value,
const uintptr_t  alignment 
)
constexpr

◆ AsBytes()

template<typename T >
Span< const char > Foundation::Core::AsBytes ( Span< T >  data)

◆ AsSpan()

template<typename T >
requires std::is_trivially_copyable_v<T>
Span< const T > Foundation::Core::AsSpan ( T const &  data)

Helper to construct one const r-value as a single element span.

◆ Construct()

template<typename T , typename... Args>
T * Foundation::Core::Construct ( Allocator resource,
Args &&...  args 
)

Convenience placement new with object of type T using a Foundation::Core::Allocator.

Note
Using delete, delete[] on the returned pointer is undefined behaviour. Destruct should ALWAYS be used for such purposes.

◆ ConstructBase()

template<typename Base , typename Derived , typename... Args>
Base * Foundation::Core::ConstructBase ( Allocator resource,
Args &&...  args 
)

Placement new helper for constructing an object of type Derived (which can be a subclass of Base) using a Foundation::Core::Allocator.

Note
Using delete, delete[] on the returned pointer is undefined behaviour. Destruct should ALWAYS be used for such purposes.

◆ ConstructShared()

template<typename T , typename... Args>
SharedPtr< T > Foundation::Core::ConstructShared ( Allocator resource,
Args &&...  args 
)

Convenience wrapper for calling ConstructSharedBase when Base and Derived are the same type.

Template Parameters
Tis the class type to be templated on.

◆ ConstructSharedBase()

template<typename Base , typename Derived , typename... Args>
SharedPtr< Base > Foundation::Core::ConstructSharedBase ( Allocator resource,
Args &&...  args 
)

Helper function for constructing a ref-counted resource with a Foundation::Core::Allocator.

Template Parameters
Baseis the base class type be templated on.
Derivedcan be a subclass of Base, with destruction handled correctly.

◆ ConstructSpan()

template<typename T , typename... Args>
Span< T > Foundation::Core::ConstructSpan ( Allocator resource,
size_t  size,
Args &&...  args 
)

Convenience function for constructing a Span with memory allocated from a Foundation::Core::Allocator. Possibly constructs objects in-place if they are not trivially constructible (e.g. non-PODs)

Note
Data is not guaranteed to be zero-initialized. Pass in constructor args if needed.
Constructor args are only used if T is not trivially constructible, or if more than 0 args are passed in.

◆ ConstructUnique()

template<typename T , typename... Args>
UniquePtr< T > Foundation::Core::ConstructUnique ( Allocator resource,
Args &&...  args 
)

Convenience wrapper for calling ConstructUniqueBase when Base and Derived are the same type.

Template Parameters
Tis the class type to be templated on.

◆ ConstructUniqueBase()

template<typename Base , typename Derived , typename... Args>
UniquePtr< Base > Foundation::Core::ConstructUniqueBase ( Allocator resource,
Args &&...  args 
)

Helper function for constructing a pinned resource with a Foundation::Core::Allocator.

Template Parameters
Baseis the base class type be templated on.
Derivedcan be a subclass of Base, with destruction handled correctly.

◆ Destruct()

template<typename T >
void Foundation::Core::Destruct ( Allocator resource,
T *  obj 
)

Convenience destructor for objects allocated with Construct or ConstructBase.

◆ DestructSpan()

template<typename T >
void Foundation::Core::DestructSpan ( Allocator resource,
Span< T >  span 
)

Convenience function for destructing a Span allocated with ConstructSpan. Calls destructors in-place if the type is not trivially destructible (e.g. non-PODs)

◆ FNV1a64() [1/3]

template<typename T >
constexpr uint64_t Foundation::Core::FNV1a64 ( Span< const T >  span)
constexprnoexcept

@breif Hash helpers

◆ FNV1a64() [2/3]

template<typename T >
constexpr uint64_t Foundation::Core::FNV1a64 ( T *  data,
size_t  size 
)
constexprnoexcept

◆ FNV1a64() [3/3]

template<typename... T>
constexpr uint64_t Foundation::Core::FNV1a64 ( T...  values)
constexprnoexcept

◆ FNV1a64Combine() [1/4]

constexpr uint64_t Foundation::Core::FNV1a64Combine ( uint64_t  hash,
double  value 
)
constexprnoexcept

◆ FNV1a64Combine() [2/4]

constexpr uint64_t Foundation::Core::FNV1a64Combine ( uint64_t  hash,
float  value 
)
constexprnoexcept

◆ FNV1a64Combine() [3/4]

template<std::integral T>
constexpr uint64_t Foundation::Core::FNV1a64Combine ( uint64_t  hash,
value 
)
constexprnoexcept

◆ FNV1a64Combine() [4/4]

template<typename T >
requires std::is_enum_v<T>
constexpr uint64_t Foundation::Core::FNV1a64Combine ( uint64_t  hash,
value 
)
constexprnoexcept

◆ FNV1a64CombineByte()

constexpr uint64_t Foundation::Core::FNV1a64CombineByte ( uint64_t  hash,
uint8_t  value 
)
constexprnoexcept

◆ FNV1a64CombineBytes()

uint64_t Foundation::Core::FNV1a64CombineBytes ( uint64_t  hash,
void const *  data,
size_t  size 
)
inlinenoexcept

◆ Format()

template<typename... Args>
constexpr String Foundation::Core::Format ( fmt::format_string< Args... >  format,
Args &&...  args 
)
constexpr

String wrapper for Format().

Note
Use this, over fmt::format at all times to avoid throwing std::string constructor.

◆ GetGlobalAllocator()

Allocator * Foundation::Core::GetGlobalAllocator ( )
extern

Implemented by AllocatorHeap

◆ InterlockedMax()

template<typename T >
T Foundation::Core::InterlockedMax ( Atomic< T > &  atomic,
value,
std::memory_order  order = std::memory_order_seq_cst 
)

◆ InterlockedMin()

template<typename T >
T Foundation::Core::InterlockedMin ( Atomic< T > &  atomic,
value,
std::memory_order  order = std::memory_order_seq_cst 
)

◆ Print()

template<typename... Args>
void Foundation::Core::Print ( fmt::format_string< Args... >  format,
Args &&...  args 
)

◆ Println()

template<typename... Args>
void Foundation::Core::Println ( fmt::format_string< Args... >  format,
Args &&...  args 
)

◆ SplitMix64()

uint64_t Foundation::Core::SplitMix64 ( uint64_t  state)
noexcept

◆ UUIDv4()

FUUID Foundation::Core::UUIDv4 ( FUUID  id,
uint64_t  version 
)
noexcept

Variable Documentation

◆ kDefaultStackArenaSize

constexpr size_t Foundation::Core::kDefaultStackArenaSize = 12 * 1024
constexpr

◆ kFNV1a64OffsetBasis

constexpr uint64_t Foundation::Core::kFNV1a64OffsetBasis = 14695981039346656037ull
inlineconstexpr

◆ kFNV1a64Prime

constexpr uint64_t Foundation::Core::kFNV1a64Prime = 1099511628211ull
inlineconstexpr

◆ kJobPriorityCount

constexpr size_t Foundation::Core::kJobPriorityCount = static_cast<size_t>(JobPriority::High) + 1
inlineconstexpr

◆ kNilUUID

constexpr FUUID Foundation::Core::kNilUUID {}
staticconstexpr