Append a vector
| 66 | |
| 67 | //! Append a vector |
| 68 | void append(const ValueType *vec, size_t dim) { |
| 69 | if (ailego_unlikely(dim != dimension_)) { |
| 70 | throw std::length_error("Unmatched dimension"); |
| 71 | } |
| 72 | buffer_.append(reinterpret_cast<const char *>(vec), |
| 73 | dim * sizeof(ValueType)); |
| 74 | } |
| 75 | |
| 76 | //! Append vectors |
| 77 | void append(const ValueType *vec, size_t dim, size_t cnt) { |