13 #include <boost/numeric/conversion/cast.hpp> 22 const int32_t* indices,
28 unsigned int paramsProduct = 1;
31 paramsProduct = paramsProduct * paramsShape[i];
34 unsigned int outIndex = 0;
39 BOOST_ASSERT(indices[i] >= 0 && indx < paramsShape[0]);
41 unsigned int startOffset = indx * paramsProduct;
42 unsigned int endOffset = startOffset + paramsProduct;
44 for (
unsigned int j = startOffset; j < endOffset; ++j)
47 float outputValue = params.
Get();
49 output.
Set(outputValue);
const TensorShape & GetShape() const
virtual void Set(IType right)=0
Copyright (c) 2020 ARM Limited.
void IgnoreUnused(Ts &&...)
virtual IType Get() const =0
std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)
void Gather(const TensorInfo ¶msInfo, const TensorInfo &indicesInfo, const TensorInfo &outputInfo, Decoder< float > ¶ms, const int32_t *indices, Encoder< float > &output)
unsigned int GetNumDimensions() const
unsigned int GetNumElements() const