@triton.jit
def weighted_sumN(output_ptr, a_ptr: 'VAR_ARGS_ARRAY', b: 'VAR_ARGS_ARRAY',
    BLOCK_SIZE: tl.constexpr):
    offset = tl.arange(0, BLOCK_SIZE)
    output = tl.zeros([BLOCK_SIZE], tl.float32)
    for i in range(len(a_ptr)):
        output = output + tl.load(a_ptr[i] + offset) * b[i]
    tl.store(output_ptr + offset, output)
