an alias when the 'own_mem' parameter is fasle.
Several simplifications/tweaks related to Vector::NewMemoryAndSize
and Vector::MakeRef in BlockVector, GridFunction, LinearForm, and
ParBlockNonlinearForm.
Add more MFEM_ASSERTs in MemoryManager::Delete_.
Remove MemoryManager::RegisterAliasBases().
In Memory<T>::MakeAlias, register the 'base' when the globally
configured device memory type (which can be a host type, e.g. when
running on host) is a device memory type. Always registering the
'base' creates errors in the unit tests:
"alias already exists with different base/offset!"
which are probably due to dangling aliases. If we want to always
register the 'base', we need to address these errors.
Updated the unit test "MemoryManager/Scopes" to test for the new
behavior of Vector::NewMemoryAndSize.
Disable the unit test "MemoryManager" since it defined a Device
object which destroys the MemoryManager at the end of the test.
and transfers.
The Memory class is now used by some MFEM classes (like Array and
Vector) which can be used on the Device. Such classes now provide
methods to access the underlying Memory object, e.g. GetMemory.
Updated ex1/ex1p and ex6/ex6p to not need to enable/disable the
Device at specific points -- the Device is now enabled just at the
start. Also, the same examples can now run on Device (e.g. -d cuda)
without the partial assembly option (-pa) -- full assembly will
be still done on CPU but the sparse matrix action and vector
operations will be done using the Device.
Reverted changes in class DenseMatrix related to using the Device.
At this point, DenseMatrix operations are only used for small matrices
and using the Device in this case is not a good option.
The check if the offsets are identical cannot guarantee the offsets will be identical in the future. There may be a good reason why the user calls this method like rewriting or deallocating the original array. The pointer must be changed even if the forced reallocation is not performed (but it may be reconsidered if it is really needed).