INNER CODE UNIT · Python

compute_vsdot_vec_vec

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

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


def compute_vsdot_vec_elem(vd, vn, vm, idx):
    i = 0x0d40fe20 | ((int(vd) & 0x7) << 29) | ((int(vd) & 0x8) << 3) | (
        (int(vn) & 0x7) << 1) | (
            (int(vn) & 0x8) << 20) | (int(vm) << 16) | (int(idx % 2) << 21)
    return '".word 0x{:08x}\\n"'.format(i) + \
           ' /* vsdot.s8 q{vd}, q{vn}, d{vm}[{idx}] */\\\r\n'.format(
               vd=vd, vn=vn, vm=vm, idx=idx)


def match_vsdot_patten(line):
    matched = re.search(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…