@triton.jit
def jagged_jagged_elementwise_arithmetic_ops(x_ptr, y_ptr, M: tl.constexpr,
    N: tl.constexpr, stride_row: tl.constexpr, stride_col: tl.constexpr,
    output, thread_block_row_size: tl.constexpr, thread_block_col_size: tl.
    constexpr, ops_func: tl.constexpr) ->None:
    pid = tl.program_id(0)
    num_group_n = (N + thread_block_col_size - 1) // thread_block_col_size
    pid_n = pid % num_group_n
    pid_m = pid // num_group_n
    offset_m = pid_m * thread_block_row_size + tl.arange(0,
        thread_block_row_size)
    offset_n = pid_n * thread_block_col_size + tl.arange(0,
        thread_block_col_size)
    mask = (offset_m[:, None] < M) & (offset_n[None, :] < N)
    offset = offset_m[:, None] * stride_row + offset_n[None, :] * stride_col
    x_ptr += offset
    y_ptr += offset
    x = tl.load(x_ptr, mask=mask)
    y = tl.load(y_ptr, mask=mask)
    if ops_func == 'add':
        z = tensor_elementwise_add(x, y)
    else:
        z = tensor_elementwise_mul(x, y)
    output += offset
    tl.store(output, z, mask=mask)
