A working Mapping demo on CPU, see testprog_CPU.cpp for details