Low-level accessor for stuff like memcmp, handle with care. Returns pointer to the underlying storage of the array (similarly to std::vector::data()).
| 395 | // Low-level accessor for stuff like memcmp, handle with care. Returns pointer |
| 396 | // to the underlying storage of the array (similarly to std::vector::data()). |
| 397 | T* data() const { |
| 398 | // TODO(tberghammer): Get rid of the const_cast. Currently it is needed |
| 399 | // because the Eigen backend needs a non-const pointers even for reading |
| 400 | // from the array. |
| 401 | return const_cast<Array*>(this)->values_.get(); |
| 402 | } |
| 403 | |
| 404 | // Returns the size of the dimension at the given index. |
| 405 | int64 dim(int64 n) const { |