Skip to content

Commit

Permalink
refs #17: Minor code clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Aug 8, 2015
1 parent 380e843 commit b76d406
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/config.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define NBA_OQ (true) // Use output-queuing semantics when possible.
#undef NBA_CPU_MICROBENCH // Enable support for PAPI library for microbenchmarks.

/* If you change below, update HANDLE_ALL_PORTS macro in lib/element.hh as well!! */
#define NBA_MAX_ELEM_NEXTS (4)

namespace nba {
Expand Down
16 changes: 8 additions & 8 deletions lib/element.hh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ public:
comp_thread_context *ctx;

protected:
/* Subclasses use below to manage node-local storage. */
int num_nodes;
int node_idx;

private:
friend class ElementGraph;
friend class Element::OutputPort;

uint64_t branch_total = 0;
uint64_t branch_miss = 0;
uint64_t branch_count[NBA_MAX_ELEM_NEXTS];
Expand All @@ -115,14 +123,6 @@ protected:
FixedArray<int, -1, NBA_MAX_ELEM_NEXTS> next_connected_inputs;
OutputPort outputs[NBA_MAX_ELEM_NEXTS];

// used to manage per-node info
int num_nodes;
int node_idx;

private:
friend class ElementGraph;
friend class Element::OutputPort;

uint16_t output_counts[NBA_MAX_ELEM_NEXTS];
Packet *output_cloned_packets[NBA_MAX_ELEM_NEXTS][NBA_MAX_COMP_BATCH_SIZE];

Expand Down

0 comments on commit b76d406

Please sign in to comment.