Commit Graph
31 Commits
Author SHA1 Message Date
Tzanio 32d7e036e7 Renamed
MemoryType GetSuitableMemoryType(MemoryClass mc);

to

  MemoryType GetMemoryType(MemoryClass mc);
2019-05-24 15:54:24 -07:00
camierjs bd08fa9592 Merge branch 'memory-dev' of github.com:mfem/mfem into memory-dev 2019-05-24 14:21:12 -07:00
camierjs 283264ade4 {Read,Write,ReadWrite}Access => {Read,Write,ReadWrite}
Add shortcut for Host{Read,Write,ReadWrite}
2019-05-24 14:08:45 -07:00
Tzanio e36d1ea8fd Several change to (hopefully) simplify the interface:
* The parameter of Vector::UseDevice(bool) no longer has a default value. All
  the calls to UseDevice() in operator.cpp bilinearform_ext.cpp gridfunc.?pp and
  linearform.?pp have been replaced with UseDevice(true).

* Added shortcuts for the device flags of the Memory objects inside the Vector
  and Array classes:

    bool Array::UseDevice()
    bool Vector::UseDevice()

* The internal device flag in Memory::FlagMask is now called USE_DEVICE (it was
  previously called EXEC_FLAG). The accessor function for this flag have been
  renamed:

    bool Memory::GetExecFlag()     -> bool Memory::UseDevice()
    void Memory::SetExecFlag(bool) -> void Memory::UseDevice(bool)

* Further renamed:

    Memory::SyncWith         -> Memory::Sync
    Memory::SyncAliasToBase  -> Memory::SyncAlias
    Memory::SyncAliasToBase_ -> Memory::SyncAlias_

* Replaced FIXME with TODO in general/mem_manager.cpp
2019-05-24 14:01:15 -07:00
Veselin Dobrev b69fd1e038 Some tweaks and additions to the MemoryManager class.
Modify the Device class to require the creation of an object in
order to use backends other then Backend::CPU. At destriction,
this object will call the Destroy() method of the MemoryManager to
deallocate any remaining registered device pointers.

In class Device, remove the method Disable() and make the method
Enable() private.

Use a global Array<double> as the buffer used by the cuda functions
for minimum and dot product.
2019-05-23 23:21:27 -07:00
Tzanio 41cf43c88c Minor 2019-05-22 03:44:49 -07:00
Tzanio 3d88be85bc Removed MFEM_USE_MM -- it is no longer necessary 2019-05-21 19:18:50 -07:00
Veselin Dobrev 534bf51466 Addressing some of the PR feedback. 2019-05-21 02:19:05 -07:00
Veselin Dobrev e332d2713f Address some FIXME comments. 2019-05-18 16:29:06 -07:00
Veselin Dobrev 31f2ce99cc Some small tweaks and additions related to the classes Memory and
MemoryManager.
2019-05-17 16:26:20 -07:00
Veselin Dobrev 40378a046b Introduce a new Memory class for handling host + device allocations
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.
2019-05-16 14:53:39 -07:00
camierjs 3e34d4b99a Cleanup, style and remove all CUdevice, CUcontext & CUstream 2019-04-19 11:00:23 -07:00
camierjs 2a554ee768 Memory manager maps erase fix 2019-04-11 17:11:23 -07:00
camierjs eb32fdff5f Move the 'destroyed' bool to an 'exists' section to allow pre-mm objects to be allocated. 2019-04-10 17:06:22 -07:00
Jean-Sylvain Camier 8fd837e6ab Move 'destroyed' as a member of MemoryManager 2019-04-10 08:26:22 -07:00
camierjs e3df31e956 Initialize enabled = true in the MemoryManager and local variables renaming 2019-04-09 20:18:26 -07:00
Tzanio a28a779df1 Merge branch 'okina' into okina-mm-object
Conflicts:
        fem/bilininteg_ext.cpp
        general/mem_manager.cpp
	general/mem_manager.hpp
	general/occa.cpp
2019-04-09 19:19:45 -07:00
Tzanio Kolev a65c4c40d4 Merge pull request #848 from mfem/okina-rename
Okina rename [okina-rename]
2019-04-09 18:41:53 -07:00
Tzanio Kolev 030ac61fd9 Merge pull request #845 from mfem/okina-device-tweaks
Some tweaks to the mfem::Device class [okina-device-tweaks]
2019-04-09 18:37:58 -07:00
Tzanio 50b7e4cc69 Documentation 2019-04-09 18:31:38 -07:00
camierjs 2020335b50 Renaming + free functions in mfem namespace 2019-04-09 18:17:00 -07:00
Tzanio a49cd5df97 Merge branch 'okina-device-tweaks' into okina-rename
Conflicts:
        fem/bilinearform_ext.cpp
        fem/bilininteg_ext.cpp
        general/cuda.cpp
2019-04-09 18:08:44 -07:00
Veselin Dobrev ce2c543339 Update calls to Device::IsEnabled() and Device::IsDisabled() with
appropriate calls to Device::Allows().
2019-04-09 17:51:19 -07:00
camierjs 94c5397c7d Remove the memory manager singleton 2019-04-09 17:12:20 -07:00
camierjs 471eba4d2d Move Device::Tracking to mm::Enable/Disable
Swap lasts +=1 for ++
2019-04-09 11:42:12 -07:00
Veselin Dobrev 600f5ec4bd Some additional simplifications and tweaks in headers.
Add MFEM_CUDA_CHECK_{DRV,RT} macros.
2019-04-09 00:37:58 -07:00
Tzanio e0c45fb9d4 Reserve okina name for future kernel interface 2019-04-08 23:39:10 -07:00
camierjs dfb5b5824a Remove unused mem_manager debug code 2019-04-08 17:17:36 -07:00
Veselin Dobrev 55f0a7ec66 Updates to the mfem::Device class. 2019-04-08 16:48:56 -07:00
camierjs 8a4ae9a556 Rework include hierarchy not to present cuda/occa internal headers
Separate dvector3 from dtensor because it is used in coefficient.hpp
2019-04-04 11:45:46 -07:00
camierjs 930a55d452 Rename general/mm.?pp -> general/mem_manager.?pp 2019-04-03 16:48:47 -07:00