MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::internal Namespace Reference

Classes

struct  LiveArenaEntry
 Single directory entry mapping a string key to a location within the arena. More...
 
struct  LiveArenaHeader
 POD header block placed at the start of the arena storage. More...
 

Functions

uint32_t align_up (uint32_t value, uint32_t align) noexcept
 Aligns value up to the next multiple of align.
 
std::shared_ptr< Buffers::BufferProcessorattach_quick_process_audio (Buffers::AudioProcessingFunction processor, const std::shared_ptr< Buffers::AudioBuffer > &buffer)
 
std::shared_ptr< Buffers::BufferProcessorattach_quick_process_graphics (Buffers::GraphicsProcessingFunction processor, const std::shared_ptr< Buffers::VKBuffer > &buffer)
 
void cleanup_engine ()
 
void cleanup_persistent_store ()
 
Core::Engineget_or_create_engine ()
 
void * live_arena_alloc (const char *key, uint32_t size, uint32_t alignment) noexcept
 Allocates size bytes from the arena with alignment.
 
bool live_arena_expose (const char *key, std::shared_ptr< void > shared) noexcept
 Registers an externally owned shared_ptr under key.
 
LiveArenaEntrylive_arena_find (const char *key) noexcept
 Locates an existing directory entry by key.
 
LiveArenaHeaderlive_arena_header () noexcept
 Returns a pointer to the header block at the start of arena storage.
 
unsigned char * live_arena_object_region () noexcept
 Returns a pointer to the object region (immediately after the header).
 
void live_format_key (char *buf, std::string_view name, uint32_t count) noexcept
 Formats a live arena key as "TypeName_N" into buf.
 
template<typename T >
constexpr std::string_view live_type_name () noexcept
 Extracts the unqualified type name from a compiler-generated function signature.
 
std::vector< std::shared_ptr< void > > & persistent_store ()
 

Variables

std::recursive_mutex engine_mutex
 
std::unique_ptr< Core::Engineengine_ref
 
uint32_t g_live_arena_bump {}
 Byte offset of the bump pointer from the start of the object region.
 
std::shared_ptr< void > g_live_arena_shared_ptrs [LIVE_ARENA_MAX_ENTRIES] {}
 Shared ownership table for objects registered via expose_live.
 
unsigned char g_live_arena_storage [LIVE_ARENA_CAPACITY] {}
 Raw backing storage for the live arena with external linkage.
 
bool initialized = false
 
constexpr std::size_t LIVE_ARENA_CAPACITY = static_cast<const std::size_t>(16 * 1024 * 1024)
 Default capacity of the live arena in bytes.
 
constexpr std::size_t LIVE_ARENA_KEY_MAX = 64
 Maximum length of a live arena key, including null terminator.
 
constexpr std::size_t LIVE_ARENA_MAX_ENTRIES = 256
 Maximum number of objects that can be registered in the live arena.
 
bool terminating = false