mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Cleanup useless helper: internal::product_result_scalar
This commit is contained in:
parent
101ea26f5e
commit
4e7c3af874
@ -16,40 +16,6 @@ template<typename Lhs, typename Rhs, int Option, typename StorageKind> class Pro
|
|||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
// Determine the scalar of Product<Lhs, Rhs>. This is normally the same as Lhs::Scalar times
|
|
||||||
// Rhs::Scalar, but product with permutation matrices inherit the scalar of the other factor.
|
|
||||||
// TODO: this could be removed once ScalarBinaryOpTraits handles void.
|
|
||||||
template<typename Lhs, typename Rhs, typename LhsShape = typename evaluator_traits<Lhs>::Shape,
|
|
||||||
typename RhsShape = typename evaluator_traits<Rhs>::Shape >
|
|
||||||
struct product_result_scalar
|
|
||||||
{
|
|
||||||
typedef typename ScalarBinaryOpTraits<typename Lhs::Scalar, typename Rhs::Scalar>::ReturnType Scalar;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename Lhs, typename Rhs, typename RhsShape>
|
|
||||||
struct product_result_scalar<Lhs, Rhs, PermutationShape, RhsShape>
|
|
||||||
{
|
|
||||||
typedef typename Rhs::Scalar Scalar;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename Lhs, typename Rhs, typename LhsShape>
|
|
||||||
struct product_result_scalar<Lhs, Rhs, LhsShape, PermutationShape>
|
|
||||||
{
|
|
||||||
typedef typename Lhs::Scalar Scalar;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename Lhs, typename Rhs, typename RhsShape>
|
|
||||||
struct product_result_scalar<Lhs, Rhs, TranspositionsShape, RhsShape>
|
|
||||||
{
|
|
||||||
typedef typename Rhs::Scalar Scalar;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename Lhs, typename Rhs, typename LhsShape>
|
|
||||||
struct product_result_scalar<Lhs, Rhs, LhsShape, TranspositionsShape>
|
|
||||||
{
|
|
||||||
typedef typename Lhs::Scalar Scalar;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename Lhs, typename Rhs, int Option>
|
template<typename Lhs, typename Rhs, int Option>
|
||||||
struct traits<Product<Lhs, Rhs, Option> >
|
struct traits<Product<Lhs, Rhs, Option> >
|
||||||
{
|
{
|
||||||
@ -60,7 +26,7 @@ struct traits<Product<Lhs, Rhs, Option> >
|
|||||||
|
|
||||||
typedef MatrixXpr XprKind;
|
typedef MatrixXpr XprKind;
|
||||||
|
|
||||||
typedef typename product_result_scalar<LhsCleaned,RhsCleaned>::Scalar Scalar;
|
typedef typename ScalarBinaryOpTraits<typename traits<LhsCleaned>::Scalar, typename traits<RhsCleaned>::Scalar>::ReturnType Scalar;
|
||||||
typedef typename product_promote_storage_type<typename LhsTraits::StorageKind,
|
typedef typename product_promote_storage_type<typename LhsTraits::StorageKind,
|
||||||
typename RhsTraits::StorageKind,
|
typename RhsTraits::StorageKind,
|
||||||
internal::product_type<Lhs,Rhs>::ret>::ret StorageKind;
|
internal::product_type<Lhs,Rhs>::ret>::ret StorageKind;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user