https://hgpu.org/?p=12436
Writing self-adaptive codes for heterogeneous systems