taco
taco copied to clipboard
How to avoid zero initialization of output tensor
Is there a way to avoid zero-initializing a tensor before assigning to it? I want to do something like:
Tensor<double> A({8}, Format{Dense});
Tensor<double> B({3}, Format{Dense});
for (int i = 0; i < 8; i++) {
A.insert({i}, (double)i);
}
for (int i = 0; i < 3; i++) {
B.insert({i}, (double)(90+i));
}
IndexVar i;
A(i(0,3)) = B(i);
where I only overwrite certain rows, leaving the rest intact. But it looks like all of A gets zeroed out.