* \brief Flags that specify how the data in a MatrixBase-expression can be accessed. */
| 34 | * \brief Flags that specify how the data in a MatrixBase-expression can be accessed. |
| 35 | */ |
| 36 | enum AccessFlags |
| 37 | { |
| 38 | /** |
| 39 | * \brief component-wise read is available. |
| 40 | * The following method must be provided: |
| 41 | * \code |
| 42 | * __device__ const Scalar& coeff(Index row, Index col, Index batch, Index index) const; |
| 43 | * \endcode |
| 44 | * The parameter \c index is the same as the linear index from the writing procedure and is used |
| 45 | * by optimized routines only if the user explicitly enables them. |
| 46 | * (This is only supported by SparseMatrix yet) |
| 47 | * If some operation can't pass the linear index to the expressions, -1 might be used instead. |
| 48 | */ |
| 49 | ReadCwise = 0x01, |
| 50 | /** |
| 51 | * \brief direct read is available, the underlying memory is directly adressable. |
| 52 | * The following method must be provided: |
| 53 | * \code |
| 54 | * __host__ __device__ const _Scalar* data() const; |
| 55 | * __host__ bool isExclusiveUse() const; |
| 56 | * \endcode |
| 57 | */ |
| 58 | ReadDirect = 0x02, |
| 59 | /** |
| 60 | * \brief Component-wise read is available. |
| 61 | * To allow the implementation to specify the access order, the following methods have to be provided: |
| 62 | * \code |
| 63 | * __host__ Index size() const; |
| 64 | * __device__ void index(Index index, Index& row, Index& col, Index& batch) const; |
| 65 | * __device__ void setRawCoeff(Index index, const Scalar& newValue); |
| 66 | * \endcode |
| 67 | */ |
| 68 | WriteCwise = 0x10, |
| 69 | /** |
| 70 | * \brief Direct write is available, the underlying memory can be directly written to. |
| 71 | * The following method must be provided: |
| 72 | * \code |
| 73 | * __host__ __device__ _Scalar* data() |
| 74 | * \endcode |
| 75 | */ |
| 76 | WriteDirect = 0x20, |
| 77 | /** |
| 78 | * \brief This extends \c WriteCwise and allows inplace modifications (compound operators) by additionally providing the function |
| 79 | * \code __device__ const Scalar& getRawCoeff(Index index) const; \endcode . |
| 80 | * To enable compound assignment with this as target type, either RWCwise or RWCwiseRef (or both) have to be defined. |
| 81 | */ |
| 82 | RWCwise = 0x40, |
| 83 | /** |
| 84 | * \brief This extends \c WriteCwise and allows inplace modifications (compound operators) by additionally providing the function |
| 85 | * \code __device__ Scalar& rawCoeff(Index index); \endcode for read-write access to that entry. |
| 86 | * To enable compound assignment with this as target type, either RWCwise or RWCwiseRef (or both) have to be defined. |
| 87 | */ |
| 88 | RWCwiseRef = 0x80, |
| 89 | }; |
| 90 | |
| 91 | /** |
| 92 | * \brief The axis over which reductions are performed. |
nothing calls this directly
no outgoing calls
no test coverage detected