mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
document LvalueBit better
This commit is contained in:
@@ -125,27 +125,33 @@ const unsigned int LinearAccessBit = 0x10;
|
||||
|
||||
/** \ingroup flags
|
||||
*
|
||||
* Means that the underlying array of coefficients can be directly accessed. This means two things.
|
||||
* First, references to the coefficients must be available through coeffRef(int, int). This rules out read-only
|
||||
* expressions whose coefficients are computed on demand by coeff(int, int). Second, the memory layout of the
|
||||
* array of coefficients must be exactly the natural one suggested by rows(), cols(), outerStride(), innerStride(), and the RowMajorBit.
|
||||
* This rules out expressions such as Diagonal, whose coefficients, though referencable, do not have
|
||||
* such a regular memory layout.
|
||||
* Means the expression has a coeffRef() method, i.e. is writable as its individual coefficients are directly addressable.
|
||||
* This rules out read-only expressions.
|
||||
*
|
||||
* Note that DirectAccessBit implies LvalueBit, but the converse is false: LvalueBit doesn't imply DirectAccessBit because
|
||||
* DirectAccessBit means that the whole memory layout is a plain strided array.
|
||||
*
|
||||
* Expressions having LvalueBit also have their coeff() method returning a const reference instead of returning a new value.
|
||||
*/
|
||||
const unsigned int DirectAccessBit = 0x20;
|
||||
const unsigned int LvalueBit = 0x20;
|
||||
|
||||
/** \ingroup flags
|
||||
*
|
||||
* Means that the underlying array of coefficients can be directly accessed. This means two things.
|
||||
*
|
||||
* First, this means LvalueBit, i.e. this means that the expression has a coeffRef() method, i.e. is writable as its
|
||||
* individual coefficients are directly addressable. This rules out read-only expressions.
|
||||
*
|
||||
* Second, the memory layout of the array of coefficients must be exactly the natural one suggested by rows(), cols(),
|
||||
* outerStride(), innerStride(), and the RowMajorBit. This rules out expressions such as Diagonal, whose coefficients,
|
||||
* though referencable, do not have such a regular memory layout.
|
||||
*/
|
||||
const unsigned int DirectAccessBit = 0x40;
|
||||
|
||||
/** \ingroup flags
|
||||
*
|
||||
* means the first coefficient packet is guaranteed to be aligned */
|
||||
const unsigned int AlignedBit = 0x40;
|
||||
|
||||
/** \ingroup flags
|
||||
*
|
||||
* Means the expression is writable. Note that DirectAccessBit implies LvalueBit.
|
||||
* Internaly, it is mainly used to enable the writable coeff accessors, and makes
|
||||
* the read-only coeff accessors to return by const reference.
|
||||
*/
|
||||
const unsigned int LvalueBit = 0x80;
|
||||
const unsigned int AlignedBit = 0x80;
|
||||
|
||||
const unsigned int NestByRefBit = 0x100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user