MCPcopy Create free account
hub / github.com/NVIDIA/MatX / SetSparseDataImpl

Function SetSparseDataImpl

include/matx/core/sparse_tensor.h:140–149  ·  view source on GitHub ↗

Sets sparse data in tensor_impl_t. This method must be called every time changes are made to the underlying storage objects.

Source from the content-addressed store, hash-verified

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>

Callers 1

sparse_tensor_tClass · 0.85

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected