18 for (
unsigned int i = 0; i < numElements; ++i)
20 switch (OutputDataType)
28 out.
Set(std::floor(in.
Get()));
41 for (
unsigned int i = 0; i < numElements; ++i)
53 for (
unsigned int i = 0; i < numElements; ++i)
55 out.
Set(
static_cast<float>(in.
Get()));
85 if (inputTensorInfo.IsQuantized())
87 inputTensorInfo.SetQuantizationScale(1.0f);
88 inputTensorInfo.SetQuantizationOffset(0);
90 if (outputTensorInfo.IsQuantized())
92 outputTensorInfo.SetQuantizationScale(1.0f);
93 outputTensorInfo.SetQuantizationOffset(0);
98 Cast(*MakeDecoder<double_t>(inputTensorInfo, inputs[0]->
Map()),
99 *MakeEncoder<float>(outputTensorInfo, outputs[0]->
Map()),
100 inputTensorInfo.GetNumElements(),
101 outputTensorInfo.GetDataType());
105 Cast(*MakeDecoder<float>(inputTensorInfo, inputs[0]->
Map()),
106 *MakeEncoder<double_t>(outputTensorInfo, outputs[0]->
Map()),
107 inputTensorInfo.GetNumElements(),
108 outputTensorInfo.GetDataType());
112 Cast(*MakeDecoder<float>(inputTensorInfo, inputs[0]->
Map()),
113 *MakeEncoder<float>(outputTensorInfo, outputs[0]->
Map()),
114 inputTensorInfo.GetNumElements(),
115 outputTensorInfo.GetDataType());