Empirical
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
emp::EventDrivenGP_AW< AFFINITY_WIDTH > Class Template Reference

A linear GP (inspired by AvidaGP) virtual hardware CPU that supports an event-driven programming paradigm. More...

#include <EventDrivenGP.h>

Classes

struct  Block
 
struct  Event
 
struct  Function
 
struct  Instruction
 
struct  Program
 
struct  State
 

Public Types

enum  BlockType { BlockType::NONE =0, BlockType::BASIC, BlockType::LOOP }
 
using EventDrivenGP_t = EventDrivenGP_AW< AFFINITY_WIDTH >
 
using mem_key_t = int
 
using mem_val_t = double
 
using memory_t = std::unordered_map< mem_key_t, mem_val_t >
 
using arg_t = int
 
using arg_set_t = emp::array< arg_t, MAX_INST_ARGS >
 
using affinity_t = BitSet< AFFINITY_WIDTH >
 
using properties_t = std::unordered_set< std::string >
 
using inst_t = Instruction
 
using inst_seq_t = emp::vector< inst_t >
 
using event_t = Event
 
using inst_lib_t = InstLib< EventDrivenGP_t >
 
using event_lib_t = EventLib< EventDrivenGP_t >
 
using program_t = Program
 
using exec_stk_t = emp::vector< State >
 
using fun_event_handler_t = std::function< void(EventDrivenGP_t &, const event_t &)>
 Event handler function type alias. More...
 

Public Member Functions

 EventDrivenGP_AW (Ptr< const inst_lib_t > _ilib, Ptr< const event_lib_t > _elib, Ptr< Random > rnd=nullptr)
 
 EventDrivenGP_AW (inst_lib_t &_ilib, event_lib_t &_elib, Ptr< Random > rnd=nullptr)
 
 EventDrivenGP_AW (Ptr< const event_lib_t > _elib, Ptr< Random > rnd=nullptr)
 
 EventDrivenGP_AW (Ptr< Random > rnd=nullptr)
 
 EventDrivenGP_AW (EventDrivenGP_t &&in)
 
 EventDrivenGP_AW (const EventDrivenGP_t &in)
 
 ~EventDrivenGP_AW ()
 
void Reset ()
 
void ResetHardware ()
 
void SpawnCore (const affinity_t &affinity, double threshold, const memory_t &input_mem=memory_t(), bool is_main=false)
 
void SpawnCore (size_t fID, const memory_t &input_mem=memory_t(), bool is_main=false)
 
Ptr< const inst_lib_tGetInstLib () const
 Get instruction library associated with hardware's program. More...
 
Ptr< const event_lib_tGetEventLib () const
 Get event library associated with hardware. More...
 
RandomGetRandom ()
 Get reference to random number generator used by this hardware. More...
 
Ptr< RandomGetRandomPtr ()
 Get pointer to random number generator used by this hardware. More...
 
const program_tGetConstProgram () const
 Get program loaded on this hardware. More...
 
program_tGetProgram ()
 
const FunctionGetFunction (size_t fID) const
 Get reference to a particular function in hardware's program. More...
 
const inst_tGetInst (size_t fID, size_t pos) const
 Get reference to particular instruction in hardware's program given function ID and instruction position. More...
 
double GetTrait (size_t id) const
 Get a particular trait given its ID. More...
 
size_t GetNumErrors () const
 Get current number of errors committed by this hardware. More...
 
double GetMinBindThresh () const
 
size_t GetMaxCores () const
 Get the maximum number of cores allowed to run simultaneously on this hardware object. More...
 
