Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cutorch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTrevor Killeen <killeentm@gmail.com>2016-11-07 23:27:30 +0300
committerTrevor Killeen <killeentm@gmail.com>2016-11-12 00:22:57 +0300
commit72ce602240fecfba763225a1e785b752bf82e32a (patch)
tree751995cb98444a719a064ccffbafb37515c5fdfc /test
parent62a3961adfda4a41c098dbff4fdf11e4bf6b673b (diff)
[cutorch rand2gen] move uniform, rand to generic
Diffstat (limited to 'test')
-rw-r--r--test/test.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test.lua b/test/test.lua
index 00cfa66..1440984 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -2526,8 +2526,11 @@ function test.uniform()
local max = min + torch.uniform()
local t = torch.CudaTensor(sz1, sz2)
- t:uniform(min, max)
- checkIfUniformlyDistributed(t, min, max)
+ for _, typename in ipairs(float_typenames) do
+ local x = t:type(t2cpu[typename])
+ x:uniform(min, max)
+ checkIfUniformlyDistributed(x, min, max)
+ end
checkMultiDevice(t, 'uniform', min, max)
end