NCAR / micm

A model-independent chemistry module for atmosphere models
https://ncar.github.io/micm/
Apache License 2.0
5 stars 5 forks source link

Add assignment overrides/copy constructors to CudaVectorMatrix so new matrix has separate device memory #416

Closed mwaxmonsky closed 6 months ago

mwaxmonsky commented 7 months ago

Is your feature request related to a problem? Please describe. Current assignment and copy functions will copy the device pointer to be shared between two instances of a matrix object.

There should only be one reference to the device memory from the singular matrix object and any other matrix, even a copy, should have it's own device allocation.

Describe the solution you'd like A series of override functions for copy constructors and assignment operators that copy the host data but allocate new device memory.

Describe alternatives you've considered No other alternatives.

Additional context None