CellularAutomata
Loading...
Searching...
No Matches
CellularAutomata Namespace Reference

Main namespace. More...

Namespaces

namespace  Activations
 Commonly used activation functions.
 
namespace  exception
 Contains all custom exceptions.
 
namespace  Kernels
 Commonly used kernel values.
 
namespace  random
 Global random number generator wrapping the std::random utilities.
 
namespace  States
 Commonly used state initializations.
 

Classes

class  Kernel
 2D convolution kernel More...
 
class  State
 2D buffered matrices More...
 

Enumerations

enum  Device { CPU , CUDA }
 Computational device. More...
 

Functions

template<typename T , typename Activation >
void Epoch (State< T > *state, Kernel< T > *kernel, Activation activation, bool recursive)
 Runs a single epoch on a given state using a kernel.
 

Detailed Description

Main namespace.

Enumeration Type Documentation

◆ Device

Computational device.

Note
A object allocated on a specific device can only interact with objects on the same device.
Enumerator
CPU 

Allocation & computation on CPU/RAM.

CUDA 

Allocation & computation on NVIDIA GPU via CUDA.

Function Documentation

◆ Epoch()

template<typename T , typename Activation >
void CellularAutomata::Epoch ( State< T > *  state,
Kernel< T > *  kernel,
Activation  activation,
bool  recursive 
)

Runs a single epoch on a given state using a kernel.

Note
Device must be equal and is determined by the state
Template Parameters
Ttype
Activationfunctor
Parameters
statestate of type T
kernelkernel of type T
activationfunctor of type T
recursiveif world should be looping (flat grid behaves like torus surface)
Exceptions
DevicesUnequal