| 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; |
nothing calls this directly
no test coverage detected