Lattice Land Core Library
Loading...
Searching...
No Matches
lala::GaussSeidelIteration Class Reference

#include <fixpoint.hpp>

Public Member Functions

CUDA void barrier ()
 
template<class F >
CUDA local::B iterate (size_t n, const F &f) const
 
template<class F , class StopFun , class M >
CUDA size_t fixpoint (size_t n, const F &f, const StopFun &must_stop, B< M > &has_changed)
 
template<class F , class StopFun >
CUDA size_t fixpoint (size_t n, const F &f, const StopFun &must_stop)
 
template<class F , class M >
CUDA size_t fixpoint (size_t n, const F &f, B< M > &has_changed)
 
template<class F >
CUDA size_t fixpoint (size_t 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 ( size_t n,
const F & f ) const
inline

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

Parameters
`n`the number of call to f.
`boolf(size_t i)returnstrueif something has changed fori. \returntrueif for somei,f(i)returnedtrue,false` otherwise.

◆ fixpoint() [1/4]

template<class F , class StopFun , class M >
CUDA size_t lala::GaussSeidelIteration::fixpoint ( size_t 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
`n`the number of call to f.
`boolf(size_t i)returnstrueif something has changed fori. \parambool must_stop()returnstrueif we must stop early the fixpoint computation. \paramhas_changedis set totrueif we were not yet in a fixpoint. \return The number of iterations required to reach a fixpoint or untilmust_stop()returnstrue`.

◆ fixpoint() [2/4]

template<class F , class StopFun >
CUDA size_t lala::GaussSeidelIteration::fixpoint ( size_t 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 size_t lala::GaussSeidelIteration::fixpoint ( size_t 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 size_t lala::GaussSeidelIteration::fixpoint ( size_t 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: