2D buffered matrices
More...
#include <common.hpp>
|
| | State (const unsigned int height, const unsigned int width, stateFunc< T > fn, Device device) |
| | Initalizes a state.
|
| |
|
| ~State () |
| | Frees dynamically allocated memory.
|
| |
| void | copyTo (State< T > *to) |
| | Copy the own current state buffer to another current state buffer across devices.
|
| |
|
void | swap () |
| | Swaps the current- and next state buffer.
|
| |
|
void | print () |
| | Prints the current state buffer.
|
| |
|
|
T * | curr |
| | Current 2D Matrix buffer.
|
| |
|
T * | next |
| | Next 2D Matrix buffer.
|
| |
|
const unsigned int | height |
| | Height of 2D Matrix.
|
| |
|
const unsigned int | width |
| | Width of 2D Matrix.
|
| |
|
const Device | device |
| | Computational device.
|
| |
template<typename T>
class CellularAutomata::State< T >
2D buffered matrices
- Template Parameters
-
◆ State()
Initalizes a state.
- Parameters
-
| height | height of the grid world |
| width | width of the grid world |
| fn | function to fill the current state buffer. May be 'nullptr' |
| device | computational device |
- Exceptions
-
◆ copyTo()
Copy the own current state buffer to another current state buffer across devices.
- Parameters
-
- Exceptions
-
The documentation for this class was generated from the following files:
- /home/runner/work/CellularAutomata/CellularAutomata/CellularAutomata/include/core/common.hpp
- /home/runner/work/CellularAutomata/CellularAutomata/CellularAutomata/include/core/common.inl