You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inline void reserve(std::size_t capacity)
{
std::size_t copy_size = std::min<>(capacity, size_);
// Create new allocation and copy over value
auto new_data(util::allocate<T>(capacity, pool_));
std::copy_n(cbegin(), copy_size, new_data.get());
std::swap(data_, new_data);
// Set the coeff_count and capacity
capacity_ = capacity;
size_ = copy_size;
}
I think we can judge if capacity > capacity_ before allocating memory.
The current behavior causes the function Ciphertext::operator=(const Ciphertext &assign) slower than the construction function of Ciphertext.
The text was updated successfully, but these errors were encountered:
In /native/src/seal/dynarray.h,
I think we can judge if
capacity > capacity_
before allocating memory.The current behavior causes the function
Ciphertext::operator=(const Ciphertext &assign)
slower than the construction function of Ciphertext.The text was updated successfully, but these errors were encountered: