INNER CODE UNIT · Python

compute_sdot_vec_vec

PaddlePaddle/Paddle-Lite · lite/tools/convert_arm_sdot_to_machine_code.py:21

def compute_sdot_vec_vec(vd, vn, vm):
    i = 0x4e809400 | int(vd) | (int(vn) << 5) | (int(vm) << 16)
    return '".word 0x{:08x}\\n"'.format(i) + \
           ' /* sdot v{vd}.4s, v{vn}.16b, v{vm}.16b */'.format(
               vd=vd, vn=vn, vm=vm)


def compute_sdot_vec_elem(vd, vn, vm, idx):
    i = 0x4f80e000 | int(vd) | (int(vn) << 5) | (int(vm) << 16) | (int(
        idx % 2) << 21) | (int(idx / 2) << 11)
    return '".word 0x{:08x}\\n"'.format(i) + \
           ' /* sdot v{vd}.4s, v{vn}.16b, v{vm}.4b[{idx}] */\\\r\n'.format(
               vd=vd, vn=vn, vm=vm, idx=idx)


def match_sdot_patten(line):
    matched = re.search(
        r'sdot\s+v(.*?).4s\s*,\s*v(.*?).16b\s*,\s*v(.*?).4b\[(.*?)\].*', line,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…