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