mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
removed some documentation referencing c++98 behaviour
This commit is contained in:
parent
66464bd2a8
commit
89c6ab2385
@ -180,9 +180,7 @@ class DiagonalMatrix
|
|||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
inline DiagonalMatrix(const Scalar& x, const Scalar& y, const Scalar& z) : m_diagonal(x,y,z) {}
|
inline DiagonalMatrix(const Scalar& x, const Scalar& y, const Scalar& z) : m_diagonal(x,y,z) {}
|
||||||
|
|
||||||
/** \brief Construct a diagonal matrix with fixed size from an arbitrary number of coefficients. \cpp11
|
/** \brief Construct a diagonal matrix with fixed size from an arbitrary number of coefficients.
|
||||||
*
|
|
||||||
* There exists C++98 anologue constructors for fixed-size diagonal matrices having 2 or 3 coefficients.
|
|
||||||
*
|
*
|
||||||
* \warning To construct a diagonal matrix of fixed size, the number of values passed to this
|
* \warning To construct a diagonal matrix of fixed size, the number of values passed to this
|
||||||
* constructor must match the fixed dimension of \c *this.
|
* constructor must match the fixed dimension of \c *this.
|
||||||
|
@ -548,12 +548,11 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
|||||||
// EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
|
// EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Construct a row of column vector with fixed size from an arbitrary number of coefficients. \cpp11
|
/** \brief Construct a row of column vector with fixed size from an arbitrary number of coefficients.
|
||||||
*
|
*
|
||||||
* \only_for_vectors
|
* \only_for_vectors
|
||||||
*
|
*
|
||||||
* This constructor is for 1D array or vectors with more than 4 coefficients.
|
* This constructor is for 1D array or vectors with more than 4 coefficients.
|
||||||
* There exists C++98 analogue constructors for fixed-size array/vector having 1, 2, 3, or 4 coefficients.
|
|
||||||
*
|
*
|
||||||
* \warning To construct a column (resp. row) vector of fixed length, the number of values passed to this
|
* \warning To construct a column (resp. row) vector of fixed length, the number of values passed to this
|
||||||
* constructor must match the the fixed number of rows (resp. columns) of \c *this.
|
* constructor must match the the fixed number of rows (resp. columns) of \c *this.
|
||||||
@ -574,7 +573,7 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer
|
/** \brief Constructs a Matrix or Array and initializes it by elements given by an initializer list of initializer
|
||||||
* lists \cpp11
|
* lists
|
||||||
*/
|
*/
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
explicit EIGEN_STRONG_INLINE PlainObjectBase(const std::initializer_list<std::initializer_list<Scalar>>& list)
|
explicit EIGEN_STRONG_INLINE PlainObjectBase(const std::initializer_list<std::initializer_list<Scalar>>& list)
|
||||||
|
@ -29,10 +29,9 @@ namespace Eigen {
|
|||||||
* It is the return type of DenseBase::reshaped(NRowsType,NColsType) and
|
* It is the return type of DenseBase::reshaped(NRowsType,NColsType) and
|
||||||
* most of the time this is the only way it is used.
|
* most of the time this is the only way it is used.
|
||||||
*
|
*
|
||||||
* However, in C++98, if you want to directly maniputate reshaped expressions,
|
* If you want to directly manipulate reshaped expressions,
|
||||||
* for instance if you want to write a function returning such an expression, you
|
* for instance if you want to write a function returning such an expression,
|
||||||
* will need to use this class. In C++11, it is advised to use the \em auto
|
* it is advised to use the \em auto keyword for such use cases.
|
||||||
* keyword for such use cases.
|
|
||||||
*
|
*
|
||||||
* Here is an example illustrating the dynamic case:
|
* Here is an example illustrating the dynamic case:
|
||||||
* \include class_Reshaped.cpp
|
* \include class_Reshaped.cpp
|
||||||
|
@ -31,10 +31,8 @@ template<int N> class VariableAndFixedInt;
|
|||||||
* - arithmetic and some bitwise operators: -, +, *, /, %, &, |
|
* - arithmetic and some bitwise operators: -, +, *, /, %, &, |
|
||||||
* - c++98/14 compatibility with fix<N> and fix<N>() syntax to define integral constants.
|
* - c++98/14 compatibility with fix<N> and fix<N>() syntax to define integral constants.
|
||||||
*
|
*
|
||||||
* It is strongly discouraged to directly deal with this class FixedInt. Instances are expcected to
|
* It is strongly discouraged to directly deal with this class FixedInt. Instances are expected to
|
||||||
* be created by the user using Eigen::fix<N> or Eigen::fix<N>(). In C++98-11, the former syntax does
|
* be created by the user using Eigen::fix<N> or Eigen::fix<N>().
|
||||||
* not create a FixedInt<N> instance but rather a point to function that needs to be \em cleaned-up
|
|
||||||
* using the generic helper:
|
|
||||||
* \code
|
* \code
|
||||||
* internal::cleanup_index_type<T>::type
|
* internal::cleanup_index_type<T>::type
|
||||||
* internal::cleanup_index_type<T,DynamicKey>::type
|
* internal::cleanup_index_type<T,DynamicKey>::type
|
||||||
@ -191,14 +189,6 @@ static const internal::FixedInt<N> fix{};
|
|||||||
* <a href="http://en.cppreference.com/w/cpp/types/integral_constant">\c std::integral_constant </a><tt> <int,N> </tt>
|
* <a href="http://en.cppreference.com/w/cpp/types/integral_constant">\c std::integral_constant </a><tt> <int,N> </tt>
|
||||||
* Here, \c fix<N> is thus an object of type \c internal::FixedInt<N>.
|
* Here, \c fix<N> is thus an object of type \c internal::FixedInt<N>.
|
||||||
*
|
*
|
||||||
* In c++98/11, it is implemented as a function:
|
|
||||||
* \code
|
|
||||||
* template<int N> inline internal::FixedInt<N> fix();
|
|
||||||
* \endcode
|
|
||||||
* Here internal::FixedInt<N> is thus a pointer to function.
|
|
||||||
*
|
|
||||||
* If for some reason you want a true object in c++98 then you can write: \code fix<N>() \endcode which is also valid in c++14.
|
|
||||||
*
|
|
||||||
* \sa fix<N>(int), seq, seqN
|
* \sa fix<N>(int), seq, seqN
|
||||||
*/
|
*/
|
||||||
template<int N>
|
template<int N>
|
||||||
|
@ -32,9 +32,6 @@ namespace Eigen {
|
|||||||
* // And evaluate it: (c++14)
|
* // And evaluate it: (c++14)
|
||||||
* std::cout << expr.eval(x=6,y=3,z=-13) << "\n";
|
* std::cout << expr.eval(x=6,y=3,z=-13) << "\n";
|
||||||
*
|
*
|
||||||
* // In c++98/11, only one symbol per expression is supported for now:
|
|
||||||
* auto expr98 = (3-x)/2;
|
|
||||||
* std::cout << expr98.eval(x=6) << "\n";
|
|
||||||
* \endcode
|
* \endcode
|
||||||
*
|
*
|
||||||
* It is currently only used internally to define and manipulate the
|
* It is currently only used internally to define and manipulate the
|
||||||
|
@ -80,7 +80,7 @@ But AVX instructions (at least the ones that %Eigen uses, which are the fast one
|
|||||||
Otherwise you get a segmentation fault.
|
Otherwise you get a segmentation fault.
|
||||||
|
|
||||||
For this reason, %Eigen takes care by itself to require 256-bit alignment for Eigen::Vector4d, by doing two things:
|
For this reason, %Eigen takes care by itself to require 256-bit alignment for Eigen::Vector4d, by doing two things:
|
||||||
\li %Eigen requires 256-bit alignment for the Eigen::Vector4d's array (of 4 doubles). With \cpp11 this is done with the <a href="https://en.cppreference.com/w/cpp/keyword/alignas">alignas</a> keyword, or compiler's extensions for c++98/03.
|
\li %Eigen requires 256-bit alignment for the Eigen::Vector4d's array (of 4 doubles). This is done with the <a href="https://en.cppreference.com/w/cpp/keyword/alignas">alignas</a> keyword.
|
||||||
\li %Eigen overloads the `operator new` of Eigen::Vector4d so it will always return 256-bit aligned pointers. (removed in \cpp17)
|
\li %Eigen overloads the `operator new` of Eigen::Vector4d so it will always return 256-bit aligned pointers. (removed in \cpp17)
|
||||||
|
|
||||||
Thus, normally, you don't have to worry about anything, %Eigen handles alignment of operator new for you...
|
Thus, normally, you don't have to worry about anything, %Eigen handles alignment of operator new for you...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user