summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2018-01-24 11:59:50 +0000
committerJon Bratseth <bratseth@yahoo-inc.com>2018-01-24 11:59:50 +0000
commit42a883e3411754c84434e164a9e6b542182df01d (patch)
tree217dc1ca718205921f652728ff7fc37dbe447989 /eval
parent7e61d6e726694ed781326238881d3b2d686652b8 (diff)
Spaces only
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/eval/value_cache/constant_tensor_loader.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/eval/src/vespa/eval/eval/value_cache/constant_tensor_loader.cpp b/eval/src/vespa/eval/eval/value_cache/constant_tensor_loader.cpp
index 9eabb1e2813..6ad8d3a1312 100644
--- a/eval/src/vespa/eval/eval/value_cache/constant_tensor_loader.cpp
+++ b/eval/src/vespa/eval/eval/value_cache/constant_tensor_loader.cpp
@@ -81,7 +81,7 @@ ConstantTensorLoader::create(const vespalib::string &path, const vespalib::strin
}
if (ends_with(path, ".tbf")) {
vespalib::MappedFileInput file(path);
- vespalib::Memory content = file.get();
+ vespalib::Memory content = file.get();
vespalib::nbostream stream(content.data, content.size);
return std::make_unique<SimpleConstantValue>(_engine.decode(stream));
}
@@ -89,17 +89,17 @@ ConstantTensorLoader::create(const vespalib::string &path, const vespalib::strin
decode_json(path, slime);
std::set<vespalib::string> indexed;
for (const auto &dimension: value_type.dimensions()) {
- if (dimension.is_indexed()) {
- indexed.insert(dimension.name);
- }
+ if (dimension.is_indexed()) {
+ indexed.insert(dimension.name);
+ }
}
TensorSpec spec(type);
const Inspector &cells = slime.get()["cells"];
for (size_t i = 0; i < cells.entries(); ++i) {
- TensorSpec::Address address;
- AddressExtractor extractor(indexed, address);
- cells[i]["address"].traverse(extractor);
- spec.add(address, cells[i]["value"].asDouble());
+ TensorSpec::Address address;
+ AddressExtractor extractor(indexed, address);
+ cells[i]["address"].traverse(extractor);
+ spec.add(address, cells[i]["value"].asDouble());
}
return std::make_unique<SimpleConstantValue>(_engine.from_spec(spec));
}