mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-06 19:10:36 +08:00
Fix the missing CUDA device qualifier
This commit is contained in:
parent
24e0c2a125
commit
7bb8c58e7c
@ -389,8 +389,9 @@ struct AssignmentKind<DenseShape, DiagonalShape> {
|
||||
// Diagonal matrix to Dense assignment
|
||||
template <typename DstXprType, typename SrcXprType, typename Functor>
|
||||
struct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Dense> {
|
||||
static void run(DstXprType& dst, const SrcXprType& src,
|
||||
const internal::assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>& /*func*/) {
|
||||
static EIGEN_DEVICE_FUNC void run(
|
||||
DstXprType& dst, const SrcXprType& src,
|
||||
const internal::assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>& /*func*/) {
|
||||
Index dstRows = src.rows();
|
||||
Index dstCols = src.cols();
|
||||
if ((dst.rows() != dstRows) || (dst.cols() != dstCols)) dst.resize(dstRows, dstCols);
|
||||
@ -399,13 +400,15 @@ struct Assignment<DstXprType, SrcXprType, Functor, Diagonal2Dense> {
|
||||
dst.diagonal() = src.diagonal();
|
||||
}
|
||||
|
||||
static void run(DstXprType& dst, const SrcXprType& src,
|
||||
const internal::add_assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>& /*func*/) {
|
||||
static EIGEN_DEVICE_FUNC void run(
|
||||
DstXprType& dst, const SrcXprType& src,
|
||||
const internal::add_assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>& /*func*/) {
|
||||
dst.diagonal() += src.diagonal();
|
||||
}
|
||||
|
||||
static void run(DstXprType& dst, const SrcXprType& src,
|
||||
const internal::sub_assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>& /*func*/) {
|
||||
static EIGEN_DEVICE_FUNC void run(
|
||||
DstXprType& dst, const SrcXprType& src,
|
||||
const internal::sub_assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>& /*func*/) {
|
||||
dst.diagonal() -= src.diagonal();
|
||||
}
|
||||
};
|
||||
|
@ -525,7 +525,10 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
||||
eigen_assert(list_size == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic);
|
||||
resize(list_size, ColsAtCompileTime);
|
||||
if (list.begin()->begin() != nullptr) {
|
||||
std::copy(list.begin()->begin(), list.begin()->end(), m_storage.data());
|
||||
Index index = 0;
|
||||
for (const Scalar& e : *list.begin()) {
|
||||
coeffRef(index++) = e;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
eigen_assert(list.size() == static_cast<size_t>(RowsAtCompileTime) || RowsAtCompileTime == Dynamic);
|
||||
|
Loading…
x
Reference in New Issue
Block a user