Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::ca_scheme_detail Namespace Reference

Classes

struct  is_tile
 Detect whether O is a Tile<W, H> instantiation. More...
 
struct  is_tile< Tile< W, H > >
 

Functions

template<typename Coord , typename Cb >
void for_each_coord_1d (const ca_size_t n0, Cb &&cb)
 Iterate every coordinate of a rank-1 lattice in row order.
 
template<typename Coord , typename Cb >
void for_each_coord_2d_row (const ca_size_t n0, const ca_size_t n1, Cb &&cb)
 Iterate every coordinate of a rank-2 lattice in row-major order.
 
template<typename Coord , typename Cb >
void for_each_coord_2d_col (const ca_size_t n0, const ca_size_t n1, Cb &&cb)
 Iterate every coordinate of a rank-2 lattice in column-major order.
 
template<std::size_t W, std::size_t H, typename Coord , typename Cb >
void for_each_coord_2d_tile (const ca_size_t n0, const ca_size_t n1, Cb &&cb)
 Iterate a rank-2 lattice in H × W tiles (cache-friendly).
 
template<typename Coord , typename Cb >
void for_each_coord_3d_row (const ca_size_t n0, const ca_size_t n1, const ca_size_t n2, Cb &&cb)
 Iterate every coordinate of a rank-3 lattice in row-major order.
 
template<typename Order , typename Lattice , typename Cb >
void for_each_coord (const Lattice &lat, Cb &&cb)
 Visit every coordinate of lat honouring the chosen Order.
 
template<typename Lattice >
ca_size_t cell_count (const Lattice &lat) noexcept
 Total cell count of a lattice (product of extents).
 
template<std::size_t Rank>
Coord_Vec< Rank > coord_from_hash (std::uint64_t h, const std::array< ca_size_t, Rank > &ext) noexcept
 Decode a 64-bit hash into a coordinate uniformly drawn over extents.
 

Variables

template<typename O >
constexpr bool is_tile_v = is_tile<O>::value
 

Function Documentation

◆ cell_count()

template<typename Lattice >
ca_size_t Aleph::CA::ca_scheme_detail::cell_count ( const Lattice &  lat)
inlinenoexcept

Total cell count of a lattice (product of extents).

Definition at line 211 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::Lattice< Storage, Boundary >::rank.

Referenced by Aleph::CA::Random_Asynchronous_Update< Engine_Type >::apply().

◆ coord_from_hash()

template<std::size_t Rank>
Coord_Vec< Rank > Aleph::CA::ca_scheme_detail::coord_from_hash ( std::uint64_t  h,
const std::array< ca_size_t, Rank > &  ext 
)
inlinenoexcept

Decode a 64-bit hash into a coordinate uniformly drawn over extents.

Definition at line 221 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching(), h, and Aleph::CA::splitmix64().

◆ for_each_coord()

template<typename Order , typename Lattice , typename Cb >
void Aleph::CA::ca_scheme_detail::for_each_coord ( const Lattice &  lat,
Cb &&  cb 
)
inline

Visit every coordinate of lat honouring the chosen Order.

Definition at line 182 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::Lattice< Storage, Boundary >::rank.

◆ for_each_coord_1d()

template<typename Coord , typename Cb >
void Aleph::CA::ca_scheme_detail::for_each_coord_1d ( const ca_size_t  n0,
Cb &&  cb 
)
inline

Iterate every coordinate of a rank-1 lattice in row order.

Definition at line 106 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching().

◆ for_each_coord_2d_col()

template<typename Coord , typename Cb >
void Aleph::CA::ca_scheme_detail::for_each_coord_2d_col ( const ca_size_t  n0,
const ca_size_t  n1,
Cb &&  cb 
)
inline

Iterate every coordinate of a rank-2 lattice in column-major order.

Definition at line 132 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching().

◆ for_each_coord_2d_row()

template<typename Coord , typename Cb >
void Aleph::CA::ca_scheme_detail::for_each_coord_2d_row ( const ca_size_t  n0,
const ca_size_t  n1,
Cb &&  cb 
)
inline

Iterate every coordinate of a rank-2 lattice in row-major order.

Definition at line 118 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching().

◆ for_each_coord_2d_tile()

template<std::size_t W, std::size_t H, typename Coord , typename Cb >
void Aleph::CA::ca_scheme_detail::for_each_coord_2d_tile ( const ca_size_t  n0,
const ca_size_t  n1,
Cb &&  cb 
)
inline

Iterate a rank-2 lattice in H × W tiles (cache-friendly).

Definition at line 146 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching().

◆ for_each_coord_3d_row()

template<typename Coord , typename Cb >
void Aleph::CA::ca_scheme_detail::for_each_coord_3d_row ( const ca_size_t  n0,
const ca_size_t  n1,
const ca_size_t  n2,
Cb &&  cb 
)
inline

Iterate every coordinate of a rank-3 lattice in row-major order.

Definition at line 166 of file tpl_ca_update_scheme.H.

References Aleph::blossom_maximum_cardinality_matching(), and k.

Variable Documentation

◆ is_tile_v

template<typename O >
constexpr bool Aleph::CA::ca_scheme_detail::is_tile_v = is_tile<O>::value
inlineconstexpr

Definition at line 102 of file tpl_ca_update_scheme.H.