16 template <
typename DataType>
18 std::vector<ITensorHandle*> inputs,
19 std::vector<ITensorHandle*> outputs)
23 for (
unsigned int index = 0; index < inputInfo0.
GetNumElements(); ++index)
27 unsigned int indexRemainder = index;
32 dimensionStride /= inputInfo0.
GetShape()[i];
33 indices[i] = indexRemainder / dimensionStride;
34 indexRemainder -= indices[i] * dimensionStride;
37 for (
unsigned int viewIdx = 0; viewIdx < data.
m_ViewOrigins.size(); ++viewIdx)
46 bool insideView =
true;
61 unsigned int outIndex = 0;
62 unsigned int dimensionStride = 1;
66 outIndex += dimensionStride * (indices[i] - view.
m_Origin[i]);
67 dimensionStride *= outputInfo.
GetShape()[i];
71 DataType* outputData = GetOutputTensorData<DataType>(viewIdx, data);
74 const DataType* inputData = GetInputTensorData<DataType>(0, data);
77 outputData[outIndex] = inputData[index];
83 void Split(
const SplitterQueueDescriptor& data,
84 std::vector<ITensorHandle*> inputs,
85 std::vector<ITensorHandle*> outputs);