asc_set_cmp_mask
产 品 支 持 情 况
| 产 品 | 是 否 支 持 |
|---|---|
| √ | |
| √ |
功 能 说 明
为asc_select操 作 设 置 作 用 于 选 择 的Mask掩 码。
函 数 原 型
C++
__aicore__ inline void asc_set_cmp_mask(__ubuf__ void* sel_mask)
参 数 说 明
| 参 数 名 | 输 入/输 出 | 描 述 |
|---|---|---|
| sel_mask | 输 入 | 用 于 选 择 的Mask掩 码 的 起 始 地 址。 |
返 回 值 说 明
无
流 水 类 型
PIPE_V
约 束 说 明
需 和asc_select操 作 配 合 使 用。
调 用 示 例
C++
constexpr uint32_t total_length = 256;
constexpr uint32_t sel_length = 8;
__ubuf__ uint8_t sel_mask[sel_length];
__ubuf__ float dst[total_length];
__ubuf__ float src0[total_length];
__ubuf__ float src1[total_length];
asc_set_cmp_mask(sel_mask);
asc_sync_pipe(PIPE_V);
asc_select(dst, src0, src1, total_length);