asc_set_cmp_mask
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
功能说明
为asc_select操作设置作用于选择的Mask掩码。
函数原型
__aicore__ inline void asc_set_cmp_mask(__ubuf__ void* sel_mask)
参数说明
| 参数名 | 输入/输出 | 描述 |
|---|---|---|
| sel_mask | 输入 | 用于选择的Mask掩码的起始地址。 |
返回值说明
无
流水类型
PIPE_V
约束说明
需和asc_select操作配合使用。
调用示例
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);