Skip to content

Commit

Permalink
Add GetNumInstsCopied method to VirtualCPU
Browse files Browse the repository at this point in the history
  • Loading branch information
FergusonAJ committed Jun 30, 2022
1 parent c255c9d commit 6cdc08d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/emp/hardware/VirtualCPU.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ namespace emp{
genome_t genome_working; ///< Working copy of genome that can mutate, resize, and change
//////// BOOKKEEPING
size_t active_stack_idx = 0; ///< Index of CPU's active stack
emp::vector<size_t> copied_inst_id_vec; ///< Vector of instructions that have been
///< copied
size_t num_insts_executed = 0;
emp::vector<size_t> copied_inst_id_vec; /**< Vector of instructions that have been
copied */
size_t num_insts_executed = 0; ///< Number of instructions that have been executed


//////// CONSTRUCTORS / DESTRUCTOR
Expand Down Expand Up @@ -277,6 +277,10 @@ namespace emp{
genome_working.erase(genome_working.begin() + idx);
nops_need_curated = true;
}
/// Return the number of instruction that have been copied
size_t GetNumInstsCopied() const{
return copied_inst_id_vec.size();
}



Expand Down

0 comments on commit 6cdc08d

Please sign in to comment.