昇腾社区首页
中文
注册

vgatherb

功能说明

该指令从src中获取8个地址,然后访问这8个地址(加上偏移地址)以获取8个32字节的数据块,最后将这些8个数据块写入目的地址。

需要注意的是,src中存储的8个地址可能包含重复地址,并且是连续存储在UB中的。每个地址都是s32类型,并且应始终对齐32字节。其对应地址指向的每个元素宽度为16位或32位,偏移地址应全部对齐32字节。

接口原型

void vgatherb(__ubuf__ uint32_t *dst, __ubuf__ uint32_t *src, uint32_t offsetAddr, uint16_t dstRepeatStride, uint8_t dstBlockStride, uint8_t repeat);

void vgatherb(__ubuf__ uint16_t *dst, __ubuf__ uint32_t *src, uint32_t offsetAddr, uint16_t dstRepeatStride, uint8_t dstBlockStride, uint8_t repeat);

参数说明

表1 vgatherb参数说明

参数名

说明

取值范围

单位

dst

目的UB地址

/

/

src

源UB地址

/

/

offsetAddr

源地址起始偏移量

[0, 2^32-1]

elem

dstRepeatStride

相邻两次执行,目的操作数相同block地址步长

[0, 4095]

32B

dstBlockStride

同一次执行,目的操作数不同block间地址步长

[0, 2^8-1]

32B

repeat

指令迭代次数

/

/

流水类型

PIPE_V