Hybrid CPU/GPU implementation of simulation of arbitrary