MCPcopy Create free account
hub / github.com/activeloopai/deeplake / eval

Method eval

cpp/nd/impl/sliced_array.hpp:272–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270 }
271
272 nd::array eval() const
273 {
274 if (!needs_resize_) {
275 return a_;
276 }
277 auto resizer = data_resizer<I>(shape_, a_.shape(), slices_);
278 icm::vector<value_type> data;
279 auto v = std::accumulate(shape_.begin(), shape_.end(), 1, std::multiplies<int64_t>());
280 data.resize(v);
281 auto a = nd::eval(a_);
282 auto d = a.data();
283 resizer.template resize<value_type>(d.data(), reinterpret_cast<uint8_t*>(data.data()));
284 return nd::adapt(std::move(data), icm::shape(shape_));
285 }
286
287 constexpr bool is_dynamic() const noexcept
288 {

Callers

nothing calls this directly

Calls 7

adaptFunction · 0.85
shapeClass · 0.85
shapeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected