void add_to(view<T> out) const { if (out.size() != in_.size()) throw size_mismatch(); for (size_t i = 0; i != in_.size(); ++i) out.data()[i] += in_[i]; }
void add_to(view<T> out) const { if (out.size() != (size_t)in_.rows()) throw size_mismatch(); typename eigen<T>::col_map out_map(out.data(), out.size()); out_map += in_; }
void add_to(view<T> out) const { if (out.size() != 1) throw size_mismatch(); out.data()[0] += in_; }
bool operator==(view lhs, view rhs) { return (lhs.length() == rhs.length()) && (std::memcmp(lhs.data(), rhs.data(), lhs.length()) == 0); }