#include <threadFactory.h>
Public Member Functions | |
virtual | ~ThreadFactory () |
virtual Runnable ** | createThreads (int threadNum, int elementNum, int operationNum)=0 |
virtual void | deleteThreads (Runnable **threads, int threadNum) |
virtual void | verifyResult (int threadNum, int elementNum) |
virtual void | collection (Runnable **threads, int threadNum) |
Public Attributes | |
vector< ParaType > | inVec |
vector< ParaType > | outVec |
virtual test::ThreadFactory< ParaType >::~ThreadFactory | ( | ) | [inline, virtual] |
virtual Runnable** test::ThreadFactory< ParaType >::createThreads | ( | int | threadNum, | |
int | elementNum, | |||
int | operationNum | |||
) | [pure virtual] |
Create multiple threads which can be used to run simultaneously. This method should also clean and setup internal state for next round of execution.
Implemented in MathThreadFactory< ParaType, CLASS_NAME >, test::ThreadPushRightFactory< DequeType, ParaType, CLASS_NAME >, test::Thread4DirFactory< DequeType, ParaType, CLASS_NAME >, test::Thread4DirFactory< DequeType, ParaType, CLASS_NAME >, test::ThreadPushRightFactory< DequeType, ParaType, CLASS_NAME >, test::Thread4DirFactory< DequeType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadDeleteKeyFactory< DictType, ParaType, CLASS_NAME >, test::ThreadDeleteValueFactory< DictType, ParaType, CLASS_NAME >, test::ThreadFindValueFactory< DictType, ParaType, CLASS_NAME >, test::ThreadFindKeyFactory< DictType, ParaType, CLASS_NAME >, test::ThreadInsertRemoveFactory< DictType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadPush_frontFactory< ListType, ParaType, CLASS_NAME >, test::ThreadRemoveFactory< ListType, ParaType, CLASS_NAME >, test::ThreadInsertRemoveFactory< DictType, ParaType, CLASS_NAME >, test::ThreadDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnqueueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnqueueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadRemoveFactory< ListType, ParaType, CLASS_NAME >, test::ThreadInsertRemoveFactory< DictType, ParaType, CLASS_NAME >, test::ThreadPopFactory< TestType, ParaType, CLASS_NAME >, test::ThreadPushFactory< TestType, ParaType, CLASS_NAME >, and test::ThreadPushPopPairFactory< TestType, ParaType, CLASS_NAME >.
virtual void test::ThreadFactory< ParaType >::deleteThreads | ( | Runnable ** | threads, | |
int | threadNum | |||
) | [inline, virtual] |
virtual void test::ThreadFactory< ParaType >::verifyResult | ( | int | threadNum, | |
int | elementNum | |||
) | [inline, virtual] |
Verify result when created threads finished.
Reimplemented in MathThreadFactory< ParaType, CLASS_NAME >, test::ThreadPushRightFactory< DequeType, ParaType, CLASS_NAME >, test::Thread4DirFactory< DequeType, ParaType, CLASS_NAME >, test::ThreadPushRightFactory< DequeType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadDeleteKeyFactory< DictType, ParaType, CLASS_NAME >, test::ThreadDeleteValueFactory< DictType, ParaType, CLASS_NAME >, test::ThreadFindValueFactory< DictType, ParaType, CLASS_NAME >, test::ThreadFindKeyFactory< DictType, ParaType, CLASS_NAME >, test::ThreadInsertRemoveFactory< DictType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadPush_frontFactory< ListType, ParaType, CLASS_NAME >, test::ThreadRemoveFactory< ListType, ParaType, CLASS_NAME >, test::ThreadInsertRemoveFactory< DictType, ParaType, CLASS_NAME >, test::ThreadDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnqueueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnqueueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadEnDequeueFactory< QueueType, ParaType, CLASS_NAME >, test::ThreadInsertFactory< DictType, ParaType, CLASS_NAME >, test::ThreadRemoveFactory< ListType, ParaType, CLASS_NAME >, test::ThreadInsertRemoveFactory< DictType, ParaType, CLASS_NAME >, test::ThreadPopFactory< TestType, ParaType, CLASS_NAME >, test::ThreadPushFactory< TestType, ParaType, CLASS_NAME >, and test::ThreadPushPopPairFactory< TestType, ParaType, CLASS_NAME >.
virtual void test::ThreadFactory< ParaType >::collection | ( | Runnable ** | threads, | |
int | threadNum | |||
) | [inline, virtual] |
collect data from vector in every thread and add them to one vector in factory.
vector<ParaType> test::ThreadFactory< ParaType >::inVec |
vector<ParaType> test::ThreadFactory< ParaType >::outVec |