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.

31 lines
874 B

  1. #!/bin/bash
  2. # Check if the correct number of arguments is provided
  3. if [ "$#" -ne 4 ]; then
  4. echo "Usage: $0 <program_location> <descriptor-directory> <output-directory> <file-extender>"
  5. exit 1
  6. fi
  7. # Assign arguments to variables
  8. program_location="$1"
  9. json_directory="$2"
  10. output_dir="$3"
  11. file_extender="$4"
  12. # Check if the specified directory exists
  13. if [ ! -d "$json_directory" ]; then
  14. echo "Error: Directory $json_directory not found."
  15. exit 1
  16. fi
  17. # Iterate over all JSON files in the directory
  18. for json_file in "$json_directory"/*.json; do
  19. # Check if there are matching files
  20. if [ -e "$json_file" ]; then
  21. # Execute the program with the JSON file as parameters
  22. bn=$(basename $json_file)
  23. name="${bn%.*}"
  24. echo "running test ${name} ..."
  25. "$program_location" "$json_file" "${output_dir}/${name}${file_extender}.json"
  26. fi
  27. done