|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Dense_Cell_Storage::view(): an Aleph::mdspan over a CA lattice.
More...
Go to the source code of this file.
Functions | |
| int | main () |
Dense_Cell_Storage::view(): an Aleph::mdspan over a CA lattice.
CA::Dense_Cell_Storage<T, N> (tpl_ca_storage.H) already exposes at(coord)/set(coord, v) and 2D/3D shorthands at(i,j)/set(i,j,v). .view() (and the read-only .view() const) hands back an Aleph::mdspan over the same buffer — zero allocation, zero copy — so code that wants plain grid(i, j) indexing (e.g. porting a numerical kernel that was written against a raw 2D array) can have it without going through the checked at/set pair one call at a time.
.view() are immediately visible through .at(), and vice versa.operator(), the kind of inner loop this view exists for.const Dense_Cell_Storage& to a function that only needs to read it, and get a read-only mdspan. Definition in file mdspan_ca_lattice_view_example.cc.
| int main | ( | void | ) |
Definition at line 133 of file mdspan_ca_lattice_view_example.cc.
References Aleph::blossom_maximum_cardinality_matching().