equal
deleted
inserted
replaced
32 |
32 |
33 template <class T> |
33 template <class T> |
34 class WorkerDataArray : public CHeapObj<mtGC> { |
34 class WorkerDataArray : public CHeapObj<mtGC> { |
35 friend class WDAPrinter; |
35 friend class WDAPrinter; |
36 public: |
36 public: |
37 static const uint MaxThreadWorkItems = 4; |
37 static const uint MaxThreadWorkItems = 5; |
38 private: |
38 private: |
39 T* _data; |
39 T* _data; |
40 uint _length; |
40 uint _length; |
41 const char* _title; |
41 const char* _title; |
42 |
42 |
48 |
48 |
49 void link_thread_work_items(WorkerDataArray<size_t>* thread_work_items, uint index = 0); |
49 void link_thread_work_items(WorkerDataArray<size_t>* thread_work_items, uint index = 0); |
50 void set_thread_work_item(uint worker_i, size_t value, uint index = 0); |
50 void set_thread_work_item(uint worker_i, size_t value, uint index = 0); |
51 void add_thread_work_item(uint worker_i, size_t value, uint index = 0); |
51 void add_thread_work_item(uint worker_i, size_t value, uint index = 0); |
52 void set_or_add_thread_work_item(uint worker_i, size_t value, uint index = 0); |
52 void set_or_add_thread_work_item(uint worker_i, size_t value, uint index = 0); |
|
53 size_t get_thread_work_item(uint worker_i, uint index = 0); |
53 |
54 |
54 WorkerDataArray<size_t>* thread_work_items(uint index = 0) const { |
55 WorkerDataArray<size_t>* thread_work_items(uint index = 0) const { |
55 assert(index < MaxThreadWorkItems, "Tried to access thread work item %u max %u", index, MaxThreadWorkItems); |
56 assert(index < MaxThreadWorkItems, "Tried to access thread work item %u max %u", index, MaxThreadWorkItems); |
56 return _thread_work_items[index]; |
57 return _thread_work_items[index]; |
57 } |
58 } |