SciML / DiffEqGPU.jl

GPU-acceleration routines for DifferentialEquations.jl and the broader SciML scientific machine learning ecosystem
https://docs.sciml.ai/DiffEqGPU/stable/
MIT License
279 stars 29 forks source link

matrix differential equation support #173

Open ArnoStrouwen opened 2 years ago

ArnoStrouwen commented 2 years ago

The documentation says CuArray u0 are supported. But only one dimensional arrays are supported because of lines like: https://github.com/SciML/DiffEqGPU.jl/blob/8489a3e74f9179aafddb38912bedd9321fadd68b/src/DiffEqGPU.jl#L345

To generalize this to N dimensions the u0 should concatenate across an additional dimension. And the kernels should then index over this last dimension, instead of assuming there are only 2: https://github.com/SciML/DiffEqGPU.jl/blob/8489a3e74f9179aafddb38912bedd9321fadd68b/src/DiffEqGPU.jl#L24