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

FgAfArma.h
1
11#pragma once
12
13#undef min
14#undef max
15
16#include <NeEngineLib.h>
17#include <stdio.h>
18#include <arrayfire.h>
19#include <armadillo>
20
21 using namespace af;
22 using namespace cv;
23
24 namespace NeuralEngine
25{
26 namespace MachineLearning
27 {
37 class NE_IMPEXP AfArma
38 {
39 public:
40 // conversion for gpu
41
51 static void MatToArray(const arma::mat& input, af::array& output, bool transpose = true);
52
63 static af::array MatToArray(const arma::mat& input, bool transpose = true);
64
65 // conversion for cpu
76 static void ArrayToMat(const af::array& input_, arma::mat& output, bool transpose = true);
77
89 static arma::mat ArrayToMat(const af::array& input, bool transpose = true);
90
91 private:
92
93 static void MatToArray_(arma::mat& input, array& output, bool transpose = true);
94 };
95 }
96}
97
NeuralEngine::MachineLearning::AfArma
ArrayFire Armadillo conversation.
Definition: FgAfArma.h:38
NeuralEngine::MachineLearning::AfArma::MatToArray
static void MatToArray(const arma::mat &input, af::array &output, bool transpose=true)
Matrix to array.
NeuralEngine::MachineLearning::AfArma::ArrayToMat
static arma::mat ArrayToMat(const af::array &input, bool transpose=true)
Array to matrix.
NeuralEngine::MachineLearning::AfArma::ArrayToMat
static void ArrayToMat(const af::array &input_, arma::mat &output, bool transpose=true)
Array to matrix.
NeuralEngine::MachineLearning::AfArma::MatToArray
static af::array MatToArray(const arma::mat &input, bool transpose=true)
Matrix to array.
NeuralEngine
Definition: NeArray2.h:18