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

Method copy_data

cpp/nd/impl/stacked_array.hpp:85–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 void copy_data(std::span<uint8_t> buffer) const
86 {
87 auto volume = std::accumulate(shape_.begin(), shape_.end(), 1L, std::multiplies<int64_t>()) * sizeof(T);
88 auto vol1 = volume * a1_.size() / (a1_.size() + a2_.size());
89 auto sp1 = std::span<uint8_t>(buffer.data(), vol1);
90 auto sp2 = std::span<uint8_t>(buffer.data() + vol1, volume - vol1);
91 nd::copy_data(a1_, base::span_cast<uint8_t>(sp1));
92 nd::copy_data(a2_, base::span_cast<uint8_t>(sp2));
93 }
94
95 uint8_t dimensions() const
96 {

Callers

nothing calls this directly

Calls 4

beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected