CellularAutomata
Loading...
Searching...
No Matches
Custom Activations

Macros

#define ACTIVATION(name, body)
 Macro for defining custom activations.
 

Detailed Description

Shorthand for creating a class and overloading the 'operator()'-function.

Note
Functors are needed because CUDA function pointers are not (easily) accessible from host code.

Macro Definition Documentation

◆ ACTIVATION

#define ACTIVATION (   name,
  body 
)
Value:
template <typename T> \
class name \
{ \
public: \
cudaFn T operator()(const T x) const body \
};

Macro for defining custom activations.

Parameters
nameFunctor name
bodyFunction body (input as parameter 'x')