//-------------------------------------------------------------------------- // File // merge-thread.h // PROGRAM Description: // class definition file for merge thread, collector and master thread //-------------------------------------------------------------------------- #ifndef _SORT_H #define _SORT_H #include #include "ThreadClass.h" // macro defines #define MAX_THREADS 128 #define MAX_CHANNELS 128 //------------------------------------------------------------------------- // SortThread Class: // This is the merge thread //------------------------------------------------------------------------- class MergeThread : public Thread { public: // constructor and destructor MergeThread(int threadID); ~MergeThread(); private: void ThreadFunc(); // thread body int Index; // index of the sort thread }; //------------------------------------------------------------------------- // MasterThread Class // This is the thread that supplies input to the first level merge // threads //------------------------------------------------------------------------- class MasterThread : public Thread { public: MasterThread(int threadID, int numberOfData); private: void ThreadFunc(); int NumberOfData; }; //------------------------------------------------------------------------- // CollectorThread Class // This is the thread that collects the sorted results from the // last level //------------------------------------------------------------------------- class CollectorThread : public Thread { public: CollectorThread (int threadID); private: void ThreadFunc(); }; #endif // _SORT_H