Home
last modified time | relevance | path

Searched refs:ftensor (Results 1 – 2 of 2) sorted by relevance

/external/eigen/unsupported/test/
Dcxx11_tensor_casts.cpp19 Tensor<float, 2> ftensor(20,30); in test_simple_cast() local
20 ftensor = ftensor.random() * 100.f; in test_simple_cast()
26 chartensor = ftensor.cast<char>(); in test_simple_cast()
27 cplextensor = ftensor.cast<std::complex<float> >(); in test_simple_cast()
31 VERIFY_IS_EQUAL(chartensor(i,j), static_cast<char>(ftensor(i,j))); in test_simple_cast()
32 VERIFY_IS_EQUAL(cplextensor(i,j), static_cast<std::complex<float> >(ftensor(i,j))); in test_simple_cast()
42 Tensor<float, 2> ftensor(20,30); in test_vectorized_cast() local
43 ftensor.setRandom(); in test_vectorized_cast()
47 ftensor = itensor.cast<float>(); in test_vectorized_cast()
52 VERIFY_IS_EQUAL(itensor(i,j), static_cast<int>(ftensor(i,j))); in test_vectorized_cast()
[all …]
Dcxx11_tensor_roundings.cpp17 Tensor<float, 2> ftensor(20,30); in test_float_rounding() local
18 ftensor = ftensor.random() * 100.f; in test_float_rounding()
20 Tensor<float, 2> result = ftensor.round(); in test_float_rounding()
24 VERIFY_IS_EQUAL(result(i,j), numext::round(ftensor(i,j))); in test_float_rounding()
31 Tensor<float, 2> ftensor(20,30); in test_float_flooring() local
32 ftensor = ftensor.random() * 100.f; in test_float_flooring()
34 Tensor<float, 2> result = ftensor.floor(); in test_float_flooring()
38 VERIFY_IS_EQUAL(result(i,j), numext::floor(ftensor(i,j))); in test_float_flooring()
45 Tensor<float, 2> ftensor(20,30); in test_float_ceiling() local
46 ftensor = ftensor.random() * 100.f; in test_float_ceiling()
[all …]