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

NeComputeModel.h
1
11#pragma once
12
13#include <NeCoreLib.h>
14
15// Expose this define if you want GPGPU support in computing any algorithms
16// that have a GPU implemetnation. Alternatively, your application can
17// define this in the project settings so that you do not have to edit this
18// source file.
19//
20//#define NE_COMPUTE_MODEL_ALLOW_GPGPU
21
22#if defined(NE_COMPUTE_MODEL_ALLOW_GPGPU)
23#include <memory>
24#endif
25
26 namespace NeuralEngine
27{
28
29#if defined(NE_COMPUTE_MODEL_ALLOW_GPGPU)
30 class GraphicsEngine;
31 class ProgramFactory;
32#endif
33
71 class NE_IMPEXP ComputeModel
72 {
73 public:
74
75 virtual ~ComputeModel()
76 {
77 }
78
90 ComputeModel() : numThreads(1)
91 {
92 }
93
107 ComputeModel(unsigned int inNumThreads) : numThreads(inNumThreads > 0 ? inNumThreads : 1)
108 {
109 }
110
111#if defined(NE_COMPUTE_MODEL_ALLOW_GPGPU)
112 ComputeModel(unsigned int inNumThreads, std::shared_ptr<GraphicsEngine> const& inEngine, std::shared_ptr<ProgramFactory> const& inFactory)
113 : numThreads(inNumThreads > 0 ? inNumThreads : 1), engine(inEngine), factory(inFactory)
114 {
115 }
116#endif
117
118 unsigned int numThreads;
119#if defined(NE_COMPUTE_MODEL_ALLOW_GPGPU)
120 std::shared_ptr<GraphicsEngine> engine;
121 std::shared_ptr<ProgramFactory> factory;
122#endif
123 };
124
125}
NeuralEngine::ComputeModel
Core item ComputeModel.
Definition: NeComputeModel.h:72
NeuralEngine::ComputeModel::ComputeModel
ComputeModel()
Default constructor.
Definition: NeComputeModel.h:90
NeuralEngine::ComputeModel::ComputeModel
ComputeModel(unsigned int inNumThreads)
Constructor.
Definition: NeComputeModel.h:107
NeuralEngine
Definition: NeArray2.h:18