mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Add EIGEN_TENSOR_PLUGIN support per issue #2052.
This commit is contained in:
parent
5db9e5c779
commit
3324389f6d
@ -42,7 +42,8 @@ namespace Eigen {
|
||||
* \endcode
|
||||
*
|
||||
* This class can be extended with the help of the plugin mechanism described on the page
|
||||
* \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_TENSOR_PLUGIN.
|
||||
* \ref TopicCustomizing_Plugins by defining the preprocessor symbol \c EIGEN_TENSOR_PLUGIN,
|
||||
* \c EIGEN_TENSORBASE_PLUGIN, and \c EIGEN_READONLY_TENSORBASE_PLUGIN.
|
||||
*
|
||||
* <i><b>Some notes:</b></i>
|
||||
*
|
||||
@ -522,6 +523,10 @@ class Tensor : public TensorBase<Tensor<Scalar_, NumIndices_, Options_, IndexTyp
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef EIGEN_TENSOR_PLUGIN
|
||||
#include EIGEN_TENSOR_PLUGIN
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
bool checkIndexRange(const array<Index, NumIndices>& indices) const
|
||||
|
@ -960,6 +960,10 @@ class TensorBase<Derived, ReadOnlyAccessors>
|
||||
return TensorForcedEvalOp<const Derived>(derived());
|
||||
}
|
||||
|
||||
#ifdef EIGEN_READONLY_TENSORBASE_PLUGIN
|
||||
#include EIGEN_READONLY_TENSORBASE_PLUGIN
|
||||
#endif
|
||||
|
||||
protected:
|
||||
template <typename Scalar, int NumIndices, int Options, typename IndexType> friend class Tensor;
|
||||
template <typename Scalar, typename Dimensions, int Option, typename IndexTypes> friend class TensorFixedSize;
|
||||
@ -1152,6 +1156,10 @@ class TensorBase : public TensorBase<Derived, ReadOnlyAccessors> {
|
||||
return TensorAsyncDevice<Derived, DeviceType, DoneCallback>(dev, derived(), std::move(done));
|
||||
}
|
||||
|
||||
#ifdef EIGEN_TENSORBASE_PLUGIN
|
||||
#include EIGEN_TENSORBASE_PLUGIN
|
||||
#endif
|
||||
|
||||
protected:
|
||||
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TensorBase)
|
||||
EIGEN_DEFAULT_COPY_CONSTRUCTOR(TensorBase)
|
||||
|
Loading…
Reference in New Issue
Block a user