22 std::vector<ITensorHandle*> inputs,
23 std::vector<ITensorHandle*> outputs)
27 std::unique_ptr<Decoder<float>> decoderPtr =
28 MakeDecoder<float>(inputInfo, inputs[0]->
Map());
31 for (
unsigned int index = 0; index < inputInfo.
GetNumElements(); ++index)
35 unsigned int indexRemainder = index;
40 dimensionStride /= inputInfo.
GetShape()[i];
41 indices[i] = indexRemainder / dimensionStride;
42 indexRemainder -= indices[i] * dimensionStride;
45 for (
unsigned int viewIdx = 0; viewIdx < data.
m_ViewOrigins.size(); ++viewIdx)
54 bool insideView =
true;
69 std::unique_ptr<Encoder<float>> encoderPtr =
70 MakeEncoder<float>(outputInfo, outputs[viewIdx]->
Map());
73 unsigned int outIndex = 0;
74 unsigned int dimensionStride = 1;
75 float inputValue = 0.f;
79 outIndex += dimensionStride * (indices[i] - view.
m_Origin[i]);
80 dimensionStride *= outputInfo.
GetShape()[i];
84 inputValue = decoder.
Get();
88 encoder.
Set(inputValue);