Lattice Land Core Library
lala::GaussSeidelIteration Class Reference

#include <fixpoint.hpp>

Public Member Functions

CUDA void barrier ()
 
template<class F >
CUDA local::B iterate (int n, const F &f) const
 
template<class F , class StopFun , class M >
CUDA int fixpoint (int n, const F &f, const StopFun &must_stop, B< M > &has_changed)
 
template<class F , class StopFun >
CUDA int fixpoint (int n, const F &f, const StopFun &must_stop)
 
template<class F , class M >
CUDA int fixpoint (int n, const F &f, B< M > &has_changed)
 
template<class F >
CUDA int fixpoint (int n, const F &f)
 

Detailed Description

A simple form of sequential fixpoint computation based on Kleene fixpoint. At each iteration, the deduction operations \( f_1, \ldots, f_n \) are simply composed by functional composition \( f = f_n \circ \ldots \circ f_1 \). This strategy basically corresponds to the Gauss-Seidel iteration method.

Member Function Documentation

◆ barrier()

CUDA void lala::GaussSeidelIteration::barrier ( )
inline

◆ iterate()

template<class F >
CUDA local::B lala::GaussSeidelIteration::iterate ( int  n,
const F &  f 
) const
inline

We iterate the function f n times: \( f(0); f(1); \ldots ; f(n); \)

Parameters
<tt>n</tt>the number of call to f.
<tt>boolf(int i) returns true if something has changed for i.
Returns
true if for some i, f(i) returned true, false otherwise.

◆ fixpoint() [1/4]

template<class F , class StopFun , class M >
CUDA int lala::GaussSeidelIteration::fixpoint ( int  n,
const F &  f,
const StopFun &  must_stop,
B< M > &  has_changed 
)
inline

We execute iterate(n, f) until we reach a fixpoint or must_stop() returns true.

Parameters
<tt>n</tt>the number of call to f.
<tt>boolf(int i) returns true if something has changed for i.
<tt>boolmust_stop() returns true if we must stop early the fixpoint computation.
<tt>has_changed</tt>is set to true if we were not yet in a fixpoint.
Returns
The number of iterations required to reach a fixpoint or until must_stop() returns true.

◆ fixpoint() [2/4]

template<class F , class StopFun >
CUDA int lala::GaussSeidelIteration::fixpoint ( int  n,
const F &  f,
const StopFun &  must_stop 
)
inline

Same as fixpoint above without has_changed.

◆ fixpoint() [3/4]

template<class F , class M >
CUDA int lala::GaussSeidelIteration::fixpoint ( int  n,
const F &  f,
B< M > &  has_changed 
)
inline

Same as fixpoint above with must_stop always returning false.

◆ fixpoint() [4/4]

template<class F >
CUDA int lala::GaussSeidelIteration::fixpoint ( int  n,
const F &  f 
)
inline

Same as fixpoint above without has_changed and with must_stop always returning false.


The documentation for this class was generated from the following file: