|
CellularAutomata
|
2D convolution kernel More...
#include <common.hpp>
Public Member Functions | |
| Kernel (const unsigned int size, kernelFunc< T > fn, Device device) | |
| Initalizes a kernel. | |
| ~Kernel () | |
| Frees dynamically allocated memory. | |
| void | copyTo (Kernel< T > *to) |
| Copy the own kernel array to another kernel array across devices. | |
| void | print () |
| Prints the kernel array. | |
Public Attributes | |
| T * | kernel |
| 2D Matrix | |
| const unsigned int | size |
| Side length of matrix. | |
| const Device | device |
| Computational device. | |
2D convolution kernel
| T | type |
| CellularAutomata::Kernel< T >::Kernel | ( | const unsigned int | size, |
| kernelFunc< T > | fn, | ||
| Device | device | ||
| ) |
Initalizes a kernel.
| size | side length of kernel (always square) |
| fn | function to fill the kernel. May be 'nullptr' |
| device | computational device |
| DeviceNotAvailable |
| void CellularAutomata::Kernel< T >::copyTo | ( | Kernel< T > * | to | ) |
Copy the own kernel array to another kernel array across devices.
| to | other kernel |
| ShapesUnequal |