Advertisement
Guest User

Joseph Kogut

a guest
Jan 30th, 2010
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. //Part of Laverna's Brute
  2.  
  3. #ifndef DIRECTOR_H_
  4. #define DIRECTOR_H_
  5.  
  6. #include "ProcessingPath.h"
  7. #include "MasterThread.h"
  8.  
  9. class Director
  10. {
  11. public:
  12.  
  13.     Director();
  14.     Director(unsigned long long beginKeyspace, unsigned long long keyspaceEnd);
  15.  
  16.     ~Director();
  17.  
  18.     void operator()();
  19.  
  20.     static processingPath* getWorkerPtr(int id);
  21.     static void manageWorker(processingPath* worker);
  22.  
  23.     // The return value is whether or not the director was able to create new work for the idle thread
  24.     static bool reassignKeyspace(processingPath* worker);
  25.  
  26. protected:
  27.  
  28.     void updateIterations();
  29.  
  30.     static unsigned long long getRemainingKeyspace(int id);
  31.     static unsigned long long getRemainingKeyspace(processingPath* worker);
  32.  
  33.     static processingPath** workerPtrArray;
  34.  
  35.     static bool server;
  36.     static int numWorkers;
  37. };
  38.  
  39. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement