FleCSI User API Version: 2.4.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>
topology & allocate (const coloring &c, AA &&... aa)
 
template<typename... AA>
topology & allocate (scheduler &s, const coloring &c, AA &&... aa)
 Create the topology.
 
Color colors () const
 Return the number of colors for the topology, which must exist.
 
void deallocate ()
 Destroy the topology.
 
topology & get ()
 Get the topology instance, which must exist.
 
bool is_allocated () const
 Return whether or not this slot is allocated.
 
topology * operator-> ()
 Access a member of the topology instance, which must exist.
 

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
If a topology_slot outlives start or control, use deallocate before it returns.
Deprecated
Use Topo::topology or Topo::ptr.

Member Function Documentation

◆ allocate() [1/2]

template<typename Topo >
template<typename... AA>
topology & allocate ( scheduler & s,
const coloring & c,
AA &&... aa )

Create the topology.

Parameters
ccoloring
aafurther specialization-specific parameters

◆ allocate() [2/2]

template<typename Topo >
template<typename... AA>
topology & allocate ( const coloring & c,
AA &&... aa )
Deprecated
Pass a scheduler.

◆ 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.

◆ get()

template<typename Topo >
topology & get ( )

Get the topology instance, which must exist.

◆ operator->()

template<typename Topo >
topology * operator-> ( )

Access a member of the topology instance, which must exist.

◆ colors()

template<typename Topo >
Color colors ( ) const

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