FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
mutator< particle, T, P > Struct Template Reference

Mutator for particle fields. More...

Public Member Functions

void clear () const
 Remove all particles.
 
template<class... AA>
iterator emplace (AA &&... aa) const
 Create an element, in constant time.
 
iterator erase (const iterator &it) const
 Remove an element, in constant time.
 
iterator insert (const value_type &v) const
 Add a particle.
 
iterator insert (value_type &&v) const
 Add a particle by moving.
 
- Public Member Functions inherited from particle_accessor< T, P, true >
size_type capacity () const
 Get the maximum number of particles.
 
bool empty () const
 Test whether any particles exist.
 
iterator get_iterator_from_pointer (element_type *the_pointer) const
 Get an iterator that refers to a particle.
 
size_type size () const
 Get the number of extant particles.
 

Detailed Description

template<class T, Privileges P>
struct flecsi::data::mutator< particle, T, P >

Mutator for particle fields.

This class is supported for GPU execution; however, insertions and deletions are not thread-safe. Iterators are invalidated only if their particle is removed.

Template Parameters
Pif write-only, all particles are discarded

Member Function Documentation

◆ clear()

template<class T , Privileges P>
void clear ( ) const

Remove all particles.

◆ insert() [1/2]

template<class T , Privileges P>
iterator insert ( const value_type &  v) const

Add a particle.

See also
emplace

◆ insert() [2/2]

template<class T , Privileges P>
iterator insert ( value_type &&  v) const

Add a particle by moving.

See also
emplace

◆ emplace()

template<class T , Privileges P>
template<class... AA>
iterator emplace ( AA &&...  aa) const

Create an element, in constant time.

It is unspecified where it appears in the sequence.

Returns
an iterator to the new element

◆ erase()

template<class T , Privileges P>
iterator erase ( const iterator &  it) const

Remove an element, in constant time.

Returns
an iterator past the removed element