Working GPU implementation on 1 core