|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
NgpEntityPoolT is a Kokkos-compatible pool of stk::mesh::Entity objects. More...
#include <NgpEntityPool.hpp>
Public Types | |
| using | memory_space = MemorySpace |
| using | execution_space = typename MemorySpace::execution_space |
| using | entity_vector_t = std::vector<stk::mesh::Entity> |
| using | entity_view_t = NgpViewT<stk::mesh::Entity*, MemorySpace> |
| using | our_size_t = SizeType |
| using | base_t = NgpPoolT<stk::mesh::Entity, MemorySpace, SizeType> |
| using | pool_vector_t |
| using | pool_view_t |
| using | value_type |
Public Member Functions | |
| NgpEntityPoolT ()=default | |
| NgpEntityPoolT (stk::mesh::BulkData &bulk_data, stk::mesh::EntityRank rank) | |
| NgpEntityPoolT (stk::mesh::BulkData &bulk_data, stk::mesh::EntityRank rank, size_t capacity) | |
| ~NgpEntityPoolT ()=default | |
| NgpEntityPoolT (const NgpEntityPoolT &)=default | |
| NgpEntityPoolT & | operator= (const NgpEntityPoolT &)=default |
| NgpEntityPoolT (NgpEntityPoolT &&)=default | |
| NgpEntityPoolT & | operator= (NgpEntityPoolT &&)=default |
| void | reserve_and_declare (our_size_t requested_capacity) |
Accessors | |
| our_size_t | capacity () const |
| our_size_t | capacity_host () const |
| our_size_t | size () const |
| our_size_t | size_host () const |
| void | reserve (our_size_t requested_capacity) |
| value_type | acquire () const |
| Acquire a value from the pool. Returns by move. Modifies on device but does not mark as modified. It's up to you to mark the pool as modified on the device after using this. | |
| value_type | acquire_host () const |
| Acquire a value from the pool. Returns by move. Modifies on host but does not mark as modified. It's up to you to mark the pool as modified on the host after using this. | |
| void | add (value_type p) const |
| Add an object into the pool. Modifies on device but does not mark as modified. | |
| void | add_host (value_type p) const |
| Add an object into the pool. Modifies on host but does not mark as modified. | |
| pool_view_t | batch_acquire (our_size_t n) |
| Acquire N objects from the pool. Returns by move. Modifies on device and marks as modified. Results are returned in an NgpViewT<ValueType, MemorySpace>. | |
| pool_vector_t | batch_acquire_host (our_size_t n) |
| Acquire N objects from the pool. Returns by move. Modifies on host and marks as modified. Results are returned in an std::vector<ValueType>. | |
| void | batch_add (pool_view_t p) |
| Add N objects into the pool. Modifies on device and marks as modified. | |
| void | batch_add_host (pool_vector_t p) |
| Add N objects into the pool. Modifies on host and marks as modified. | |
Ngp interface | |
| void | modify_on_host () |
| Mark the host pool as modified. | |
| void | modify_on_device () |
| Mark the device pool as modified. | |
| void | modify_on () |
| Abstract method for marking the pool as modified. | |
| void | sync_to_host () |
| Synchronize the host pool to the device pool if needed. | |
| void | sync_to_device () |
| Synchronize the device pool to the host pool if needed. | |
| void | sync_to () |
| Abstract method for synchronizing the pool. | |
| bool | need_sync_to_host () const |
| Return if we need to sync to the host. | |
| bool | need_sync_to_device () const |
| Return if we need to sync to the device. | |
| bool | need_sync_to () const |
| Abstract method for checking if we need to sync. | |
Unlike a regular NgpPool, we offer a reserve and declare method to both reserve space within the pool and fill that space with entities from a given mesh.
| using mundy::mesh::NgpEntityPoolT< MemorySpace, SizeType >::memory_space = MemorySpace |
| using mundy::mesh::NgpEntityPoolT< MemorySpace, SizeType >::execution_space = typename MemorySpace::execution_space |
| using mundy::mesh::NgpEntityPoolT< MemorySpace, SizeType >::entity_vector_t = std::vector<stk::mesh::Entity> |
| using mundy::mesh::NgpEntityPoolT< MemorySpace, SizeType >::entity_view_t = NgpViewT<stk::mesh::Entity*, MemorySpace> |
| using mundy::mesh::NgpEntityPoolT< MemorySpace, SizeType >::our_size_t = SizeType |
| using mundy::mesh::NgpEntityPoolT< MemorySpace, SizeType >::base_t = NgpPoolT<stk::mesh::Entity, MemorySpace, SizeType> |
|
inherited |
|
inherited |
|
inherited |
|
default |
|
inline |
|
inline |
|
default |
|
default |
|
default |
|
default |
|
default |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Something to be aware of: This function is const because a KOKKOS_LAMBDA will const capture this class making acquire on the device impossible otherwise. This is why we mark size, capacity, and our internal pool as mutable.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Call this method after updating the host pool so that the NgpPoolT is aware that the device pool may now be out of date.
|
inlineinherited |
Call this method after updating the device pool so that the NgpPoolT is aware that the host pool may now be out of date.
|
inlineinherited |
|
inlineinherited |
If the device pool has been modified more recently than the host pool, this function performs a deep copy from the device pool to the host pool.
|
inlineinherited |
If the host pool has been modified more recently than the device pool, this function performs a deep copy from the host pool to the device pool.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |