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
21using namespace af;
22using namespace cv;
23
24namespace 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
ArrayFire Armadillo conversation.
Definition: FgAfArma.h:38
static void MatToArray(const arma::mat &input, af::array &output, bool transpose=true)
Matrix to array.
static arma::mat ArrayToMat(const af::array &input, bool transpose=true)
Array to matrix.
static void ArrayToMat(const af::array &input_, arma::mat &output, bool transpose=true)
Array to matrix.
static af::array MatToArray(const arma::mat &input, bool transpose=true)
Matrix to array.