Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion theta/include/theta_set_difference_base_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ CS theta_set_difference_base<EN, EK, CS, A>::compute(FwdSketch&& a, const Sketch
const uint64_t hash = EK()(entry);
if (hash < theta) {
auto result = table.find(hash);
if (!result.second) entries.push_back(conditional_forward<FwdSketch>(entry));
if (!result.second) entries.emplace_back(conditional_forward<FwdSketch>(entry));
} else if (a.is_ordered()) {
break; // early stop
}
Expand Down
4 changes: 2 additions & 2 deletions tuple/include/array_tuple_sketch_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ compact_array_tuple_sketch<Array, Allocator> compact_array_tuple_sketch<Array, A
for (size_t i = 0; i < num_entries; ++i) {
Array summary(num_values, 0, allocator);
read(is, summary.data(), num_values * sizeof(typename Array::value_type));
entries.push_back(Entry(keys[i], std::move(summary)));
entries.emplace_back(keys[i], std::move(summary));
}
}
if (!is.good()) throw std::runtime_error("error reading from std::istream");
Expand Down Expand Up @@ -213,7 +213,7 @@ compact_array_tuple_sketch<Array, Allocator> compact_array_tuple_sketch<Array, A
for (size_t i = 0; i < num_entries; ++i) {
Array summary(num_values, 0, allocator);
ptr += copy_from_mem(ptr, summary.data(), num_values * sizeof(typename Array::value_type));
entries.push_back(Entry(keys[i], std::move(summary)));
entries.emplace_back(keys[i], std::move(summary));
}
}
const bool is_empty = flags_byte & (1 << flags::IS_EMPTY);
Expand Down
6 changes: 3 additions & 3 deletions tuple/include/tuple_sketch_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ entries_(other.get_allocator())
{
entries_.reserve(other.get_num_retained());
for (uint64_t hash: other) {
entries_.push_back(Entry(hash, summary));
entries_.emplace_back(hash, summary);
}
if (ordered && !other.is_ordered()) std::sort(entries_.begin(), entries_.end(), comparator());
}
Expand Down Expand Up @@ -518,7 +518,7 @@ compact_tuple_sketch<S, A> compact_tuple_sketch<S, A>::deserialize(std::istream&
for (size_t i = 0; i < num_entries; ++i) {
const auto key = read<uint64_t>(is);
sd.deserialize(is, summary.get(), 1);
entries.push_back(Entry(key, std::move(*summary)));
entries.emplace_back(key, std::move(*summary));
(*summary).~S();
}
}
Expand Down Expand Up @@ -585,7 +585,7 @@ compact_tuple_sketch<S, A> compact_tuple_sketch<S, A>::deserialize(const void* b
uint64_t key;
ptr += copy_from_mem(ptr, key);
ptr += sd.deserialize(ptr, base + size - ptr, summary.get(), 1);
entries.push_back(Entry(key, std::move(*summary)));
entries.emplace_back(key, std::move(*summary));
(*summary).~S();
}
}
Expand Down