Sets sparse data in tensor_impl_t. This method must be called every time changes are made to the underlying storage objects.
| 138 | // Sets sparse data in tensor_impl_t. This method must be called |
| 139 | // every time changes are made to the underlying storage objects. |
| 140 | void SetSparseDataImpl() { |
| 141 | VAL *v = values_.data(); |
| 142 | CRD *c[LVL]; |
| 143 | POS *p[LVL]; |
| 144 | for (int l = 0; l < LVL; l++) { |
| 145 | c[l] = coordinates_[l].data(); |
| 146 | p[l] = positions_[l].data(); |
| 147 | } |
| 148 | this->SetSparseData(v, c, p); |
| 149 | } |
| 150 | |
| 151 | // A direct sparse tensor assignment (viz. (Acoo = ...).exec();). |
| 152 | template <typename T> |