CUDASparseContext#
- class MCEq.solvers.CUDASparseContext(int_m, dec_m, device_id=0)[source]#
Bases:
objectThis class handles the transfer between CPU and GPU memory, and the calling of GPU kernels. Initialized by
MCEq.core.MCEqRunand used bysolv_CUDA_sparse().Methods Summary
alloc_grid_sol(dim, nsols)Allocates memory for intermediate if grid solution requested.
dump_sol()Saves current solution to a new index in grid solution memory.
Downloads grid solution to main memory.
get_phi()Downloads current solution from GPU memory.
set_matrices(int_m, dec_m)Upload sparce matrices to GPU memory
set_phi(phi)Uploads initial condition to GPU memory.
solve_step(rho_inv, dX)Makes one solver step on GPU using cuSparse (BLAS)
Methods Documentation