Follow the suggestions

Signed-off-by: Omar Shrit <omar@avontech.fr>
This commit is contained in:
Omar Shrit
2024-01-27 17:03:59 +01:00
parent af41ad99ab
commit e64481c2e2
3 changed files with 7 additions and 13 deletions
+4 -10
View File
@@ -164,12 +164,9 @@ struct GetColType
};
template<typename MatType>
struct GetUIntColType
struct GetUColType
{
typedef typename MatType::elem_type eT;
typedef typename std::conditional<
std::is_same<eT, arma::uword>::value, eT, arma::uword>::type elem;
typedef arma::Col<elem> type;
typedef arma::Col<arma::uword> type;
};
template<typename eT>
@@ -221,12 +218,9 @@ struct GetDenseMatType
};
template<typename MatType>
struct GetUIntDenseMatType
struct GetUDenseMatType
{
typedef typename MatType::elem_type eT;
typedef typename std::conditional<
std::is_same<eT, arma::uword>::value, eT, arma::uword>::type elem;
typedef arma::Mat<elem> type;
typedef arma::Mat<arma::uword> type;
};
template<typename eT>
+2 -2
View File
@@ -34,8 +34,8 @@ class RepeatType : public Layer<MatType>
{
public:
//! Get Specific Col type, not only arma
typedef typename GetUIntColType<MatType>::type UintCol;
typedef typename GetUIntDenseMatType<MatType>::type UintMat;
typedef typename GetUColType<MatType>::type UintCol;
typedef typename GetUDenseMatType<MatType>::type UintMat;
/**
* Create the Repeat object. Multiples will be empty (e.g. 1s for all
* dimensions), so this is the equivalent of an Identity Layer.
+1 -1
View File
@@ -159,7 +159,7 @@ void RepeatType<MatType>::ComputeOutputDimensions()
UintCol counts(inputSize, arma::fill::zeros);
for (size_t i = 0; i < outIdxs.n_elem; i++)
{
auto r = outIdxs.at(i);
arma::uword r = outIdxs.at(i);
backIdxs.at(r, counts.at(r)++) = i;
}
}