diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-12-19 13:59:16 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-12-19 13:59:16 +0100 |
commit | c75854db1ef18878a2200e49abc8b42e0a148594 (patch) | |
tree | 248abf2f891e168f8d1ab288df041e7a9021a3a7 /eval/src/tests | |
parent | 95b2ce61a3f20cacf310066339c67d6e51dac0b7 (diff) |
Micro optimize DenseTensorCellsIterator::next by expecting most probable branch and use 32 bits for sizes instead of 64 bits
Diffstat (limited to 'eval/src/tests')
-rw-r--r-- | eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp | 12 | ||||
-rw-r--r-- | eval/src/tests/tensor/dense_tensor_builder/dense_tensor_builder_test.cpp | 2 |
2 files changed, 4 insertions, 10 deletions
diff --git a/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp b/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp index ca77997bac7..0b8b98fc617 100644 --- a/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp +++ b/eval/src/tests/tensor/dense_dot_product_function/dense_dot_product_function_test.cpp @@ -1,8 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/log/log.h> -LOG_SETUP("dense_dot_product_function_test"); - #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/eval/eval/tensor_function.h> #include <vespa/eval/tensor/dense/dense_dot_product_function.h> @@ -12,16 +9,13 @@ LOG_SETUP("dense_dot_product_function_test"); #include <vespa/vespalib/util/stringfmt.h> #include <vespa/vespalib/util/stash.h> +#include <vespa/log/log.h> +LOG_SETUP("dense_dot_product_function_test"); + using namespace vespalib; using namespace vespalib::eval; using namespace vespalib::tensor; -ValueType -makeType(size_t numCells) -{ - return ValueType::tensor_type({{"x", numCells}}); -} - tensor::Tensor::UP makeTensor(size_t numCells, double cellBias) { diff --git a/eval/src/tests/tensor/dense_tensor_builder/dense_tensor_builder_test.cpp b/eval/src/tests/tensor/dense_tensor_builder/dense_tensor_builder_test.cpp index 6f3cdd5f93f..61efdbe6d22 100644 --- a/eval/src/tests/tensor/dense_tensor_builder/dense_tensor_builder_test.cpp +++ b/eval/src/tests/tensor/dense_tensor_builder/dense_tensor_builder_test.cpp @@ -147,7 +147,7 @@ TEST_F("require that builder can be re-used", Fixture) } void -assertTensorCell(const std::vector<size_t> &expAddress, +assertTensorCell(const DenseTensor::Address &expAddress, double expCell, const DenseTensor::CellsIterator &itr) { |