Skip to content
版 本

asc_loadalign

产 品 支 持 情 况

产 品是 否 支 持
Ascend 950PR/Ascend 950DT

功 能 说 明

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, iter_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, iter_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, iter_reg offset)
    

参 数 说 明

参 数 名输 入/输 出描 述
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];
iter_reg offset = asc_create_iter_reg_b32(64);
asc_loadalign(dst, src, offset);

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