size_t GetMaxCallDepth () const
 Get the maximum call depth allowed on this hardware object (max call states allowed on a single core's call stack at a time). More...
 
mem_val_t GetDefaultMemValue () const
 Get the default memory value for local/shared/input/output memory maps. More...
 
bool IsStochasticFunCall () const
 
emp::vector< exec_stk_t > & GetCores ()
 
size_t GetCurCoreID ()
 
exec_stk_tGetCurCore ()
 Get a reference to the current core/execution stack. More...
 
StateGetCurState ()
 Get a reference to the current local call state. More...
 
memory_tGetSharedMem ()
 Get a reference to hardware's shared memory map. More...
 
mem_val_t GetShared (mem_key_t key) const
 
mem_val_tAccessShared (mem_key_t key)
 
void SetMinBindThresh (double val)
 
void SetMaxCores (size_t val)
 
void SetMaxCallDepth (size_t val)
 
void SetDefaultMemValue (mem_val_t val)
 Configure the default memory value. More...
 
void SetStochasticFunCall (bool val)
 
void SetTrait (size_t id, double val)
 
void IncTrait (size_t id, double inc=1.0)
 
void DecTrait (size_t id, double dec=1.0)
 
void PushTrait (double val)
 Push a trait onto end of traits vector. More...
 
void SetInst (size_t fID, size_t pos, const inst_t &inst)
 Shortcut to this hardware object's program's SetInst function of the same signature. More...
 
void SetInst (size_t fID, size_t pos, size_t id, arg_t a0=0, arg_t a1=0, arg_t a2=0, const affinity_t &aff=affinity_t())
 Shortcut to this hardware object's program's SetInst function of the same signature. More...
 
void SetProgram (const program_t &_program)
 Set program for this hardware object. More...
 
void PushFunction (const Function &_function)
 Shortcut to this hardware object's program's PushFunction operation of the same signature. More...
 
void PushFunction (const affinity_t &_aff=affinity_t(), const inst_seq_t &_seq=inst_seq_t())
 Shortcut to this hardware object's program's PushFunction operation of the same signature. More...
 
void PushInst (size_t id, arg_t a0=0, arg_t a1=0, arg_t a2=0, const affinity_t &aff=affinity_t(), int fID=-1)
 
void PushInst (const std::string &name, arg_t a0=0, arg_t a1=0, arg_t a2=0, const affinity_t &aff=affinity_t(), int fID=-1)
 
void PushInst (const inst_t &inst, int fID=-1)
 
void Load (std::istream &input)
 
void NewRandom (int seed=-1)
 Generate new random number generator for this hardware object with the given seed value. More...
 
bool ValidPosition (size_t fID, size_t pos) const
 
bool ValidFunction (size_t fID) const
 Is the function given by function ID (fID) a valid function in this hardware object's program? More...
 
void SetShared (mem_key_t key, mem_val_t value)
 Set given shared memory map location (key) to given value. More...
 
size_t FindEndOfBlock (size_t fp, size_t ip)
 
void CloseBlock ()
 
void OpenBlock (size_t begin, size_t end, BlockType type)
 Open a block in the current local program state as specified by begin, end, and type. More...
 
void BreakBlock ()
 
emp::vector< size_t > FindBestFuncMatch (const affinity_t &affinity, double threshold)
 Find best matching functions (by ID) given affinity. More...
 
void CallFunction (const affinity_t &affinity, double threshold)
 
void CallFunction (size_t fID)
 
void ReturnFunction ()
 
void ProcessInst (const inst_t &inst)
 Process a single instruction, provided by the caller. More...
 
void HandleEvent (const event_t &event)
 Handle an event (on this hardware). More...
 
void TriggerEvent (const event_t &event)
 Trigger an event (from this hardware). More...
 
void TriggerEvent (const std::string &name, const affinity_t &affinity=affinity_t(), const memory_t &msg=memory_t(), const properties_t &properties=properties_t())
 Trigger an event (from this hardware). More...
 
void TriggerEvent (size_t id, const affinity_t &affinity=affinity_t(), const memory_t &msg=memory_t(), const properties_t &properties=properties_t())
 Trigger an event (from this hardware). More...
 
void QueueEvent (const event_t &event)
 Queue an event (to be handled by this hardware). More...
 
void QueueEvent (const std::string &name, const affinity_t &affinity=affinity_t(), const memory_t &msg=memory_t(), const properties_t &properties=properties_t())
 Queue event by name. More...
 
void QueueEvent (size_t id, const affinity_t &affinity=affinity_t(), const memory_t &msg=memory_t(), const properties_t &properties=properties_t())
 Queue event by id. More...
 
void SingleProcess ()
 Advance hardware by single instruction. More...
 
void Process (size_t num_inst)
 Advance hardware by some arbitrary number instructions. More...
 
void PrintEvent (const event_t &event, std::ostream &os=std::cout)
 Print given event using given output stream (default = std::cout). More...
 
void PrintInst (const inst_t &inst, std::ostream &os=std::cout)
 Print given instruction using given output stream (default = std::cout). More...
 
void PrintTraits (std::ostream &os=std::cout)
 Print hardware traits using given output stream (default = std::cout). More...
 
void PrintProgram (std::ostream &os=std::cout)
 Print out entire program using given output stream (default = std::cout). More...
 
void PrintProgramFull (std::ostream &os=std::cout)
 Print out entire program using given output stream (default = std::cout). More...
 
void PrintState (std::ostream &os=std::cout)
 Print out current state (full) of virtual hardware using given output stream (default = std::cout). More...
 

Static Public Member Functions

static void Inst_Inc (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Dec (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Not (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Add (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Sub (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Mult (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Div (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Mod (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_TestEqu (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_TestNEqu (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_TestLess (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_If (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_While (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Countdown (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Break (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Close (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Call (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Return (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_SetMem (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_CopyMem (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_SwapMem (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Input (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Output (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Commit (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Pull (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_Nop (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_BroadcastMsg (EventDrivenGP_t &hw, const inst_t &inst)
 
static void Inst_SendMsg (EventDrivenGP_t &hw, const inst_t &inst)
 
static Ptr< const InstLib< EventDrivenGP_t > > DefaultInstLib ()
 Get a pointer to const default instruction library. Will only construct the default instruction library once. More...
 
static void HandleEvent_Message (EventDrivenGP_t &hw, const event_t &event)
 
static Ptr< const EventLib< EventDrivenGP_t > > DefaultEventLib ()
 

Static Public Attributes

static constexpr size_t MAX_INST_ARGS = 3
 Maximum number of instruction arguments. Currently hardcoded. At some point, will make flexible. More...
 
static constexpr size_t DEFAULT_MAX_CORES = 8
 
static constexpr size_t DEFAULT_MAX_CALL_DEPTH = 128
 
static constexpr mem_val_t DEFAULT_MEM_VALUE = 0.0
 
static constexpr double DEFAULT_MIN_BIND_THRESH = 0.5
 

Protected Attributes

Ptr< const event_lib_tevent_lib
 
Ptr< Randomrandom_ptr
 
bool random_owner
 
program_t program
 
memory_t shared_mem
 
std::deque< event_tevent_queue
 
emp::vector< double > traits
 
size_t errors
 
size_t max_cores
 
size_t max_call_depth
 
double default_mem_value
 
double min_bind_thresh
 
bool stochastic_fun_call
 
emp::vector< exec_stk_tcores
 
emp::vector< size_t > active_cores
 
emp::vector< size_t > inactive_cores
 
std::deque< size_t > pending_cores
 
size_t exec_core_id
 
bool is_executing
 

Detailed Description

template<size_t AFFINITY_WIDTH>
class emp::EventDrivenGP_AW< AFFINITY_WIDTH >

A linear GP (inspired by AvidaGP) virtual hardware CPU that supports an event-driven programming paradigm.

The EventDrivenGP virtual hardware runs programs where each program is a set of named functions. Function names are mutable bit strings, or affinities, and each function consists of a sequence of instructions. Functions are called by name, and can be called from within the hardware (via Call instructions) or from outside the hardware (via Events).

The EventDrivenGP virtual hardware CPU is capable of multi-core/parallel processing. This hardware maintains a (bounded) set of cores. Each core maintains its own program call stack that stores information about the active functions on that core. Cores execute in simulated parallel. For every single CPU cycle (see SingleProcess function) given to the virtual hardware, each core is given the opportunity to advance by a single cycle.

When functions are called from within the hardware (via Call instructions), a new call state is pushed onto the program call stack on the core from which the function was called. No new core is spawned (unless using a non-standard Call instruction). When functions are called from outside the hardware (via Events), if there is an available inactive core, an inactive core will be made active with the called function.

Affinity matching/binding is used to determine which functions should be called by events or by Call instructions. The hardware looks at the event/instruction's associated affinity and finds the best match (using a simple matching coefficient) among function affinities in the hardware's program. The best match must be better than a given minimum threshold (min_bind_thresh) for that function to be called. If there are not functions that meet the minimum threshold, no function is called. If two or more functions are tied for best match and are above the minimum threshold, one is selected randomly to be called; otherwise, if there is no tie, the best matching function is called.

Terminology:

Member Typedef Documentation

template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::affinity_t = BitSet<AFFINITY_WIDTH>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::arg_set_t = emp::array<arg_t, MAX_INST_ARGS>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::arg_t = int
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::event_lib_t = EventLib<EventDrivenGP_t>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::event_t = Event
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_t = EventDrivenGP_AW<AFFINITY_WIDTH>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::exec_stk_t = emp::vector<State>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::fun_event_handler_t = std::function<void(EventDrivenGP_t &, const event_t &)>

Event handler function type alias.

template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::inst_lib_t = InstLib<EventDrivenGP_t>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::inst_seq_t = emp::vector<inst_t>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::inst_t = Instruction
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::mem_key_t = int
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::mem_val_t = double
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::memory_t = std::unordered_map<mem_key_t, mem_val_t>
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::program_t = Program
template<size_t AFFINITY_WIDTH>
using emp::EventDrivenGP_AW< AFFINITY_WIDTH >::properties_t = std::unordered_set<std::string>

Member Enumeration Documentation

template<size_t AFFINITY_WIDTH>
enum emp::EventDrivenGP_AW::BlockType
strong

Currently only 3 Block types:

  • NONE: Not a block.
  • BASIC: Anything that's not a loop. Once closed/ of block, execution can just continue.
  • LOOP: Once closed/ of block, execution needs to jump back to beginning of block.
Enumerator
NONE 
BASIC 
LOOP 

Constructor & Destructor Documentation

template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_AW ( Ptr< const inst_lib_t _ilib,
Ptr< const event_lib_t _elib,
Ptr< Random rnd = nullptr 
)
inline

EventDrivenGP constructor. Give instance variables reasonable defaults. Allow for configuration post-construction.

template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_AW ( inst_lib_t _ilib,
event_lib_t _elib,
Ptr< Random rnd = nullptr 
)
inline
template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_AW ( Ptr< const event_lib_t _elib,
Ptr< Random rnd = nullptr 
)
inline
template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_AW ( Ptr< Random rnd = nullptr)
inline
template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_AW ( EventDrivenGP_t &&  in)
inline
template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::EventDrivenGP_AW ( const EventDrivenGP_t in)
inline
template<size_t AFFINITY_WIDTH>
emp::EventDrivenGP_AW< AFFINITY_WIDTH >::~EventDrivenGP_AW ( )
inline

Member Function Documentation

template<size_t AFFINITY_WIDTH>
mem_val_t& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::AccessShared ( mem_key_t  key)
inline

Get a reference to a location in the shared memory map as indicated by key. If key cannot be found, add key:default_mem_value to map and return newly added location.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::BreakBlock ( )
inline

If there's a block to break out of in current local program state, break out (to eob). Otherwise, do nothing.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::CallFunction ( const affinity_t affinity,
double  threshold 
)
inline

Call function with best affinity match above threshold. If not candidate functions found, do nothing.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::CallFunction ( size_t  fID)
inline

Call function specified by fID. REQ: core must be active (must have a local state on execution stack).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::CloseBlock ( )
inline

Close current block in the current local program state if there is one to close. If not, do nothing. Handles closure of known, special block types appropriately:

  • LOOPS - set cur_state's IP to beginning of block.
template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DecTrait ( size_t  id,
double  dec = 1.0 
)
inline

Utility function to decrement trait id by value given by dec. Will resize traits vector if given id is greater than current traits vector size.

template<size_t AFFINITY_WIDTH>
static Ptr<const EventLib<EventDrivenGP_t> > emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DefaultEventLib ( )
inlinestatic

Get a pointer to const default event library. Will only construct the default event library once. Note: the default event library does not construct any default dispatch functions. This is the responsibility of whatever is using the EventDrivenGP hardware.

template<size_t AFFINITY_WIDTH>
static Ptr<const InstLib<EventDrivenGP_t> > emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DefaultInstLib ( )
inlinestatic

Get a pointer to const default instruction library. Will only construct the default instruction library once.

template<size_t AFFINITY_WIDTH>
emp::vector<size_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::FindBestFuncMatch ( const affinity_t affinity,
double  threshold 
)
inline

Find best matching functions (by ID) given affinity.

template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::FindEndOfBlock ( size_t  fp,
size_t  ip 
)
inline

Given valid function pointer and instruction pointer, find next end of block (at current block level). This is not guaranteed to return a valid IP. At worst, it'll return an IP == function.inst_seq.size().

template<size_t AFFINITY_WIDTH>
const program_t& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetConstProgram ( ) const
inline

Get program loaded on this hardware.

template<size_t AFFINITY_WIDTH>
emp::vector<exec_stk_t>& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetCores ( )
inline

Get all hardware cores. NOTE: use responsibly!

template<size_t AFFINITY_WIDTH>
exec_stk_t& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetCurCore ( )
inline

Get a reference to the current core/execution stack.

template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetCurCoreID ( )
inline

Get the currently executing core ID. If hardware is not in the middle of an execution cycle (the SingleProcess function), this will return the first core ID in active_cores, which will typically be the core on which main is running.

template<size_t AFFINITY_WIDTH>
State& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetCurState ( )
inline

Get a reference to the current local call state.

template<size_t AFFINITY_WIDTH>
mem_val_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetDefaultMemValue ( ) const
inline

Get the default memory value for local/shared/input/output memory maps.

template<size_t AFFINITY_WIDTH>
Ptr<const event_lib_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetEventLib ( ) const
inline

Get event library associated with hardware.

template<size_t AFFINITY_WIDTH>
const Function& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetFunction ( size_t  fID) const
inline

Get reference to a particular function in hardware's program.

template<size_t AFFINITY_WIDTH>
const inst_t& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetInst ( size_t  fID,
size_t  pos 
) const
inline

Get reference to particular instruction in hardware's program given function ID and instruction position.

template<size_t AFFINITY_WIDTH>
Ptr<const inst_lib_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetInstLib ( ) const
inline

Get instruction library associated with hardware's program.

template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetMaxCallDepth ( ) const
inline

Get the maximum call depth allowed on this hardware object (max call states allowed on a single core's call stack at a time).

template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetMaxCores ( ) const
inline

Get the maximum number of cores allowed to run simultaneously on this hardware object.

template<size_t AFFINITY_WIDTH>
double emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetMinBindThresh ( ) const
inline

Get hardware's minimum binding threshold (threshold used to determine if two affinities are close enough to bind).

template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetNumErrors ( ) const
inline

Get current number of errors committed by this hardware.

template<size_t AFFINITY_WIDTH>
program_t& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetProgram ( )
inline
template<size_t AFFINITY_WIDTH>
Random& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetRandom ( )
inline

Get reference to random number generator used by this hardware.

template<size_t AFFINITY_WIDTH>
Ptr<Random> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetRandomPtr ( )
inline

Get pointer to random number generator used by this hardware.

template<size_t AFFINITY_WIDTH>
mem_val_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetShared ( mem_key_t  key) const
inline

Get a particular value in shared memory map stored @ location indicated by key. If key cannot be found, return the default memory value.

template<size_t AFFINITY_WIDTH>
memory_t& emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetSharedMem ( )
inline

Get a reference to hardware's shared memory map.

template<size_t AFFINITY_WIDTH>
double emp::EventDrivenGP_AW< AFFINITY_WIDTH >::GetTrait ( size_t  id) const
inline

Get a particular trait given its ID.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::HandleEvent ( const event_t event)
inline

Handle an event (on this hardware).

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::HandleEvent_Message ( EventDrivenGP_t hw,
const event_t event 
)
inlinestatic

Default event handler: Message Description: Handle a message by spawning a new core (if we're not already maxed out) with the function that best matches the messages affinity. Set the function's input buffer to be equal to the contents of the message event's message contents.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::IncTrait ( size_t  id,
double  inc = 1.0 
)
inline

Utility function to increment trait id by value given by inc. Will resize traits vector if given id is greater than current traits vector size.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Add ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Add Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] + Local[Arg2]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Break ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Break Number of arguments: 0 Description: Break out of current block if there's a block to close.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_BroadcastMsg ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: BroadcastMsg Number of arguments: 0 Description: Trigger a Message event where the event's affinity is equal to this instructions affinity and the event's message payload is equal to the current local program state output buffer. Event properties will indicate that this is a broadcast.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Call ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Call Number of arguments: 0 Description: Call function with the strongest affinity match to call affinity.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Close ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Close Number of arguments: 0 Description: Marks the end of a block.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Commit ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Commit Number of arguments: 2 Description: Shared[Arg2] = Local[Arg1]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_CopyMem ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: CopyMem Number of arguments: 2 Description: Local[Arg2] = Local[Arg1]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Countdown ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Countdown Number of arguments: 1 Description: While (Local[Arg1] != 0) { Local[Arg1]– then execute block }

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Dec ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Dec Number of arguments: 1 Description: Decrement value in local memory[Arg1].

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Div ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Div Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] / Local[Arg2] If Local[Arg2] == 0, division fails and increment hardware errors.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_If ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: If Number of arguments: 1 Description: If (Local[Arg1] != 0) { execute block } else { skip block }

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Inc ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Inc Number arguments: 1 Description: Increment value in local memory[Arg1].

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Input ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Input Number of arguments: 2 Description: Local[Arg2] = Input[Arg1]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Mod ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Mod Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] % Local[Arg2] If Local[Arg2] == 0, modulus fails and increment hardware errors.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Mult ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Mult Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] * Local[Arg2]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Nop ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Nop Number of arguments: 0 Description: No operation.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Not ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Not Number of arguments: 1 Description: Logically toggle value in Local[Arg1].

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Output ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Output Number of arguments: 2 Description: Output[Arg2] = Local[Arg1]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Pull ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Pull Number of arguments: 2 Description: Local[Arg2] = Shared[Arg1]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Return ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Return Number of arguments: 0 Description: Return from current function call unless in main function call.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_SendMsg ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: SendMsg Number of arguments: 0 Description: Trigger a Message event where the event's affinity is equal to this instructions affinity and the event's message payload is equal to the current local program state output buffer. Event properties will indicate that this is a send.

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_SetMem ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: SetMem Number of arguments: 2 Description: Local[Arg1] = ValueOf(Arg2)

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_Sub ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: Sub Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] - Local[Arg2]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_SwapMem ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: SwapMem Number of arguments: 2 Description: Swap(Local[Arg1], Local[Arg2])

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_TestEqu ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: TestEqu Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] == Local[Arg2]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_TestLess ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: TestLess Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] < Local[Arg2]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_TestNEqu ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: TestNEqu Number of arguments: 3 Description: Local[Arg3] = Local[Arg1] != Local[Arg2]

template<size_t AFFINITY_WIDTH>
static void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Inst_While ( EventDrivenGP_t hw,
const inst_t inst 
)
inlinestatic

Default instruction: While Number of arguments: 1 Description: While (Local[Arg1] != 0) { execute block }

template<size_t AFFINITY_WIDTH>
bool emp::EventDrivenGP_AW< AFFINITY_WIDTH >::IsStochasticFunCall ( ) const
inline

Is this hardware object configured to allow stochasticity in function calling? Hardware is only stochastic when calling/event affinity is equidistant from two or more functions.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Load ( std::istream &  input)
inline

Load entire program from input stream. Warning: This function accepts a slightly different than what the Program's PrintProgram function prints out (for now, will add a PrintProgram variant that prints in this load function's accepted format). Program format: Fn-AFFINITY: INST_NAMEAFFINITY ... Fn-AFFINITY: ...

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::NewRandom ( int  seed = -1)
inline

Generate new random number generator for this hardware object with the given seed value.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::OpenBlock ( size_t  begin,
size_t  end,
BlockType  type 
)
inline

Open a block in the current local program state as specified by begin, end, and type.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PrintEvent ( const event_t event,
std::ostream &  os = std::cout 
)
inline

Print given event using given output stream (default = std::cout).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PrintInst ( const inst_t inst,
std::ostream &  os = std::cout 
)
inline

Print given instruction using given output stream (default = std::cout).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PrintProgram ( std::ostream &  os = std::cout)
inline

Print out entire program using given output stream (default = std::cout).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PrintProgramFull ( std::ostream &  os = std::cout)
inline

Print out entire program using given output stream (default = std::cout).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PrintState ( std::ostream &  os = std::cout)
inline

Print out current state (full) of virtual hardware using given output stream (default = std::cout).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PrintTraits ( std::ostream &  os = std::cout)
inline

Print hardware traits using given output stream (default = std::cout).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Process ( size_t  num_inst)
inline

Advance hardware by some arbitrary number instructions.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::ProcessInst ( const inst_t inst)
inline

Process a single instruction, provided by the caller.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PushFunction ( const Function _function)
inline

Shortcut to this hardware object's program's PushFunction operation of the same signature.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PushFunction ( const affinity_t _aff = affinity_t(),
const inst_seq_t _seq = inst_seq_t() 
)
inline

Shortcut to this hardware object's program's PushFunction operation of the same signature.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PushInst ( size_t  id,
arg_t  a0 = 0,
arg_t  a1 = 0,
arg_t  a2 = 0,
const affinity_t aff = affinity_t(),
int  fID = -1 
)
inline

Push new instruction to program. If no function pointer is provided and no functions exist yet, add new function to program and push to that. If no function pointer is provided and functions exist, push to last function in program. If function pointer is provided, push to that function.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PushInst ( const std::string &  name,
arg_t  a0 = 0,
arg_t  a1 = 0,
arg_t  a2 = 0,
const affinity_t aff = affinity_t(),
int  fID = -1 
)
inline

Push new instruction to program. If no function pointer is provided and no functions exist yet, add new function to program and push to that. If no function pointer is provided and functions exist, push to last function in program. If function pointer is provided, push to that function.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PushInst ( const inst_t inst,
int  fID = -1 
)
inline

Push new instruction to program. If no function pointer is provided and no functions exist yet, add new function to program and push to that. If no function pointer is provided and functions exist, push to last function in program. If function pointer is provided, push to that function.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::PushTrait ( double  val)
inline

Push a trait onto end of traits vector.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::QueueEvent ( const event_t event)
inline

Queue an event (to be handled by this hardware).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::QueueEvent ( const std::string &  name,
const affinity_t affinity = affinity_t(),
const memory_t msg = memory_t(),
const properties_t properties = properties_t() 
)
inline

Queue event by name.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::QueueEvent ( size_t  id,
const affinity_t affinity = affinity_t(),
const memory_t msg = memory_t(),
const properties_t properties = properties_t() 
)
inline

Queue event by id.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::Reset ( )
inline

Reset everything, including program. Not allowed to Reset during execution.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::ResetHardware ( )
inline

Reset only hardware, not program. Not allowed to reset hardware during execution.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::ReturnFunction ( )
inline

Return from current function call (cur_state) in current core (cur_core). Upon returning, put values in output memory of returning state into local memory of caller state.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetDefaultMemValue ( mem_val_t  val)
inline

Configure the default memory value.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetInst ( size_t  fID,
size_t  pos,
const inst_t inst 
)
inline

Shortcut to this hardware object's program's SetInst function of the same signature.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetInst ( size_t  fID,
size_t  pos,
size_t  id,
arg_t  a0 = 0,
arg_t  a1 = 0,
arg_t  a2 = 0,
const affinity_t aff = affinity_t() 
)
inline

Shortcut to this hardware object's program's SetInst function of the same signature.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetMaxCallDepth ( size_t  val)
inline

Configure max call depth. Warning: will not retroactively enforce new max call depth. Requirement: max call depth must be > 0.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetMaxCores ( size_t  val)
inline

Set the maximum number of cores that are allowed to be running/active simultaneously on this hardware object. Warning: If you decrease max cores, you may kill actively running cores. Warning: If you decrease max cores, we make no guarantees about which particular cores are killed. This could have adverse effects. Requirement: Must have max cores > 0 and cannot set max cores while executing (while in SingleProcess function). To sum up, be careful if you're going to decreasing max cores after you've run the hardware.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetMinBindThresh ( double  val)
inline

Set minimum binding threshold. Requirement: minimum binding threshold >= 0.0

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetProgram ( const program_t _program)
inline

Set program for this hardware object.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetShared ( mem_key_t  key,
mem_val_t  value 
)
inline

Set given shared memory map location (key) to given value.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetStochasticFunCall ( bool  val)
inline

Configure whether or not function calls should be stochastic if we have two or more matches that are equidistant from caller/event affinity.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SetTrait ( size_t  id,
double  val 
)
inline

Set trait in traints vector given by id to value given by val. Will resize traits vector if given id is greater than current traits vector size.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SingleProcess ( )
inline

Advance hardware by single instruction.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SpawnCore ( const affinity_t affinity,
double  threshold,
const memory_t input_mem = memory_t(),
bool  is_main = false 
)
inline

Spawn core with function that has best match to provided affinity. Do nothing if no functions match above the provided threshold. Initialize function state with provided input memory. Will fail if no inactive cores to claim.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::SpawnCore ( size_t  fID,
const memory_t input_mem = memory_t(),
bool  is_main = false 
)
inline

Spawn core with function specified by fID. Initialize function state with provided input memory. Will fail if no inactive cores to claim.

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::TriggerEvent ( const event_t event)
inline

Trigger an event (from this hardware).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::TriggerEvent ( const std::string &  name,
const affinity_t affinity = affinity_t(),
const memory_t msg = memory_t(),
const properties_t properties = properties_t() 
)
inline

Trigger an event (from this hardware).

template<size_t AFFINITY_WIDTH>
void emp::EventDrivenGP_AW< AFFINITY_WIDTH >::TriggerEvent ( size_t  id,
const affinity_t affinity = affinity_t(),
const memory_t msg = memory_t(),
const properties_t properties = properties_t() 
)
inline

Trigger an event (from this hardware).

template<size_t AFFINITY_WIDTH>
bool emp::EventDrivenGP_AW< AFFINITY_WIDTH >::ValidFunction ( size_t  fID) const
inline

Is the function given by function ID (fID) a valid function in this hardware object's program?

template<size_t AFFINITY_WIDTH>
bool emp::EventDrivenGP_AW< AFFINITY_WIDTH >::ValidPosition ( size_t  fID,
size_t  pos 
) const
inline

Is program position defined by the given function ID (fID) and instruction position (pos) a valid position in this hardware object's program?

Member Data Documentation

template<size_t AFFINITY_WIDTH>
emp::vector<size_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::active_cores
protected
template<size_t AFFINITY_WIDTH>
emp::vector<exec_stk_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::cores
protected
template<size_t AFFINITY_WIDTH>
constexpr size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DEFAULT_MAX_CALL_DEPTH = 128
static
template<size_t AFFINITY_WIDTH>
constexpr size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DEFAULT_MAX_CORES = 8
static
template<size_t AFFINITY_WIDTH>
constexpr mem_val_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DEFAULT_MEM_VALUE = 0.0
static
template<size_t AFFINITY_WIDTH>
double emp::EventDrivenGP_AW< AFFINITY_WIDTH >::default_mem_value
protected
template<size_t AFFINITY_WIDTH>
constexpr double emp::EventDrivenGP_AW< AFFINITY_WIDTH >::DEFAULT_MIN_BIND_THRESH = 0.5
static
template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::errors
protected
template<size_t AFFINITY_WIDTH>
Ptr<const event_lib_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::event_lib
protected
template<size_t AFFINITY_WIDTH>
std::deque<event_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::event_queue
protected
template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::exec_core_id
protected
template<size_t AFFINITY_WIDTH>
emp::vector<size_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::inactive_cores
protected
template<size_t AFFINITY_WIDTH>
bool emp::EventDrivenGP_AW< AFFINITY_WIDTH >::is_executing
protected
template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::max_call_depth
protected
template<size_t AFFINITY_WIDTH>
size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::max_cores
protected
template<size_t AFFINITY_WIDTH>
constexpr size_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::MAX_INST_ARGS = 3
static

Maximum number of instruction arguments. Currently hardcoded. At some point, will make flexible.

template<size_t AFFINITY_WIDTH>
double emp::EventDrivenGP_AW< AFFINITY_WIDTH >::min_bind_thresh
protected
template<size_t AFFINITY_WIDTH>
std::deque<size_t> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::pending_cores
protected
template<size_t AFFINITY_WIDTH>
program_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::program
protected
template<size_t AFFINITY_WIDTH>
bool emp::EventDrivenGP_AW< AFFINITY_WIDTH >::random_owner
protected
template<size_t AFFINITY_WIDTH>
Ptr<Random> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::random_ptr
protected
template<size_t AFFINITY_WIDTH>
memory_t emp::EventDrivenGP_AW< AFFINITY_WIDTH >::shared_mem
protected
template<size_t AFFINITY_WIDTH>
bool emp::EventDrivenGP_AW< AFFINITY_WIDTH >::stochastic_fun_call
protected
template<size_t AFFINITY_WIDTH>
emp::vector<double> emp::EventDrivenGP_AW< AFFINITY_WIDTH >::traits
protected

The documentation for this class was generated from the following file: