Skip to content

Commit

Permalink
Change working mechanism of raw_data_generator.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
fenilgmehta committed Aug 11, 2019
1 parent 79c9984 commit 1355a1f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/raw_data_generator.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
# $1: name of the object file to be used
# $2: folder location to write the data generated
# $3: array length
# $4: test cases

object_file=$1

Expand All @@ -16,20 +18,18 @@ cd - > /dev/null
echo "Object file name : \"${object_file}\""
echo "Output folder location : \"${output_folder}\""

file_name="data_generator_integer.cpp"
echo "Compiling \"${file_name}\""
g++ -O2 "data_generator_integer.cpp" -o "${1}" || exit
file_name="raw_data_generator_integer.cpp"
echo "Compiling \"${file_name}\" ..."
g++ -std=c++14 -O2 "${file_name}" -o "${1}" || exit
echo 'Compilation successfully completed' && echo

i=10
test_cases=5
len=${3}
test_cases=${4}

echo "test_cases = ${test_cases}" && echo

while [[ i -le 100000 ]]
do
echo "Array size = ${i}"
./${object_file} <<< "$i $test_cases" > "${output_folder}/rawData_${test_cases}_${i}.csv"
# ./${1} <<< "$i $test_cases" > "../Graphs/All_Comparisons/rawData_int8_t/rawData_${test_cases}_${i}.csv"
((i = i * 10))
done
echo "Array size = ${len}" && echo
echo "------------------------"
./${object_file} <<< "$len $test_cases" > "${output_folder}/rawData_${test_cases}_${len}.csv"

rm ${object_file}

0 comments on commit 1355a1f

Please sign in to comment.