MCPcopy Create free account
hub / github.com/alibaba/zvec / at

Method at

src/ailego/container/vector_array.h:158–163  ·  view source on GitHub ↗

Retrieve pointer of data

Source from the content-addressed store, hash-verified

156
157 //! Retrieve pointer of data
158 ValueType *at(size_t i) {
159 if (ailego_unlikely(i >= this->count())) {
160 throw std::out_of_range("Index overflow");
161 }
162 return (reinterpret_cast<ValueType *>(&buffer_[0]) + i * dimension_);
163 }
164
165 //! Retrieve pointer of data
166 const ValueType *at(size_t i) const {

Callers

nothing calls this directly

Calls 2

countMethod · 0.95
dataMethod · 0.45

Tested by

no test coverage detected