FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
topology_slot< Topo > Struct Template Reference

A movable slot that holds a topology, constructed upon request. More...

Public Member Functions

template<typename... AA>
core & allocate (coloring const &coloring_reference, AA &&... aa)
 Create the topology.
 
Color colors () const
 Return the number of colors for the topology, which must exist.
 
void deallocate ()
 Destroy the topology.
 
bool is_allocated () const
 Return whether or not this slot is allocated.
 

Detailed Description

template<typename Topo>
struct flecsi::data::topology_slot< Topo >

A movable slot that holds a topology, constructed upon request.

Declare a task parameter as a topology_accessor to use the topology.

Note
A specialization provides aliases for both these types.
Warning
No topologies may exist outside the top-level action. If a topology_slot outlives that function, use deallocate before it returns.

Member Function Documentation

◆ allocate()

template<typename Topo >
template<typename... AA>
core & allocate ( coloring const &  coloring_reference,
AA &&...  aa 
)

Create the topology.

Parameters
coloring_referencecoloring (perhaps from an mpi_coloring)
aafurther specialization-specific parameters

◆ deallocate()

template<typename Topo >
void deallocate ( )

Destroy the topology.

◆ is_allocated()

template<typename Topo >
bool is_allocated ( ) const

Return whether or not this slot is allocated.

◆ colors()

template<typename Topo >
Color colors ( ) const

Return the number of colors for the topology, which must exist.