Skip to content
版本

asc_loadalign (废弃)

产品支持情况

  • Ascend 950PR/Ascend 950DT:支持
  • Atlas A3 训练系列产品/Atlas A3 推理系列产品:不支持
  • Atlas A2 训练系列产品/Atlas A2 推理系列产品:不支持
  • Atlas 200I/500 A2 推理产品:不支持
  • Atlas 推理系列产品AI Core:不支持
  • Atlas 推理系列产品Vector Core:不支持
  • Atlas 训练系列产品:不支持

功能说明

reg数据搬运接口,适用于从UB搬入MaskReg。

函数原型

  • 普通搬运

    C++
    __simd_callee__ inline void asc_loadalign(vector_bool& dst, __ubuf__ uint32_t* src)
    __simd_callee__ inline void asc_loadalign(vector_bool& dst, __ubuf__ uint32_t* src, int32_t offset)
    __simd_callee__ inline void asc_loadalign(vector_bool& dst, __ubuf__ uint32_t* src, addr_reg offset)
    
  • 上采样搬运

    C++
    __simd_callee__ inline void asc_loadalign_upsample(vector_bool& dst, __ubuf__ uint32_t* src)
    __simd_callee__ inline void asc_loadalign_upsample(vector_bool& dst, __ubuf__ uint32_t* src, int32_t offset)
    __simd_callee__ inline void asc_loadalign_upsample(vector_bool& dst, __ubuf__ uint32_t* src, addr_reg offset)
    
  • 下采样搬运

    C++
    __simd_callee__ inline void asc_loadalign_downsample(vector_bool& dst, __ubuf__ uint32_t* src)
    __simd_callee__ inline void asc_loadalign_downsample(vector_bool& dst, __ubuf__ uint32_t* src, int32_t offset)
    __simd_callee__ inline void asc_loadalign_downsample(vector_bool& dst, __ubuf__ uint32_t* src, addr_reg offset)
    

参数说明

表1 参数说明

参数名输入/输出描述
dst输出目的操作数(掩码寄存器)。
src输入源操作数(矢量)的起始地址。
offset输入当输入为reg_iter类型时,用户通过地址寄存器传入偏移;当输入为int32_t类型时,用户直接以数值的方式传入偏移。

返回值说明

流水类型

PIPE_V

约束说明

  • offset在缺省时默认偏移值offset=0。
  • 用户可以通过自增基地址或者偏移的方式传入offset参数。

调用示例

C++
constexpr uint64_t total_length = 256;
vector_bool dst = asc_create_mask_b16(PAT_ALL);
__ubuf__ uint32_t src[total_length];
addr_reg offset = asc_update_addr_reg_b32(64);
asc_loadalign(dst, src, offset);

免责声明:本站内容由 asc-devkit 仓 master 分支自动编译生成,属于持续开发版本,可能存在缺陷,仅供预览与参考。如需稳定及商用资料,请查阅官方 昇腾社区