NeuralEngine A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes. |

Public Member Functions | Public Attributes | List of all members
NeuralEngine::ComputeModel Class Reference

Core item ComputeModel. More...

`#include <NeComputeModel.h>`

Collaboration diagram for NeuralEngine::ComputeModel:
[legend]

## Public Member Functions
| ComputeModel ()
| Default constructor. More...
| ComputeModel (unsigned int inNumThreads)
| Constructor. More...

## Public Attributes
unsigned int | numThreads

## Detailed Description

Core item ComputeModel.

<note> The ComputeModel class allows you to select the type of hardware to use in your computational algorithms.

If your computational algorithm requires the GPU, set 'inEngine' to the object that will execute the compute shaders. If your algorithm requires CPU multithreading, set the 'inNumThreads' to the desired number of threads, presumably 2 or larger. You can query for the number of concurrent hardware threads using std::thread::hardware_concurrency(). If you want single-threaded computations (on the main thread), set inNumThreads to 1. An example of using this class is

ComputeModel cmodel(...); if (cmodel.engine) { ComputeUsingGPU(...); } else if (cmodel.numThreads > 1) { ComputeUsingCPUMultipleThreads(); } else { ComputeUsingCPUSingleThread(); } See GenerateMeshUV<Real>::SolveSystem(...) for a concrete example.

Of course, your algorithm can interpret cmodel anyway it likes. For example, you might ignore cmodel.engine if all you care about is multithreading on the CPU. </note>

Hmetal T, 04.08.2016.

Definition at line 71 of file NeComputeModel.h.

## Constructor & Destructor Documentation

## ◆ ~ComputeModel()

virtual NeuralEngine::ComputeModel::~ComputeModel | ( |  | ) |
| inline virtual

Definition at line 75 of file NeComputeModel.h.

## ◆ ComputeModel() [1/2]

NeuralEngine::ComputeModel::ComputeModel | ( |  | ) |
| inline

Default constructor.

<note> You may derive from this class to make additional behavior available to your algorithms. For example, you might add a callback function to report progress of the algorithm. </note>

Hmetal T, 04.08.2016.

Definition at line 90 of file NeComputeModel.h.

## ◆ ComputeModel() [2/2]

NeuralEngine::ComputeModel::ComputeModel | ( | unsigned int | inNumThreads | ) |
| inline

Constructor.

<note> You may derive from this class to make additional behavior available to your algorithms. For example, you might add a callback function to report progress of the algorithm. </note>

Hmetal T, 04.08.2016.

Parameters

  inNumThreads | The in number threads.

Definition at line 107 of file NeComputeModel.h.

## Member Data Documentation

## ◆ numThreads

unsigned int NeuralEngine::ComputeModel::numThreads

Definition at line 118 of file NeComputeModel.h.

The documentation for this class was generated from the following file:

- NeComputeModel.h