mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Apply clang-format
This commit is contained in:
@@ -16,23 +16,21 @@
|
||||
namespace Eigen {
|
||||
|
||||
/** \class TensorConcatenationOp
|
||||
* \ingroup CXX11_Tensor_Module
|
||||
*
|
||||
* \brief Tensor concatenation class.
|
||||
*
|
||||
*
|
||||
*/
|
||||
* \ingroup CXX11_Tensor_Module
|
||||
*
|
||||
* \brief Tensor concatenation class.
|
||||
*
|
||||
*
|
||||
*/
|
||||
namespace internal {
|
||||
template<typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
struct traits<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >
|
||||
{
|
||||
template <typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
struct traits<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> > {
|
||||
// Type promotion to handle the case where the types of the lhs and the rhs are different.
|
||||
typedef typename promote_storage_type<typename LhsXprType::Scalar,
|
||||
typename RhsXprType::Scalar>::ret Scalar;
|
||||
typedef typename promote_storage_type<typename LhsXprType::Scalar, typename RhsXprType::Scalar>::ret Scalar;
|
||||
typedef typename promote_storage_type<typename traits<LhsXprType>::StorageKind,
|
||||
typename traits<RhsXprType>::StorageKind>::ret StorageKind;
|
||||
typedef typename promote_index_type<typename traits<LhsXprType>::Index,
|
||||
typename traits<RhsXprType>::Index>::type Index;
|
||||
typedef
|
||||
typename promote_index_type<typename traits<LhsXprType>::Index, typename traits<RhsXprType>::Index>::type Index;
|
||||
typedef typename LhsXprType::Nested LhsNested;
|
||||
typedef typename RhsXprType::Nested RhsNested;
|
||||
typedef std::remove_reference_t<LhsNested> LhsNested_;
|
||||
@@ -41,66 +39,63 @@ struct traits<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >
|
||||
static constexpr int Layout = traits<LhsXprType>::Layout;
|
||||
enum { Flags = 0 };
|
||||
typedef std::conditional_t<Pointer_type_promotion<typename LhsXprType::Scalar, Scalar>::val,
|
||||
typename traits<LhsXprType>::PointerType, typename traits<RhsXprType>::PointerType> PointerType;
|
||||
typename traits<LhsXprType>::PointerType, typename traits<RhsXprType>::PointerType>
|
||||
PointerType;
|
||||
};
|
||||
|
||||
template<typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
struct eval<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, Eigen::Dense>
|
||||
{
|
||||
template <typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
struct eval<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, Eigen::Dense> {
|
||||
typedef const TensorConcatenationOp<Axis, LhsXprType, RhsXprType>& type;
|
||||
};
|
||||
|
||||
template<typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
struct nested<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, 1, typename eval<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >::type>
|
||||
{
|
||||
template <typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
struct nested<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, 1,
|
||||
typename eval<TensorConcatenationOp<Axis, LhsXprType, RhsXprType> >::type> {
|
||||
typedef TensorConcatenationOp<Axis, LhsXprType, RhsXprType> type;
|
||||
};
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
template <typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
class TensorConcatenationOp : public TensorBase<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, WriteAccessors> {
|
||||
public:
|
||||
typedef TensorBase<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, WriteAccessors> Base;
|
||||
typedef typename internal::traits<TensorConcatenationOp>::Scalar Scalar;
|
||||
typedef typename internal::traits<TensorConcatenationOp>::StorageKind StorageKind;
|
||||
typedef typename internal::traits<TensorConcatenationOp>::Index Index;
|
||||
typedef typename internal::nested<TensorConcatenationOp>::type Nested;
|
||||
typedef typename internal::promote_storage_type<typename LhsXprType::CoeffReturnType,
|
||||
typename RhsXprType::CoeffReturnType>::ret CoeffReturnType;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
|
||||
template<typename Axis, typename LhsXprType, typename RhsXprType>
|
||||
class TensorConcatenationOp : public TensorBase<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, WriteAccessors>
|
||||
{
|
||||
public:
|
||||
typedef TensorBase<TensorConcatenationOp<Axis, LhsXprType, RhsXprType>, WriteAccessors> Base;
|
||||
typedef typename internal::traits<TensorConcatenationOp>::Scalar Scalar;
|
||||
typedef typename internal::traits<TensorConcatenationOp>::StorageKind StorageKind;
|
||||
typedef typename internal::traits<TensorConcatenationOp>::Index Index;
|
||||
typedef typename internal::nested<TensorConcatenationOp>::type Nested;
|
||||
typedef typename internal::promote_storage_type<typename LhsXprType::CoeffReturnType,
|
||||
typename RhsXprType::CoeffReturnType>::ret CoeffReturnType;
|
||||
typedef typename NumTraits<Scalar>::Real RealScalar;
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp(const LhsXprType& lhs, const RhsXprType& rhs, Axis axis)
|
||||
: m_lhs_xpr(lhs), m_rhs_xpr(rhs), m_axis(axis) {}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp(const LhsXprType& lhs, const RhsXprType& rhs, Axis axis)
|
||||
: m_lhs_xpr(lhs), m_rhs_xpr(rhs), m_axis(axis) {}
|
||||
EIGEN_DEVICE_FUNC const internal::remove_all_t<typename LhsXprType::Nested>& lhsExpression() const {
|
||||
return m_lhs_xpr;
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
const internal::remove_all_t<typename LhsXprType::Nested>&
|
||||
lhsExpression() const { return m_lhs_xpr; }
|
||||
EIGEN_DEVICE_FUNC const internal::remove_all_t<typename RhsXprType::Nested>& rhsExpression() const {
|
||||
return m_rhs_xpr;
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
const internal::remove_all_t<typename RhsXprType::Nested>&
|
||||
rhsExpression() const { return m_rhs_xpr; }
|
||||
EIGEN_DEVICE_FUNC const Axis& axis() const { return m_axis; }
|
||||
|
||||
EIGEN_DEVICE_FUNC const Axis& axis() const { return m_axis; }
|
||||
|
||||
EIGEN_TENSOR_INHERIT_ASSIGNMENT_OPERATORS(TensorConcatenationOp)
|
||||
protected:
|
||||
typename LhsXprType::Nested m_lhs_xpr;
|
||||
typename RhsXprType::Nested m_rhs_xpr;
|
||||
const Axis m_axis;
|
||||
EIGEN_TENSOR_INHERIT_ASSIGNMENT_OPERATORS(TensorConcatenationOp)
|
||||
protected:
|
||||
typename LhsXprType::Nested m_lhs_xpr;
|
||||
typename RhsXprType::Nested m_rhs_xpr;
|
||||
const Axis m_axis;
|
||||
};
|
||||
|
||||
|
||||
// Eval as rvalue
|
||||
template<typename Axis, typename LeftArgType, typename RightArgType, typename Device>
|
||||
struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>
|
||||
{
|
||||
template <typename Axis, typename LeftArgType, typename RightArgType, typename Device>
|
||||
struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device> {
|
||||
typedef TensorConcatenationOp<Axis, LeftArgType, RightArgType> XprType;
|
||||
typedef typename XprType::Index Index;
|
||||
static constexpr int NumDims = internal::array_size<typename TensorEvaluator<LeftArgType, Device>::Dimensions>::value;
|
||||
static constexpr int RightNumDims = internal::array_size<typename TensorEvaluator<RightArgType, Device>::Dimensions>::value;
|
||||
static constexpr int RightNumDims =
|
||||
internal::array_size<typename TensorEvaluator<RightArgType, Device>::Dimensions>::value;
|
||||
typedef DSizes<Index, NumDims> Dimensions;
|
||||
typedef typename XprType::Scalar Scalar;
|
||||
typedef typename XprType::CoeffReturnType CoeffReturnType;
|
||||
@@ -109,13 +104,13 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
typedef typename Storage::Type EvaluatorPointerType;
|
||||
static constexpr int Layout = TensorEvaluator<LeftArgType, Device>::Layout;
|
||||
enum {
|
||||
IsAligned = false,
|
||||
PacketAccess = TensorEvaluator<LeftArgType, Device>::PacketAccess &&
|
||||
TensorEvaluator<RightArgType, Device>::PacketAccess,
|
||||
BlockAccess = false,
|
||||
IsAligned = false,
|
||||
PacketAccess =
|
||||
TensorEvaluator<LeftArgType, Device>::PacketAccess && TensorEvaluator<RightArgType, Device>::PacketAccess,
|
||||
BlockAccess = false,
|
||||
PreferBlockAccess = TensorEvaluator<LeftArgType, Device>::PreferBlockAccess ||
|
||||
TensorEvaluator<RightArgType, Device>::PreferBlockAccess,
|
||||
RawAccess = false
|
||||
RawAccess = false
|
||||
};
|
||||
|
||||
//===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//
|
||||
@@ -123,9 +118,11 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
EIGEN_STRONG_INLINE TensorEvaluator(const XprType& op, const Device& device)
|
||||
: m_leftImpl(op.lhsExpression(), device), m_rightImpl(op.rhsExpression(), device), m_axis(op.axis())
|
||||
{
|
||||
EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<LeftArgType, Device>::Layout) == static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout) || NumDims == 1), YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||
: m_leftImpl(op.lhsExpression(), device), m_rightImpl(op.rhsExpression(), device), m_axis(op.axis()) {
|
||||
EIGEN_STATIC_ASSERT((static_cast<int>(TensorEvaluator<LeftArgType, Device>::Layout) ==
|
||||
static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout) ||
|
||||
NumDims == 1),
|
||||
YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||
EIGEN_STATIC_ASSERT((NumDims == RightNumDims), YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||
EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||
|
||||
@@ -155,9 +152,9 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
m_outputStrides[0] = 1;
|
||||
|
||||
for (int j = 1; j < NumDims; ++j) {
|
||||
m_leftStrides[j] = m_leftStrides[j-1] * lhs_dims[j-1];
|
||||
m_rightStrides[j] = m_rightStrides[j-1] * rhs_dims[j-1];
|
||||
m_outputStrides[j] = m_outputStrides[j-1] * m_dimensions[j-1];
|
||||
m_leftStrides[j] = m_leftStrides[j - 1] * lhs_dims[j - 1];
|
||||
m_rightStrides[j] = m_rightStrides[j - 1] * rhs_dims[j - 1];
|
||||
m_outputStrides[j] = m_outputStrides[j - 1] * m_dimensions[j - 1];
|
||||
}
|
||||
} else {
|
||||
m_leftStrides[NumDims - 1] = 1;
|
||||
@@ -165,9 +162,9 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
m_outputStrides[NumDims - 1] = 1;
|
||||
|
||||
for (int j = NumDims - 2; j >= 0; --j) {
|
||||
m_leftStrides[j] = m_leftStrides[j+1] * lhs_dims[j+1];
|
||||
m_rightStrides[j] = m_rightStrides[j+1] * rhs_dims[j+1];
|
||||
m_outputStrides[j] = m_outputStrides[j+1] * m_dimensions[j+1];
|
||||
m_leftStrides[j] = m_leftStrides[j + 1] * lhs_dims[j + 1];
|
||||
m_rightStrides[j] = m_rightStrides[j + 1] * rhs_dims[j + 1];
|
||||
m_outputStrides[j] = m_outputStrides[j + 1] * m_dimensions[j + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,23 +172,20 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions& dimensions() const { return m_dimensions; }
|
||||
|
||||
// TODO(phli): Add short-circuit memcpy evaluation if underlying data are linear?
|
||||
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
|
||||
{
|
||||
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType) {
|
||||
m_leftImpl.evalSubExprsIfNeeded(NULL);
|
||||
m_rightImpl.evalSubExprsIfNeeded(NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
EIGEN_STRONG_INLINE void cleanup()
|
||||
{
|
||||
EIGEN_STRONG_INLINE void cleanup() {
|
||||
m_leftImpl.cleanup();
|
||||
m_rightImpl.cleanup();
|
||||
}
|
||||
|
||||
// TODO(phli): attempt to speed this up. The integer divisions and modulo are slow.
|
||||
// See CL/76180724 comments for more ideas.
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
|
||||
{
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const {
|
||||
// Collect dimension-wise indices (subs).
|
||||
array<Index, NumDims> subs;
|
||||
if (static_cast<int>(Layout) == static_cast<int>(ColMajor)) {
|
||||
@@ -247,9 +241,8 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
}
|
||||
|
||||
// TODO(phli): Add a real vectorization.
|
||||
template<int LoadMode>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
|
||||
{
|
||||
template <int LoadMode>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const {
|
||||
const int packetSize = PacketType<CoeffReturnType, Device>::size;
|
||||
EIGEN_STATIC_ASSERT((packetSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)
|
||||
eigen_assert(index + packetSize - 1 < dimensions().TotalSize());
|
||||
@@ -257,65 +250,56 @@ struct TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgTy
|
||||
EIGEN_ALIGN_MAX CoeffReturnType values[packetSize];
|
||||
EIGEN_UNROLL_LOOP
|
||||
for (int i = 0; i < packetSize; ++i) {
|
||||
values[i] = coeff(index+i);
|
||||
values[i] = coeff(index + i);
|
||||
}
|
||||
PacketReturnType rslt = internal::pload<PacketReturnType>(values);
|
||||
return rslt;
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost
|
||||
costPerCoeff(bool vectorized) const {
|
||||
const double compute_cost = NumDims * (2 * TensorOpCost::AddCost<Index>() +
|
||||
2 * TensorOpCost::MulCost<Index>() +
|
||||
TensorOpCost::DivCost<Index>() +
|
||||
TensorOpCost::ModCost<Index>());
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const {
|
||||
const double compute_cost = NumDims * (2 * TensorOpCost::AddCost<Index>() + 2 * TensorOpCost::MulCost<Index>() +
|
||||
TensorOpCost::DivCost<Index>() + TensorOpCost::ModCost<Index>());
|
||||
const double lhs_size = m_leftImpl.dimensions().TotalSize();
|
||||
const double rhs_size = m_rightImpl.dimensions().TotalSize();
|
||||
return (lhs_size / (lhs_size + rhs_size)) *
|
||||
m_leftImpl.costPerCoeff(vectorized) +
|
||||
(rhs_size / (lhs_size + rhs_size)) *
|
||||
m_rightImpl.costPerCoeff(vectorized) +
|
||||
TensorOpCost(0, 0, compute_cost);
|
||||
return (lhs_size / (lhs_size + rhs_size)) * m_leftImpl.costPerCoeff(vectorized) +
|
||||
(rhs_size / (lhs_size + rhs_size)) * m_rightImpl.costPerCoeff(vectorized) + TensorOpCost(0, 0, compute_cost);
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const { return NULL; }
|
||||
|
||||
protected:
|
||||
Dimensions m_dimensions;
|
||||
array<Index, NumDims> m_outputStrides;
|
||||
array<Index, NumDims> m_leftStrides;
|
||||
array<Index, NumDims> m_rightStrides;
|
||||
TensorEvaluator<LeftArgType, Device> m_leftImpl;
|
||||
TensorEvaluator<RightArgType, Device> m_rightImpl;
|
||||
const Axis m_axis;
|
||||
protected:
|
||||
Dimensions m_dimensions;
|
||||
array<Index, NumDims> m_outputStrides;
|
||||
array<Index, NumDims> m_leftStrides;
|
||||
array<Index, NumDims> m_rightStrides;
|
||||
TensorEvaluator<LeftArgType, Device> m_leftImpl;
|
||||
TensorEvaluator<RightArgType, Device> m_rightImpl;
|
||||
const Axis m_axis;
|
||||
};
|
||||
|
||||
// Eval as lvalue
|
||||
template<typename Axis, typename LeftArgType, typename RightArgType, typename Device>
|
||||
struct TensorEvaluator<TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>
|
||||
: public TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>
|
||||
{
|
||||
template <typename Axis, typename LeftArgType, typename RightArgType, typename Device>
|
||||
struct TensorEvaluator<TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device>
|
||||
: public TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device> {
|
||||
typedef TensorEvaluator<const TensorConcatenationOp<Axis, LeftArgType, RightArgType>, Device> Base;
|
||||
typedef TensorConcatenationOp<Axis, LeftArgType, RightArgType> XprType;
|
||||
typedef typename Base::Dimensions Dimensions;
|
||||
static constexpr int Layout = TensorEvaluator<LeftArgType, Device>::Layout;
|
||||
enum {
|
||||
IsAligned = false,
|
||||
PacketAccess = TensorEvaluator<LeftArgType, Device>::PacketAccess &&
|
||||
TensorEvaluator<RightArgType, Device>::PacketAccess,
|
||||
BlockAccess = false,
|
||||
IsAligned = false,
|
||||
PacketAccess =
|
||||
TensorEvaluator<LeftArgType, Device>::PacketAccess && TensorEvaluator<RightArgType, Device>::PacketAccess,
|
||||
BlockAccess = false,
|
||||
PreferBlockAccess = TensorEvaluator<LeftArgType, Device>::PreferBlockAccess ||
|
||||
TensorEvaluator<RightArgType, Device>::PreferBlockAccess,
|
||||
RawAccess = false
|
||||
RawAccess = false
|
||||
};
|
||||
|
||||
//===- Tensor block evaluation strategy (see TensorBlock.h) -------------===//
|
||||
typedef internal::TensorBlockNotImplemented TensorBlock;
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
EIGEN_STRONG_INLINE TensorEvaluator(XprType& op, const Device& device)
|
||||
: Base(op, device)
|
||||
{
|
||||
EIGEN_STRONG_INLINE TensorEvaluator(XprType& op, const Device& device) : Base(op, device) {
|
||||
EIGEN_STATIC_ASSERT((static_cast<int>(Layout) == static_cast<int>(ColMajor)), YOU_MADE_A_PROGRAMMING_MISTAKE);
|
||||
}
|
||||
|
||||
@@ -324,8 +308,7 @@ template<typename Axis, typename LeftArgType, typename RightArgType, typename De
|
||||
typedef typename XprType::CoeffReturnType CoeffReturnType;
|
||||
typedef typename PacketType<CoeffReturnType, Device>::type PacketReturnType;
|
||||
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index) const
|
||||
{
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index) const {
|
||||
// Collect dimension-wise indices (subs).
|
||||
array<Index, Base::NumDims> subs;
|
||||
for (int i = Base::NumDims - 1; i > 0; --i) {
|
||||
@@ -352,9 +335,8 @@ template<typename Axis, typename LeftArgType, typename RightArgType, typename De
|
||||
}
|
||||
}
|
||||
|
||||
template <int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
void writePacket(Index index, const PacketReturnType& x) const
|
||||
{
|
||||
template <int StoreMode>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writePacket(Index index, const PacketReturnType& x) const {
|
||||
const int packetSize = PacketType<CoeffReturnType, Device>::size;
|
||||
EIGEN_STATIC_ASSERT((packetSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE)
|
||||
eigen_assert(index + packetSize - 1 < this->dimensions().TotalSize());
|
||||
@@ -362,11 +344,11 @@ template<typename Axis, typename LeftArgType, typename RightArgType, typename De
|
||||
EIGEN_ALIGN_MAX CoeffReturnType values[packetSize];
|
||||
internal::pstore<CoeffReturnType, PacketReturnType>(values, x);
|
||||
for (int i = 0; i < packetSize; ++i) {
|
||||
coeffRef(index+i) = values[i];
|
||||
coeffRef(index + i) = values[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // end namespace Eigen
|
||||
} // end namespace Eigen
|
||||
|
||||
#endif // EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H
|
||||
#endif // EIGEN_CXX11_TENSOR_TENSOR_CONCATENATION_H
|
||||
|
||||
Reference in New Issue
Block a user