def set_device_id(idx):
    """
    Set native (unsorted) OpenCL device ID

    Parameters
    ----------

    idx : int.
        Specifies the `cl_device_id` of the device.
    """
    import ctypes as ct
    from .util import safe_call as safe_call
    from .library import backend
    if backend.name() != 'opencl':
        raise RuntimeError('Invalid backend loaded')
    safe_call(backend.get().afcl_set_device_id(idx))
    return
