cuda version is still broken due to unfortunate problems with atomicadd and math errors that don't seem to exist in the python code.