15 std::vector<ITensorHandle*> inputs,
16 std::vector<ITensorHandle*> outputs)
20 std::unique_ptr<Encoder<float>> encoderPtr = MakeEncoder<float>(outputInfo0, outputs[0]->
Map());
23 for (
unsigned int index = 0 ; index < outputInfo0.
GetNumElements(); ++index)
27 unsigned int indexRemainder = index;
32 dimensionStride /= outputInfo0.
GetShape()[i];
33 indices[i] = indexRemainder / dimensionStride;
34 indexRemainder -= indices[i] * dimensionStride;
37 for (
unsigned int viewIdx = 0; viewIdx < data.
m_ViewOrigins.size(); ++viewIdx)
45 "The number of output dimensions does not match the number of input dimensions.");
48 bool insideView =
true;
63 std::unique_ptr<Decoder<float>> decoderPtr =
64 MakeDecoder<float>(inputInfo,inputs[viewIdx]->
Map());
66 unsigned int inIndex = 0;
67 unsigned int dimensionStride = 1;
71 inIndex += dimensionStride * (indices[i] - view.
m_Origin[i]);
72 dimensionStride *= inputInfo.
GetShape()[i];
75 encoder.
Set(decoder.
Get());