GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::execution Namespace Reference

Classes

class  Chunk
 Subrange of a resource, corresponding to one of a fixed number of chunks that the resource has been divded into. More...
struct  Exclude
 Component exclusion tag type, for excluding entities from an entity range if they have a specific component. More...
class  EntityRegistry
 Dynamic container of entities with stable EntityID handles and associated component instances, available to tasks defined through a Scheduler. More...
class  Entities
 View of entities in an EntityRegistry that have all of the required components and none of the excluded components specified in a list of types. More...
class  ComponentPool
 Reference to an EntityRegistry's pool of instances of a specific component type. More...
class  EntityID
 Handle to a specific entity in a registry. More...
class  Entities< ComponentsAndExclusions... >
 Specialization of Entities for a single required component with no exclusions. More...
class  EntityBuilder
 Temporary reference to an incomplete entity that is currently being built inside of an EntityRegistry and will be automatically destroyed and cleaned up if EntityBuilder::build() is not successfully called by the end of the scope. More...
class  EntityTable
class  Columns
 View of the rows in a specific set of columns in an EntityTable. More...
class  EntityTable< Tuple< Components... >, Allocator >
 Column-major Structure-of-Arrays-style table container of rows of a specific tuple of component types, available to tasks defined through a Scheduler. More...
struct  Error
 Exception type for domain-specific errors originating from the grem::execution module. More...
class  Executor
 Interface to a pool of execution resources (e.g. threads) for executing ad-hoc parallel tasks and pre-built task graphs defined through a Scheduler. More...
class  SequentialExecutor
 Basic Executor implementation that runs all tasks sequentially, directly on the caller's thread. More...
struct  DynamicExecutorOptions
 Configuration options for a DynamicExecutor. More...
class  DynamicExecutor
 Dynamic Executor whose implementation is chosen at runtime, defaulting to a parallel thread pool on supported platforms. More...
class  ResourceRegistry
 Dynamic container of singleton resource instances, available to tasks defined through a Scheduler. More...
class  ResourceTable
 Container of a specific tuple of singleton resource types, available to tasks defined through a Scheduler. More...
class  Schedule
 Statically scheduled task graph built by a Scheduler. More...
class  Scheduler
 Statically scheduled task graph builder. More...
struct  Statistics
 Performance statistics produced by an Executor invocation. More...
class  Task
 Statically scheduled unit of work to be executed by an Executor as part of a task graph. More...
class  ParallelTask
 Chunkable task whose chunks can be run in parallel. More...

Concepts

concept  component
 Concept that checks if a given type is a valid component type that can be stored and associated with an entity in e.g. an EntityRegistry or EntityTable.
concept  resource
 Concept that checks if a given type is a valid resource type that can be stored/referenced in e.g. a ResourceRegistry or ResourceTable.

Typedefs

template<typename T>
using remove_exclude_t = typename remove_exclude<T>::type
 The excluded component type of a component exclusion type.
template<typename EntityRange>
using entity_range_components_and_exclusions_t = typename entity_range_components_and_exclusions<EntityRange>::type
 Component and component exclusion types of an entity range type, provided as a meta::TypeList.

Functions

template<typename Registry>
 EntityBuilder (Registry &, EntityID) -> EntityBuilder< Registry >
template<std::size_t Index, typename Row, typename Allocator>
constexpr decltype(auto) get (EntityTable< Row, Allocator > &t, std::size_t rowIndex)
template<std::size_t Index, typename Row, typename Allocator>
constexpr decltype(auto) get (const EntityTable< Row, Allocator > &t, std::size_t rowIndex)
template<typename T, typename Row, typename Allocator>
constexpr T & get (EntityTable< Row, Allocator > &t, std::size_t rowIndex)
template<typename T, typename Row, typename Allocator>
constexpr const T & get (const EntityTable< Row, Allocator > &t, std::size_t rowIndex)
template<typename T, typename Row, typename Allocator>
constexpr Span< T > column (EntityTable< Row, Allocator > &t)
template<typename T, typename Row, typename Allocator>
constexpr Span< const T > column (const EntityTable< Row, Allocator > &t)
template<std::size_t ColumnIndex, typename Row, typename Allocator>
constexpr auto column (EntityTable< Row, Allocator > &t)
template<std::size_t ColumnIndex, typename Row, typename Allocator>
constexpr auto column (const EntityTable< Row, Allocator > &t)

Variables

template<typename T>
constexpr bool is_chunk_v = is_chunk<T>::value
 Boolean that evaluates to true if the given type is a specialization of Chunk.
template<typename T>
constexpr bool is_component_pool_v = is_component_pool<T>::value
 Boolean that evaluates to true if the given type is considered a component pool reference type.
