ORNL / ReSolve

Library of GPU-resident linear solvers
Other
51 stars 1 forks source link

When only host is updated, the device is out of date (and vice versa) #126

Open pelesh opened 6 months ago

pelesh commented 6 months ago

In update methods in vector and matrix classes it is probably safer to set both update flags at the same time - i.e if cpu data gets updated, gpu data automatically should switch to NOT updated.

_Originally posted by @kswirydo in https://github.com/ORNL/ReSolve/pull/124#discussion_r1429345023_

pelesh commented 5 months ago

After looking at possible use cases, I think it is better if update methods set flags only for memory spaces they updated. A user may run updates for for host and device in separate calls and bring them both to same up-to-date values. In this case "automatic" assumption that the other memory space is out of date would be untrue.

What I suggest is that

A possible action here would be to allow setNotUpdated function to set specific memory space as not current. Other functionality is already available in ReSolve.

@maksud, please chime in, as well.