mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 06:43:13 +08:00
Put deadcode checks back in from previous change.
This commit is contained in:
parent
6c58f0fe1f
commit
23e1541863
@ -185,7 +185,9 @@ void colLoopBody(Index& col, Index depth, Index cols, Index rows, const Packet4f
|
|||||||
template<const Index num_acc, const Index num_packets, bool rhsExtraCols, bool lhsExtraRows>
|
template<const Index num_acc, const Index num_packets, bool rhsExtraCols, bool lhsExtraRows>
|
||||||
EIGEN_ALWAYS_INLINE void colLoopBodyExtraN(Index col, Index depth, Index cols, Index rows, const Packet4f pAlpha, const bfloat16* indexA, const bfloat16* blockB, Index strideB, Index offsetB, float* result)
|
EIGEN_ALWAYS_INLINE void colLoopBodyExtraN(Index col, Index depth, Index cols, Index rows, const Packet4f pAlpha, const bfloat16* indexA, const bfloat16* blockB, Index strideB, Index offsetB, float* result)
|
||||||
{
|
{
|
||||||
|
if (MAX_BFLOAT16_ACC > num_acc) {
|
||||||
colLoopBody<num_acc + (rhsExtraCols ? 1 : 0), num_packets, rhsExtraCols, lhsExtraRows>(col, depth, cols, rows, pAlpha, indexA, blockB, strideB, offsetB, result);
|
colLoopBody<num_acc + (rhsExtraCols ? 1 : 0), num_packets, rhsExtraCols, lhsExtraRows>(col, depth, cols, rows, pAlpha, indexA, blockB, strideB, offsetB, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<const Index num_packets, bool rhsExtraCols, bool lhsExtraRows>
|
template<const Index num_packets, bool rhsExtraCols, bool lhsExtraRows>
|
||||||
@ -585,7 +587,9 @@ void colVecColLoopBody(Index& row, Index cend, Index rows, LhsMapper& lhs, RhsMa
|
|||||||
template<const Index num_acc, typename LhsMapper, typename RhsMapper, bool extraRows>
|
template<const Index num_acc, typename LhsMapper, typename RhsMapper, bool extraRows>
|
||||||
EIGEN_ALWAYS_INLINE void colVecColLoopBodyExtraN(Index& row, Index cend, Index rows, LhsMapper& lhs, RhsMapper& rhs, const Packet4f pAlpha, float *result)
|
EIGEN_ALWAYS_INLINE void colVecColLoopBodyExtraN(Index& row, Index cend, Index rows, LhsMapper& lhs, RhsMapper& rhs, const Packet4f pAlpha, float *result)
|
||||||
{
|
{
|
||||||
|
if (MAX_BFLOAT16_VEC_ACC > num_acc) {
|
||||||
colVecColLoopBody<num_acc + (extraRows ? 1 : 0), LhsMapper, RhsMapper, extraRows>(row, cend, rows, lhs, rhs, pAlpha, result);
|
colVecColLoopBody<num_acc + (extraRows ? 1 : 0), LhsMapper, RhsMapper, extraRows>(row, cend, rows, lhs, rhs, pAlpha, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename LhsMapper, typename RhsMapper, bool extraRows>
|
template<typename LhsMapper, typename RhsMapper, bool extraRows>
|
||||||
@ -798,30 +802,38 @@ void colVecLoopBody(Index& row, Index cols, Index rows, LhsMapper& lhs, RhsMappe
|
|||||||
} while(multiIters && (num_acc <= rows - (row += num_acc)));
|
} while(multiIters && (num_acc <= rows - (row += num_acc)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<const Index num_acc, typename LhsMapper, typename RhsMapper>
|
||||||
|
EIGEN_ALWAYS_INLINE void colVecLoopBodyExtraN(Index& row, Index cols, Index rows, LhsMapper& lhs, RhsMapper& rhs, const Packet4f pAlpha, float *result)
|
||||||
|
{
|
||||||
|
if (MAX_BFLOAT16_VEC_ACC > num_acc) {
|
||||||
|
colVecLoopBody<num_acc, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template<typename LhsMapper, typename RhsMapper>
|
template<typename LhsMapper, typename RhsMapper>
|
||||||
EIGEN_ALWAYS_INLINE void colVecLoopBodyExtra(Index& row, Index cols, Index rows, LhsMapper& lhs, RhsMapper& rhs, const Packet4f pAlpha, float *result)
|
EIGEN_ALWAYS_INLINE void colVecLoopBodyExtra(Index& row, Index cols, Index rows, LhsMapper& lhs, RhsMapper& rhs, const Packet4f pAlpha, float *result)
|
||||||
{
|
{
|
||||||
switch (rows - row) {
|
switch (rows - row) {
|
||||||
case 7:
|
case 7:
|
||||||
colVecLoopBody<7, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<7, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
colVecLoopBody<6, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<6, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
colVecLoopBody<5, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<5, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
colVecLoopBody<4, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<4, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
colVecLoopBody<3, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<3, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
colVecLoopBody<2, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<2, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
colVecLoopBody<1, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
colVecLoopBodyExtraN<1, LhsMapper, RhsMapper>(row, cols, rows, lhs, rhs, pAlpha, result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user