template<typename T>
constexpr bool is_exclude_v = is_exclude<T>::value
 Boolean that evaluates to true if the given type is a specialization of Exclude.
template<typename T>
constexpr bool is_entity_range_v = is_entity_range<T>::value
 Boolean that evaluates to true if the given type is considered an entity range type.

Typedef Documentation

◆ remove_exclude_t

template<typename T>
using grem::execution::remove_exclude_t = typename remove_exclude<T>::type

The excluded component type of a component exclusion type.

If the given type is not a specialization of Exclude, the resulting type is the given type itself, unmodified.

Template Parameters
Ttype to get the excluded component type of.

◆ entity_range_components_and_exclusions_t

template<typename EntityRange>
using grem::execution::entity_range_components_and_exclusions_t = typename entity_range_components_and_exclusions<EntityRange>::type

Component and component exclusion types of an entity range type, provided as a meta::TypeList.

Template Parameters
EntityRangeentity range type to get the component and component exclusion types of. Must be a valid entity range type.
Note
To define a custom type T as an entity range type, specialize template <> struct grem::execution::is_entity_range<T> as a struct derived from std::true_type, and template <> struct grem::execution::entity_range_components_and_exclusions<T> as a struct with a nested type type that is a meta::TypeList of all the component and component exclusion types of the entity range.

Function Documentation

◆ EntityBuilder()

template<typename Registry>
grem::execution::EntityBuilder ( Registry & ,
EntityID  )->EntityBuilder< Registry >

◆ get() [1/4]

template<std::size_t Index, typename Row, typename Allocator>
decltype(auto) grem::execution::get ( EntityTable< Row, Allocator > & t,
std::size_t rowIndex )
nodiscardconstexpr

◆ get() [2/4]

template<std::size_t Index, typename Row, typename Allocator>
decltype(auto) grem::execution::get ( const EntityTable< Row, Allocator > & t,
std::size_t rowIndex )
nodiscardconstexpr

◆ get() [3/4]

template<typename T, typename Row, typename Allocator>
T & grem::execution::get ( EntityTable< Row, Allocator > & t,
std::size_t rowIndex )
nodiscardconstexpr

◆ get() [4/4]

template<typename T, typename Row, typename Allocator>
const T & grem::execution::get ( const EntityTable< Row, Allocator > & t,
std::size_t rowIndex )
nodiscardconstexpr

◆ column() [1/4]

template<typename T, typename Row, typename Allocator>
Span< T > grem::execution::column ( EntityTable< Row, Allocator > & t)
nodiscardconstexpr

◆ column() [2/4]

template<typename T, typename Row, typename Allocator>
Span< const T > grem::execution::column ( const EntityTable< Row, Allocator > & t)
nodiscardconstexpr

◆ column() [3/4]

template<std::size_t ColumnIndex, typename Row, typename Allocator>
auto grem::execution::column ( EntityTable< Row, Allocator > & t)
nodiscardconstexpr

◆ column() [4/4]

template<std::size_t ColumnIndex, typename Row, typename Allocator>
auto grem::execution::column ( const EntityTable< Row, Allocator > & t)
nodiscardconstexpr

Variable Documentation

◆ is_chunk_v

template<typename T>
bool grem::execution::is_chunk_v = is_chunk<T>::value
inlineconstexpr

Boolean that evaluates to true if the given type is a specialization of Chunk.

Template Parameters
Ttype to check.

◆ is_component_pool_v

template<typename T>
bool grem::execution::is_component_pool_v = is_component_pool<T>::value
inlineconstexpr

Boolean that evaluates to true if the given type is considered a component pool reference type.

Template Parameters
Ttype to check.
Note
To define a custom type T as a component pool reference type, specialize template <> struct grem::execution::is_component_pool<T> as a struct derived from std::true_type. The component pool type T must have a nested type component_type that is the potentially const-qualified component type being stored.

◆ is_exclude_v

template<typename T>
bool grem::execution::is_exclude_v = is_exclude<T>::value
inlineconstexpr

Boolean that evaluates to true if the given type is a specialization of Exclude.

Template Parameters
Ttype to check.

◆ is_entity_range_v

template<typename T>
bool grem::execution::is_entity_range_v = is_entity_range<T>::value
inlineconstexpr

Boolean that evaluates to true if the given type is considered an entity range type.

Template Parameters
Ttype to check.
Note
To define a custom type T as an entity range type, specialize template <> struct grem::execution::is_entity_range<T> as a struct derived from std::true_type, and template <> struct grem::execution::entity_range_components_and_exclusions<T> as a struct with a nested type type that is a meta::TypeList of all the component and component exclusion types of the entity range.