mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-02-23 18:20:47 +08:00
Remove dead code in selfadjoint_matrix_vector_product
This commit is contained in:
parent
c2d68b984f
commit
041e038fef
@ -30,7 +30,7 @@ struct selfadjoint_matrix_vector_product
|
||||
static EIGEN_DONT_INLINE void run(
|
||||
Index size,
|
||||
const Scalar* lhs, Index lhsStride,
|
||||
const Scalar* _rhs, Index rhsIncr,
|
||||
const Scalar* rhs,
|
||||
Scalar* res,
|
||||
Scalar alpha);
|
||||
};
|
||||
@ -39,7 +39,7 @@ template<typename Scalar, typename Index, int StorageOrder, int UpLo, bool Conju
|
||||
EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrder,UpLo,ConjugateLhs,ConjugateRhs,Version>::run(
|
||||
Index size,
|
||||
const Scalar* lhs, Index lhsStride,
|
||||
const Scalar* _rhs, Index rhsIncr,
|
||||
const Scalar* rhs,
|
||||
Scalar* res,
|
||||
Scalar alpha)
|
||||
{
|
||||
@ -62,16 +62,6 @@ EIGEN_DONT_INLINE void selfadjoint_matrix_vector_product<Scalar,Index,StorageOrd
|
||||
|
||||
Scalar cjAlpha = ConjugateRhs ? numext::conj(alpha) : alpha;
|
||||
|
||||
// FIXME this copy is now handled outside product_selfadjoint_vector, so it could probably be removed.
|
||||
// if the rhs is not sequentially stored in memory we copy it to a temporary buffer,
|
||||
// this is because we need to extract packets
|
||||
ei_declare_aligned_stack_constructed_variable(Scalar,rhs,size,rhsIncr==1 ? const_cast<Scalar*>(_rhs) : 0);
|
||||
if (rhsIncr!=1)
|
||||
{
|
||||
const Scalar* it = _rhs;
|
||||
for (Index i=0; i<size; ++i, it+=rhsIncr)
|
||||
rhs[i] = *it;
|
||||
}
|
||||
|
||||
Index bound = (std::max)(Index(0),size-8) & 0xfffffffe;
|
||||
if (FirstTriangular)
|
||||
@ -237,7 +227,7 @@ struct selfadjoint_product_impl<Lhs,LhsMode,false,Rhs,0,true>
|
||||
(
|
||||
lhs.rows(), // size
|
||||
&lhs.coeffRef(0,0), lhs.outerStride(), // lhs info
|
||||
actualRhsPtr, 1, // rhs info
|
||||
actualRhsPtr, // rhs info
|
||||
actualDestPtr, // result info
|
||||
actualAlpha // scale factor
|
||||
);
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
int EIGEN_BLAS_FUNC(hemv)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa, int *lda, RealScalar *px, int *incx, RealScalar *pbeta, RealScalar *py, int *incy)
|
||||
{
|
||||
typedef void (*functype)(int, const Scalar*, int, const Scalar*, int, Scalar*, Scalar);
|
||||
typedef void (*functype)(int, const Scalar*, int, const Scalar*, Scalar*, Scalar);
|
||||
static functype func[2];
|
||||
|
||||
static bool init = false;
|
||||
@ -67,7 +67,7 @@ int EIGEN_BLAS_FUNC(hemv)(char *uplo, int *n, RealScalar *palpha, RealScalar *pa
|
||||
if(code>=2 || func[code]==0)
|
||||
return 0;
|
||||
|
||||
func[code](*n, a, *lda, actual_x, 1, actual_y, alpha);
|
||||
func[code](*n, a, *lda, actual_x, actual_y, alpha);
|
||||
}
|
||||
|
||||
if(actual_x!=x) delete[] actual_x;
|
||||
|
@ -12,7 +12,7 @@
|
||||
// y = alpha*A*x + beta*y
|
||||
int EIGEN_BLAS_FUNC(symv) (char *uplo, int *n, RealScalar *palpha, RealScalar *pa, int *lda, RealScalar *px, int *incx, RealScalar *pbeta, RealScalar *py, int *incy)
|
||||
{
|
||||
typedef void (*functype)(int, const Scalar*, int, const Scalar*, int, Scalar*, Scalar);
|
||||
typedef void (*functype)(int, const Scalar*, int, const Scalar*, Scalar*, Scalar);
|
||||
static functype func[2];
|
||||
|
||||
static bool init = false;
|
||||
@ -59,7 +59,7 @@ int EIGEN_BLAS_FUNC(symv) (char *uplo, int *n, RealScalar *palpha, RealScalar *p
|
||||
if(code>=2 || func[code]==0)
|
||||
return 0;
|
||||
|
||||
func[code](*n, a, *lda, actual_x, 1, actual_y, alpha);
|
||||
func[code](*n, a, *lda, actual_x, actual_y, alpha);
|
||||
|
||||
if(actual_x!=x) delete[] actual_x;
|
||||
if(actual_y!=y) delete[] copy_back(actual_y,y,*n,*incy);
|
||||
|
Loading…
Reference in New Issue
Block a user