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

Method dynamic_value

cpp/nd/array.hpp:759–775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

757private:
758 template <typename T>
759 inline T dynamic_value(int64_t index) const
760 {
761 ASSERT(index < volume());
762 auto v = 0;
763 auto i = 0;
764 while (v <= index) {
765 auto a = operator[](i);
766 if (v + a.volume() > index) {
767 return a.value<T>(index - v);
768 } else {
769 v += a.volume();
770 ++i;
771 }
772 }
773 ASSERT(false);
774 return T();
775 }
776
777 template <typename T>
778 inline const T* dynamic_cast_() const

Callers

nothing calls this directly

Calls 1

volumeMethod · 0.45

Tested by

no test coverage detected