MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / randuDimsTest

Function randuDimsTest

test/random.cpp:167–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165
166template<typename T>
167void randuDimsTest() {
168 SUPPORTED_TYPE_CHECK(T);
169
170 dim4 dims(1, 65535 * 32, 1, 1);
171 array large_rand = randu(dims, (af_dtype)dtype_traits<T>::af_type);
172 ASSERT_EQ(large_rand.dims()[1], 65535 * 32);
173
174 dims = dim4(1, 1, 65535 * 32, 1);
175 large_rand = randu(dims, (af_dtype)dtype_traits<T>::af_type);
176 ASSERT_EQ(large_rand.dims()[2], 65535 * 32);
177
178 dims = dim4(1, 1, 1, 65535 * 32);
179 large_rand = randu(dims, (af_dtype)dtype_traits<T>::af_type);
180 ASSERT_EQ(large_rand.dims()[3], 65535 * 32);
181}
182
183TYPED_TEST(Random, InvalidDims) { randuDimsTest<TypeParam>(); }
184

Callers

nothing calls this directly

Calls 3

randuFunction · 0.85
dim4Class · 0.50
dimsMethod · 0.45

Tested by

no test coverage detected