one monolithic cuda file to avoid compilation issues :(