在查看xdm.h文件时,XDM1_SingeBufDesc结构体中有如下注释:
XDAS_Int32 accessMask; /**< Mask filled by the algorithm, declaring
* how the buffer was accessed <b>by the
* algorithm processor</b>.
*
* @remarks If the buffer was <b>not</b>
* accessed by the algorithm
* processor (e.g., it was filled
* via DMA or other hardware
* accelerator that <i>doesn't</i>
* write through the algorithm's
* CPU), then no bits in this mask
* should be set.
*
* @remarks It is acceptible (and
* appropriate!)to set several
* bits in this mask if the
* algorithm accessed the buffer
* in several ways.
*
* @remarks This mask is often used by the
* application and/or framework
* to appropriately manage cache
* on cache-based systems.
*
* @sa XDM_AccessMode
*/
在历程中见到过,在做XDM封装的时候也会在process函数中添加,但是仍然不是太理解。
问题1:在不通过DMA或其他硬件操作buffer时,是要设置accessMask位的。在XDM.H也看到了相定义,但是如果buffer中的数据既是输入又是输出的话,我们在代码中应该做如何处理? 框架机制又是如何处理的呢?
问题2: It is acceptible (and appropriate!)to set several bits in this mask if the algorithm accessed the buffe in several ways. 这段注释没太看懂,好吧!我承认我英语不行!