| 144 | } // namespace |
| 145 | |
| 146 | Status MakeSparseCSXMatrixFromTensor(SparseMatrixCompressedAxis axis, |
| 147 | const Tensor& tensor, |
| 148 | const std::shared_ptr<DataType>& index_value_type, |
| 149 | MemoryPool* pool, |
| 150 | std::shared_ptr<SparseIndex>* out_sparse_index, |
| 151 | std::shared_ptr<Buffer>* out_data) { |
| 152 | SparseCSXMatrixConverter converter(axis, tensor, index_value_type, pool); |
| 153 | RETURN_NOT_OK(converter.Convert()); |
| 154 | |
| 155 | *out_sparse_index = converter.sparse_index; |
| 156 | *out_data = converter.data; |
| 157 | return Status::OK(); |
| 158 | } |
| 159 | |
| 160 | namespace { |
| 161 |
no test coverage detected