mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
stride() => inner/outerStride()
This commit is contained in:
parent
4402034678
commit
1958b7eccc
@ -336,7 +336,7 @@ template<> struct ei_gemv_selector<OnTheRight,ColMajor,true>
|
||||
ei_cache_friendly_product_colmajor_times_vector
|
||||
<LhsBlasTraits::NeedToConjugate,RhsBlasTraits::NeedToConjugate>(
|
||||
dest.size(),
|
||||
&actualLhs.const_cast_derived().coeffRef(0,0), actualLhs.stride(),
|
||||
&actualLhs.const_cast_derived().coeffRef(0,0), actualLhs.outerStride(),
|
||||
actualRhs, actualDest, actualAlpha);
|
||||
|
||||
if (!EvalToDest)
|
||||
@ -381,7 +381,7 @@ template<> struct ei_gemv_selector<OnTheRight,RowMajor,true>
|
||||
|
||||
ei_cache_friendly_product_rowmajor_times_vector
|
||||
<LhsBlasTraits::NeedToConjugate,RhsBlasTraits::NeedToConjugate>(
|
||||
&actualLhs.const_cast_derived().coeffRef(0,0), actualLhs.stride(),
|
||||
&actualLhs.const_cast_derived().coeffRef(0,0), actualLhs.outerStride(),
|
||||
rhs_data, prod.rhs().size(), dest, actualAlpha);
|
||||
|
||||
if (!DirectlyUseRhs) ei_aligned_stack_delete(Scalar, rhs_data, prod.rhs().size());
|
||||
|
@ -82,7 +82,7 @@ struct ei_triangular_solver_selector<Lhs,Rhs,OnTheLeft,Mode,NoUnrolling,RowMajor
|
||||
VectorBlock<Rhs,Dynamic> target(other,startRow,actualPanelWidth);
|
||||
|
||||
ei_cache_friendly_product_rowmajor_times_vector<LhsProductTraits::NeedToConjugate,false>(
|
||||
&(actualLhs.const_cast_derived().coeffRef(startRow,startCol)), actualLhs.stride(),
|
||||
&(actualLhs.const_cast_derived().coeffRef(startRow,startCol)), actualLhs.outerStride(),
|
||||
&(other.coeffRef(startCol)), r,
|
||||
target, Scalar(-1));
|
||||
}
|
||||
@ -147,7 +147,7 @@ struct ei_triangular_solver_selector<Lhs,Rhs,OnTheLeft,Mode,NoUnrolling,ColMajor
|
||||
// 2 - it is slighlty faster at runtime
|
||||
ei_cache_friendly_product_colmajor_times_vector<LhsProductTraits::NeedToConjugate,false>(
|
||||
r,
|
||||
&(actualLhs.const_cast_derived().coeffRef(endBlock,startBlock)), actualLhs.stride(),
|
||||
&(actualLhs.const_cast_derived().coeffRef(endBlock,startBlock)), actualLhs.outerStride(),
|
||||
other.segment(startBlock, actualPanelWidth),
|
||||
&(other.coeffRef(endBlock, 0)),
|
||||
Scalar(-1));
|
||||
@ -183,7 +183,7 @@ struct ei_triangular_solver_selector<Lhs,Rhs,Side,Mode,NoUnrolling,StorageOrder,
|
||||
const ActualLhsType actualLhs = LhsProductTraits::extract(lhs);
|
||||
ei_triangular_solve_matrix<Scalar,Side,Mode,LhsProductTraits::NeedToConjugate,StorageOrder,
|
||||
(Rhs::Flags&RowMajorBit) ? RowMajor : ColMajor>
|
||||
::run(lhs.rows(), Side==OnTheLeft? rhs.cols() : rhs.rows(), &actualLhs.coeff(0,0), actualLhs.stride(), &rhs.coeffRef(0,0), rhs.stride());
|
||||
::run(lhs.rows(), Side==OnTheLeft? rhs.cols() : rhs.rows(), &actualLhs.coeff(0,0), actualLhs.outerStride(), &rhs.coeffRef(0,0), rhs.outerStride());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -229,9 +229,9 @@ struct ei_gemm_functor
|
||||
if(cols==-1)
|
||||
cols = m_rhs.cols();
|
||||
Gemm::run(rows, cols, m_lhs.cols(),
|
||||
(const Scalar*)&(m_lhs.const_cast_derived().coeffRef(row,0)), m_lhs.stride(),
|
||||
(const Scalar*)&(m_rhs.const_cast_derived().coeffRef(0,col)), m_rhs.stride(),
|
||||
(Scalar*)&(m_dest.coeffRef(row,col)), m_dest.stride(),
|
||||
(const Scalar*)&(m_lhs.const_cast_derived().coeffRef(row,0)), m_lhs.outerStride(),
|
||||
(const Scalar*)&(m_rhs.const_cast_derived().coeffRef(0,col)), m_rhs.outerStride(),
|
||||
(Scalar*)&(m_dest.coeffRef(row,col)), m_dest.outerStride(),
|
||||
m_actualAlpha,
|
||||
info);
|
||||
}
|
||||
|
@ -415,11 +415,11 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,RhsMode,false>
|
||||
NumTraits<Scalar>::IsComplex && EIGEN_LOGICAL_XOR(RhsIsUpper,bool(RhsBlasTraits::NeedToConjugate)),
|
||||
ei_traits<Dest>::Flags&RowMajorBit ? RowMajor : ColMajor>
|
||||
::run(
|
||||
lhs.rows(), rhs.cols(), // sizes
|
||||
&lhs.coeff(0,0), lhs.stride(), // lhs info
|
||||
&rhs.coeff(0,0), rhs.stride(), // rhs info
|
||||
&dst.coeffRef(0,0), dst.stride(), // result info
|
||||
actualAlpha // alpha
|
||||
lhs.rows(), rhs.cols(), // sizes
|
||||
&lhs.coeff(0,0), lhs.outerStride(), // lhs info
|
||||
&rhs.coeff(0,0), rhs.outerStride(), // rhs info
|
||||
&dst.coeffRef(0,0), dst.outerStride(), // result info
|
||||
actualAlpha // alpha
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -185,14 +185,14 @@ struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true>
|
||||
Scalar actualAlpha = alpha * LhsBlasTraits::extractScalarFactor(m_lhs)
|
||||
* RhsBlasTraits::extractScalarFactor(m_rhs);
|
||||
|
||||
ei_assert(dst.stride()==1 && "not implemented yet");
|
||||
ei_assert(dst.innerStride()==1 && "not implemented yet");
|
||||
ei_product_selfadjoint_vector<Scalar, (ei_traits<_ActualLhsType>::Flags&RowMajorBit) ? RowMajor : ColMajor, int(LhsUpLo), bool(LhsBlasTraits::NeedToConjugate), bool(RhsBlasTraits::NeedToConjugate)>
|
||||
(
|
||||
lhs.rows(), // size
|
||||
&lhs.coeff(0,0), lhs.stride(), // lhs info
|
||||
&rhs.coeff(0), rhs.stride(), // rhs info
|
||||
&dst.coeffRef(0), // result info
|
||||
actualAlpha // scale factor
|
||||
lhs.rows(), // size
|
||||
&lhs.coeff(0,0), lhs.innerStride(), // lhs info
|
||||
&rhs.coeff(0), rhs.innerStride(), // rhs info
|
||||
&dst.coeffRef(0), // result info
|
||||
actualAlpha // scale factor
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -142,8 +142,8 @@ SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo>
|
||||
_ActualUType::Flags&RowMajorBit ? RowMajor : ColMajor,
|
||||
ei_traits<MatrixType>::Flags&RowMajorBit ? RowMajor : ColMajor,
|
||||
!UBlasTraits::NeedToConjugate, UpLo>
|
||||
::run(_expression().cols(), actualU.cols(), &actualU.coeff(0,0), actualU.stride(),
|
||||
const_cast<Scalar*>(_expression().data()), _expression().stride(), actualAlpha);
|
||||
::run(_expression().cols(), actualU.cols(), &actualU.coeff(0,0), actualU.outerStride(),
|
||||
const_cast<Scalar*>(_expression().data()), _expression().outerStride(), actualAlpha);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ SelfAdjointView<MatrixType,UpLo>& SelfAdjointView<MatrixType,UpLo>
|
||||
typename ei_cleantype<typename ei_conj_expr_if<IsRowMajor ^ UBlasTraits::NeedToConjugate,_ActualUType>::ret>::type,
|
||||
typename ei_cleantype<typename ei_conj_expr_if<IsRowMajor ^ VBlasTraits::NeedToConjugate,_ActualVType>::ret>::type,
|
||||
(IsRowMajor ? int(UpLo==Upper ? Lower : Upper) : UpLo)>
|
||||
::run(const_cast<Scalar*>(_expression().data()),_expression().stride(),actualU,actualV,actualAlpha);
|
||||
::run(const_cast<Scalar*>(_expression().data()),_expression().outerStride(),actualU,actualV,actualAlpha);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ struct ei_product_triangular_matrix_matrix<Scalar,Mode,true,
|
||||
for (int i=IsLower ? k+1 : 0; IsLower ? i<actualPanelWidth : i<k; ++i)
|
||||
triangularBuffer.coeffRef(i,k) = lhs(startBlock+i,startBlock+k);
|
||||
}
|
||||
pack_lhs(blockA, triangularBuffer.data(), triangularBuffer.stride(), actualPanelWidth, actualPanelWidth);
|
||||
pack_lhs(blockA, triangularBuffer.data(), triangularBuffer.outerStride(), actualPanelWidth, actualPanelWidth);
|
||||
|
||||
gebp_kernel(res+startBlock, resStride, blockA, blockB, actualPanelWidth, actualPanelWidth, cols,
|
||||
actualPanelWidth, actual_kc, 0, blockBOffset);
|
||||
@ -286,7 +286,7 @@ struct ei_product_triangular_matrix_matrix<Scalar,Mode,false,
|
||||
}
|
||||
|
||||
pack_rhs_panel(blockB+j2*actual_kc/**Blocking::PacketSize*/,
|
||||
triangularBuffer.data(), triangularBuffer.stride(), alpha,
|
||||
triangularBuffer.data(), triangularBuffer.outerStride(), alpha,
|
||||
actualPanelWidth, actualPanelWidth,
|
||||
actual_kc, j2);
|
||||
}
|
||||
@ -354,9 +354,9 @@ struct TriangularProduct<Mode,LhsIsTriangular,Lhs,false,Rhs,false>
|
||||
(ei_traits<Dest >::Flags&RowMajorBit) ? RowMajor : ColMajor>
|
||||
::run(
|
||||
lhs.rows(), LhsIsTriangular ? rhs.cols() : lhs.rows(), // sizes
|
||||
&lhs.coeff(0,0), lhs.stride(), // lhs info
|
||||
&rhs.coeff(0,0), rhs.stride(), // rhs info
|
||||
&dst.coeffRef(0,0), dst.stride(), // result info
|
||||
&lhs.coeff(0,0), lhs.outerStride(), // lhs info
|
||||
&rhs.coeff(0,0), rhs.outerStride(), // rhs info
|
||||
&dst.coeffRef(0,0), dst.outerStride(), // result info
|
||||
actualAlpha // alpha
|
||||
);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ struct ei_product_triangular_vector_selector<Lhs,Rhs,Result,Mode,ConjLhs,ConjRhs
|
||||
int s = IsLower ? pi+actualPanelWidth : 0;
|
||||
ei_cache_friendly_product_colmajor_times_vector<ConjLhs,ConjRhs>(
|
||||
r,
|
||||
&(lhs.const_cast_derived().coeffRef(s,pi)), lhs.stride(),
|
||||
&(lhs.const_cast_derived().coeffRef(s,pi)), lhs.outerStride(),
|
||||
rhs.segment(pi, actualPanelWidth),
|
||||
&(res.coeffRef(s)),
|
||||
alpha);
|
||||
@ -105,7 +105,7 @@ struct ei_product_triangular_vector_selector<Lhs,Rhs,Result,Mode,ConjLhs,ConjRhs
|
||||
int s = IsLower ? 0 : pi + actualPanelWidth;
|
||||
Block<Result,Dynamic,1> target(res,pi,0,actualPanelWidth,1);
|
||||
ei_cache_friendly_product_rowmajor_times_vector<ConjLhs,ConjRhs>(
|
||||
&(lhs.const_cast_derived().coeffRef(pi,s)), lhs.stride(),
|
||||
&(lhs.const_cast_derived().coeffRef(pi,s)), lhs.outerStride(),
|
||||
&(rhs.const_cast_derived().coeffRef(s)), r,
|
||||
target, alpha);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user