21 std::vector<ITensorHandle*> inputs,
22 std::vector<ITensorHandle*> outputs)
26 std::unique_ptr<Decoder<float>> decoderPtr =
27 MakeDecoder<float>(inputInfo, inputs[0]->
Map());
30 for (
unsigned int index = 0; index < inputInfo.
GetNumElements(); ++index)
34 unsigned int indexRemainder = index;
39 dimensionStride /= inputInfo.
GetShape()[i];
40 indices[i] = indexRemainder / dimensionStride;
41 indexRemainder -= indices[i] * dimensionStride;
44 for (
unsigned int viewIdx = 0; viewIdx < data.
m_ViewOrigins.size(); ++viewIdx)
52 "The number of output dimensions does not match the number of input dimensions.");
55 bool insideView =
true;
70 std::unique_ptr<Encoder<float>> encoderPtr =
71 MakeEncoder<float>(outputInfo, outputs[viewIdx]->
Map());
74 unsigned int outIndex = 0;
75 unsigned int dimensionStride = 1;
76 float inputValue = 0.f;
80 outIndex += dimensionStride * (indices[i] - view.
m_Origin[i]);
81 dimensionStride *= outputInfo.
GetShape()[i];
85 inputValue = decoder.
Get();
89 encoder.
Set(inputValue);