diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-10-13 19:10:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 19:10:51 +0300 |
commit | 4f7843e8be8de37d0474e9d4a529261b147e8a8e (patch) | |
tree | 03bbb7a82a65eef8d77d4c13799c84475501f4ce | |
parent | 9bf79e05f51b2eb9374101fe3bb1610925586193 (diff) | |
parent | 61f3e5fed90146e58869a1dab688319cd9f11d12 (diff) |
Merge pull request #797 from BTNC/win
change timeSort test to work on windows
-rw-r--r-- | test/timeSort.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/timeSort.lua b/test/timeSort.lua index baa0b7d..ad513b8 100644 --- a/test/timeSort.lua +++ b/test/timeSort.lua @@ -2,6 +2,7 @@ -- Test torch sort, show it suffers from the problems of quicksort -- i.e. complexity O(N^2) in worst-case of sorted list require 'gnuplot' +local ffi = require 'ffi' local cmd = torch.CmdLine() cmd:option('-N', 10^7, 'Maximum array size') @@ -104,7 +105,11 @@ function main() local N = pow10:clone():apply(function(x) return 10^x end) - gnuplot.setterm('x11') + if ffi.os == 'Windows' then + gnuplot.setterm('windows') + else + gnuplot.setterm('x11') + end gnuplot.figure(1) gnuplot.raw('set log x; set mxtics 10') gnuplot.raw('set grid mxtics mytics xtics ytics') |