This contains my bachelors thesis and associated tex files, code snippets and maybe more. Topic: Data Movement in Heterogeneous Memories with Intel Data Streaming Accelerator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1012 B

  1. #include <dml/dml.hpp>
  2. #include <vector>
  3. #include <iostream>
  4. #include <fstream>
  5. #include "logging-helper.hpp"
  6. #include "execute-move.hpp"
  7. int main(int argc, char **argv) {
  8. if (argc < 3) {
  9. std::cout << "Missing input and output file names." << std::endl;
  10. std::cout << "Usage: ./benchmarks [input.json] [output.json]" << std::endl;
  11. return 1;
  12. }
  13. const std::string input = argv[1];
  14. const std::string output = argv[2];
  15. std::string path;
  16. std::vector<ThreadArgs> args;
  17. std::ifstream is(input);
  18. ReadWorkDescription(args, path, is);
  19. is.close();
  20. if (path == "hw") {
  21. execute_mem_move<dml::hardware>(args);
  22. }
  23. else if (path == "sw") {
  24. execute_mem_move<dml::software>(args);
  25. }
  26. else if (path == "auto") {
  27. execute_mem_move<dml::automatic>(args);
  28. }
  29. else {
  30. std::cerr << "Path is neither hw/sw/auto." << std::endl;
  31. }
  32. std::ofstream os(output);
  33. WriteResultLog(args, path, os);
  34. os.close();
  35. }