pmc_utils.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. ============================================================================
  3. Name : Parallel Maximum Clique (PMC) Library
  4. Author : Ryan A. Rossi (rrossi@purdue.edu)
  5. Description : A general high-performance parallel framework for computing
  6. maximum cliques. The library is designed to be fast for large
  7. sparse graphs.
  8. Copyright (C) 2012-2013, Ryan A. Rossi, All rights reserved.
  9. Please cite the following paper if used:
  10. Ryan A. Rossi, David F. Gleich, Assefaw H. Gebremedhin, Md. Mostofa
  11. Patwary, A Fast Parallel Maximum Clique Algorithm for Large Sparse Graphs
  12. and Temporal Strong Components, arXiv preprint 1302.6256, 2013.
  13. See http://ryanrossi.com/pmc for more information.
  14. ============================================================================
  15. */
  16. #ifndef PMC_UTILS_H_
  17. #define PMC_UTILS_H_
  18. #include <cstddef>
  19. #include <sys/time.h>
  20. #include <unistd.h>
  21. #include <iostream>
  22. #include "assert.h"
  23. #include <sys/types.h>
  24. #include <dirent.h>
  25. #include <errno.h>
  26. #include <string>
  27. #include <set>
  28. #include "pmc_headers.h"
  29. using namespace std;
  30. bool fexists(const char *filename);
  31. void usage(char *argv0);
  32. double get_time();
  33. string memory_usage();
  34. void validate(bool condition, const string& msg);
  35. void indent(int level);
  36. void indent(int level, string str);
  37. void print_max_clique(vector<int>& max_clique_data);
  38. void print_n_maxcliques(set< vector<int> > C, int n);
  39. int getdir (string dir, vector<string> &files);
  40. #endif