mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-16 05:35:57 +08:00
Fix MSVC+CUDA issues.
(cherry picked from commit 5ed7a86ae96d411c450fb190f5a725f38f2aea9d)
This commit is contained in:
parent
86d958e8f2
commit
af912a7b5c
@ -324,9 +324,9 @@ template<typename Derived> class DenseBase
|
|||||||
typedef Transpose<Derived> TransposeReturnType;
|
typedef Transpose<Derived> TransposeReturnType;
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
TransposeReturnType transpose();
|
TransposeReturnType transpose();
|
||||||
typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
|
typedef Transpose<const Derived> ConstTransposeReturnType;
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
ConstTransposeReturnType transpose() const;
|
const ConstTransposeReturnType transpose() const;
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
void transposeInPlace();
|
void transposeInPlace();
|
||||||
|
|
||||||
|
@ -210,18 +210,18 @@ MatrixBase<Derived>::diagonal() const
|
|||||||
*
|
*
|
||||||
* \sa MatrixBase::diagonal(), class Diagonal */
|
* \sa MatrixBase::diagonal(), class Diagonal */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_DEVICE_FUNC inline typename MatrixBase<Derived>::DiagonalDynamicIndexReturnType
|
EIGEN_DEVICE_FUNC inline Diagonal<Derived, DynamicIndex>
|
||||||
MatrixBase<Derived>::diagonal(Index index)
|
MatrixBase<Derived>::diagonal(Index index)
|
||||||
{
|
{
|
||||||
return DiagonalDynamicIndexReturnType(derived(), index);
|
return Diagonal<Derived, DynamicIndex>(derived(), index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is the const version of diagonal(Index). */
|
/** This is the const version of diagonal(Index). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_DEVICE_FUNC inline const typename MatrixBase<Derived>::ConstDiagonalDynamicIndexReturnType
|
EIGEN_DEVICE_FUNC inline const Diagonal<const Derived, DynamicIndex>
|
||||||
MatrixBase<Derived>::diagonal(Index index) const
|
MatrixBase<Derived>::diagonal(Index index) const
|
||||||
{
|
{
|
||||||
return ConstDiagonalDynamicIndexReturnType(derived(), index);
|
return Diagonal<const Derived, DynamicIndex>(derived(), index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the \a DiagIndex-th sub or super diagonal of the matrix \c *this
|
/** \returns an expression of the \a DiagIndex-th sub or super diagonal of the matrix \c *this
|
||||||
@ -238,20 +238,20 @@ MatrixBase<Derived>::diagonal(Index index) const
|
|||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<int Index_>
|
template<int Index_>
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
inline typename MatrixBase<Derived>::template DiagonalIndexReturnType<Index_>::Type
|
inline Diagonal<Derived, Index_>
|
||||||
MatrixBase<Derived>::diagonal()
|
MatrixBase<Derived>::diagonal()
|
||||||
{
|
{
|
||||||
return typename DiagonalIndexReturnType<Index_>::Type(derived());
|
return Diagonal<Derived, Index_>(derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is the const version of diagonal<int>(). */
|
/** This is the const version of diagonal<int>(). */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
template<int Index_>
|
template<int Index_>
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
inline typename MatrixBase<Derived>::template ConstDiagonalIndexReturnType<Index_>::Type
|
inline const Diagonal<const Derived, Index_>
|
||||||
MatrixBase<Derived>::diagonal() const
|
MatrixBase<Derived>::diagonal() const
|
||||||
{
|
{
|
||||||
return typename ConstDiagonalIndexReturnType<Index_>::Type(derived());
|
return Diagonal<const Derived, Index_>(derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
@ -206,28 +206,22 @@ template<typename Derived> class MatrixBase
|
|||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
DiagonalReturnType diagonal();
|
DiagonalReturnType diagonal();
|
||||||
|
|
||||||
typedef typename internal::add_const<Diagonal<const Derived> >::type ConstDiagonalReturnType;
|
typedef Diagonal<const Derived> ConstDiagonalReturnType;
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
ConstDiagonalReturnType diagonal() const;
|
const ConstDiagonalReturnType diagonal() const;
|
||||||
|
|
||||||
template<int Index> struct DiagonalIndexReturnType { typedef Diagonal<Derived,Index> Type; };
|
|
||||||
template<int Index> struct ConstDiagonalIndexReturnType { typedef const Diagonal<const Derived,Index> Type; };
|
|
||||||
|
|
||||||
template<int Index>
|
template<int Index>
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
typename DiagonalIndexReturnType<Index>::Type diagonal();
|
Diagonal<Derived, Index> diagonal();
|
||||||
|
|
||||||
template<int Index>
|
template<int Index>
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
typename ConstDiagonalIndexReturnType<Index>::Type diagonal() const;
|
const Diagonal<const Derived, Index> diagonal() const;
|
||||||
|
|
||||||
typedef Diagonal<Derived,DynamicIndex> DiagonalDynamicIndexReturnType;
|
|
||||||
typedef typename internal::add_const<Diagonal<const Derived,DynamicIndex> >::type ConstDiagonalDynamicIndexReturnType;
|
|
||||||
|
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
DiagonalDynamicIndexReturnType diagonal(Index index);
|
Diagonal<Derived, DynamicIndex> diagonal(Index index);
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
ConstDiagonalDynamicIndexReturnType diagonal(Index index) const;
|
const Diagonal<const Derived, DynamicIndex> diagonal(Index index) const;
|
||||||
|
|
||||||
template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };
|
template<unsigned int Mode> struct TriangularViewReturnType { typedef TriangularView<Derived, Mode> Type; };
|
||||||
template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };
|
template<unsigned int Mode> struct ConstTriangularViewReturnType { typedef const TriangularView<const Derived, Mode> Type; };
|
||||||
|
@ -110,7 +110,7 @@ class SolverBase : public EigenBase<Derived>
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** \internal the return type of transpose() */
|
/** \internal the return type of transpose() */
|
||||||
typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
|
typedef Transpose<const Derived> ConstTransposeReturnType;
|
||||||
/** \returns an expression of the transposed of the factored matrix.
|
/** \returns an expression of the transposed of the factored matrix.
|
||||||
*
|
*
|
||||||
* A typical usage is to solve for the transposed problem A^T x = b:
|
* A typical usage is to solve for the transposed problem A^T x = b:
|
||||||
@ -118,16 +118,16 @@ class SolverBase : public EigenBase<Derived>
|
|||||||
*
|
*
|
||||||
* \sa adjoint(), solve()
|
* \sa adjoint(), solve()
|
||||||
*/
|
*/
|
||||||
inline ConstTransposeReturnType transpose() const
|
inline const ConstTransposeReturnType transpose() const
|
||||||
{
|
{
|
||||||
return ConstTransposeReturnType(derived());
|
return ConstTransposeReturnType(derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \internal the return type of adjoint() */
|
/** \internal the return type of adjoint() */
|
||||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||||
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, ConstTransposeReturnType>,
|
CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const ConstTransposeReturnType>,
|
||||||
ConstTransposeReturnType
|
const ConstTransposeReturnType
|
||||||
>::type AdjointReturnType;
|
>::type AdjointReturnType;
|
||||||
/** \returns an expression of the adjoint of the factored matrix
|
/** \returns an expression of the adjoint of the factored matrix
|
||||||
*
|
*
|
||||||
* A typical usage is to solve for the adjoint problem A' x = b:
|
* A typical usage is to solve for the adjoint problem A' x = b:
|
||||||
@ -137,7 +137,7 @@ class SolverBase : public EigenBase<Derived>
|
|||||||
*
|
*
|
||||||
* \sa transpose(), solve()
|
* \sa transpose(), solve()
|
||||||
*/
|
*/
|
||||||
inline AdjointReturnType adjoint() const
|
inline const AdjointReturnType adjoint() const
|
||||||
{
|
{
|
||||||
return AdjointReturnType(derived().transpose());
|
return AdjointReturnType(derived().transpose());
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ template<typename MatrixType> class TransposeImpl<MatrixType,Dense>
|
|||||||
* \sa transposeInPlace(), adjoint() */
|
* \sa transposeInPlace(), adjoint() */
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||||
Transpose<Derived>
|
typename DenseBase<Derived>::TransposeReturnType
|
||||||
DenseBase<Derived>::transpose()
|
DenseBase<Derived>::transpose()
|
||||||
{
|
{
|
||||||
return TransposeReturnType(derived());
|
return TransposeReturnType(derived());
|
||||||
|
@ -113,7 +113,7 @@ template<typename Derived> class SparseMatrixBase
|
|||||||
Transpose<const Derived>
|
Transpose<const Derived>
|
||||||
>::type AdjointReturnType;
|
>::type AdjointReturnType;
|
||||||
typedef Transpose<Derived> TransposeReturnType;
|
typedef Transpose<Derived> TransposeReturnType;
|
||||||
typedef typename internal::add_const<Transpose<const Derived> >::type ConstTransposeReturnType;
|
typedef Transpose<const Derived> ConstTransposeReturnType;
|
||||||
|
|
||||||
// FIXME storage order do not match evaluator storage order
|
// FIXME storage order do not match evaluator storage order
|
||||||
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor, StorageIndex> PlainObject;
|
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor, StorageIndex> PlainObject;
|
||||||
|
@ -242,7 +242,7 @@ class TensorBlockDescriptor {
|
|||||||
const DestinationBufferKind& kind() const { return m_kind; }
|
const DestinationBufferKind& kind() const { return m_kind; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class TensorBlockDescriptor;
|
friend class TensorBlockDescriptor<NumDims, IndexType>;
|
||||||
|
|
||||||
DestinationBuffer() : m_data(NULL), m_data_type_size(0), m_kind(kEmpty) {}
|
DestinationBuffer() : m_data(NULL), m_data_type_size(0), m_kind(kEmpty) {}
|
||||||
|
|
||||||
@ -706,7 +706,7 @@ class TensorMaterializedBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class TensorMaterializedBlock;
|
friend class TensorMaterializedBlock<Scalar, NumDims, Layout, IndexType>;
|
||||||
|
|
||||||
Storage(Scalar* data, const Dimensions& dimensions,
|
Storage(Scalar* data, const Dimensions& dimensions,
|
||||||
const Dimensions& strides, bool materialized_in_output,
|
const Dimensions& strides, bool materialized_in_output,
|
||||||
|
@ -233,7 +233,7 @@ EigenContractionKernelInternal(const LhsMapper lhs, const RhsMapper rhs,
|
|||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
|
||||||
#define writeRegToShmem(_) \
|
#define writeRegToShmem() \
|
||||||
lhs_shmem[lhs_store_idx_0] = lhs_pf0; \
|
lhs_shmem[lhs_store_idx_0] = lhs_pf0; \
|
||||||
rhs_shmem[rhs_store_idx_0] = rhs_pf0; \
|
rhs_shmem[rhs_store_idx_0] = rhs_pf0; \
|
||||||
\
|
\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user