Three-dimensional thinning algorithms on graphics processing units and multicore CPUs