33 std::vector<uint32_t> outDims(targetDimsSize);
34 int32_t numOutputElements = 1;
35 int32_t strechDim = -1;
36 for (int32_t i = 0; i < targetDimsSize; ++i)
38 int32_t value = targetDims[i];
46 numOutputElements *= value;
47 outDims[i] = (uint32_t)value;
52 int32_t strechValue = numInputElements / numOutputElements;
53 outDims[strechDim] = (uint32_t)strechValue;
54 numOutputElements *= strechValue;
57 ASSERT(numInputElements == numOutputElements);
59 output->type = input.type;
60 output->dimensions = outDims;
61 output->offset = input.offset;
62 output->scale = input.scale;