vreducev2
功能说明
把src0处的源向量缩减成一个更短的向量,结果存到dst。(如果patternMode等于0则从src1中读取mask,否则按照patternMode对应的mask进行计算,详见表2 patternMode参数mask对照,mask控制位0不参与计算,控制位1参与计算)。
dst,src0,src1必须是32B对齐的。
函数原型
void vreducev2(__ubuf__ uint16_t *dst, __ubuf__ uint16_t *src0, __ubuf__ uint16_t *src1, uint16_t repeat, uint8_t src0BlockStride, uint8_t patternMode, uint16_t src0RepeatStride, uint8_t src1RepeatStride); void vreducev2(__ubuf__ uint32_t *dst, __ubuf__ uint32_t *src0, __ubuf__ uint32_t *src1, uint16_t repeat, uint8_t src0BlockStride, uint8_t patternMode, uint16_t src0RepeatStride, uint8_t src1RepeatStride);
参数说明
参数名 |
说明 |
取值范围 |
单位 |
|---|---|---|---|
patternMode |
|
[0, 7] |
/ |
patternMode |
mask模式 |
|---|---|
0 |
normal mode |
1 |
010101…01 |
2 |
101010…10 |
3 |
00010001…0001 |
4 |
00100010…0010 |
5 |
01000100…0100 |
6 |
10001000…1000 |
7 |
11111111…1111 |
流水类型
PIPE_V
父主题: 规约运算