Exemple #1
0
 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];
 }
Exemple #2
0
    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_;
    }
Exemple #3
0
 void add_to(view<T> out) const
 {
     if (out.size() != 1)
         throw size_mismatch();
     out.data()[0] += in_;
 }
Exemple #4
0
bool operator==(view lhs, view rhs) {
    return (lhs.length() == rhs.length()) &&
           (std::memcmp(lhs.data(), rhs.data(), lhs.length()) == 0);
}