MCPcopy Create free account
hub / github.com/apache/arrow / MatlabBuffer

Method MatlabBuffer

matlab/src/cpp/arrow/matlab/buffer/matlab_buffer.h:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 public:
30 template <typename CType>
31 MatlabBuffer(const mda::TypedArray<CType> typed_array)
32 : arrow::Buffer{nullptr, 0}, array{typed_array} {
33 // Get raw pointer of mxArray
34 auto it(typed_array.cbegin());
35 auto dt = it.operator->();
36
37 data_ = reinterpret_cast<const uint8_t*>(dt);
38 size_ = sizeof(CType) * static_cast<int64_t>(typed_array.getNumberOfElements());
39 capacity_ = size_;
40 is_mutable_ = false;
41 }
42
43 private:
44 const mda::Array array;

Callers

nothing calls this directly

Calls 2

cbeginMethod · 0.80
operator->Method · 0.45

Tested by

no test coverage detected