@triton.jit
def copy_kernel(in_ptr, out_ptr, n, BLOCK_SIZE: tl.constexpr):
    pid = tl.program_id(axis=0)
    block_start = pid * BLOCK_SIZE
    offsets = block_start + tl.arange(0, BLOCK_SIZE)
    mask = offsets < n
    x = tl.load(in_ptr + offsets, mask=mask)
    y = tl.store(out_ptr + offsets, x, mask=mask)
