Commit 3e7d9ddd authored by Emmanuel Thomé's avatar Emmanuel Thomé

Get rid of dependency on bc -l for some tests.

parent 8f852d02
......@@ -213,8 +213,15 @@ create_test_matrix_if_needed() {
# a matrix with N rows and N-r columns, and later pad the column
# width data with r zeroes.
ncols=$((nrows-nrhs))
basename=$mats/t${random_matrix_size}p+${nrhs}
density=`echo "l($random_matrix_size)^2/2" | bc -l | cut -d. -f1`
basename=$mats/t${escaped_size}p+${nrhs}
# We want something proportional to log(N)^2 as a density.
# There's no undebatable support for this heuristic, it's just an
# arbitrary choice. We'll do that without relying on external
# tools for computing the log: just plain stupid shell. That's
# gonna be good enough. The ratio below is taken as 2, which fits
# well the relevant density ranges for the matrices we wish to
# consider.
density=$((${#random_matrix_size}*${#random_matrix_size}*2))
if [ "$density" -lt 12 ] ; then density=12; fi
rmargs=("${rmargs[@]}" -d $density)
matrix="$basename.matrix.bin"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment