Commit e78a8ec7 authored by Jean Meurice's avatar Jean Meurice
Browse files

Armadillo includes -> .h

parent 71b9df35
...@@ -28,7 +28,7 @@ public class ArmadilloHelperSource { ...@@ -28,7 +28,7 @@ public class ArmadilloHelperSource {
public static String armadilloHelperSourceCode = "#ifndef HELPERA_H\n" + public static String armadilloHelperSourceCode = "#ifndef HELPERA_H\n" +
"#define HELPERA_H\n" + "#define HELPERA_H\n" +
"#include <iostream>\n" + "#include <iostream>\n" +
"#include \"armadillo\"\n" + "#include \"armadillo.h\"\n" +
"#include <stdarg.h>\n" + "#include <stdarg.h>\n" +
"#include <initializer_list>\n" + "#include <initializer_list>\n" +
"#include <fstream>\n" + "#include <fstream>\n" +
......
...@@ -96,12 +96,11 @@ public class LanguageUnitCPP extends LanguageUnit { ...@@ -96,12 +96,11 @@ public class LanguageUnitCPP extends LanguageUnit {
List<String> alreadyGeneratedIncludes = new ArrayList<>(); List<String> alreadyGeneratedIncludes = new ArrayList<>();
//includes //includes
//add default include //add default include
if (MathConverter.curBackend.getBackendName().equals("OctaveBackend")) { String backendName = MathConverter.curBackend.getBackendName();
resultString += "#include \"octave/oct.h\"\n"; if (backendName.equals("OctaveBackend") || backendName.equals("ArmadilloBackend")){
alreadyGeneratedIncludes.add("octave/oct"); String includeHeaderName = MathConverter.curBackend.getIncludeHeaderName();
} else if (MathConverter.curBackend.getBackendName().equals("ArmadilloBackend")) { resultString += "#include \"" + includeHeaderName + ".h\"\n";
resultString += "#include \"" + MathConverter.curBackend.getIncludeHeaderName() + "\"\n"; alreadyGeneratedIncludes.add(includeHeaderName);
alreadyGeneratedIncludes.add(MathConverter.curBackend.getIncludeHeaderName());
} }
for (Variable v : bluePrint.getVariables()) { for (Variable v : bluePrint.getVariables()) {
//TODO remove multiple same includes //TODO remove multiple same includes
......
#ifndef HELPERA_H #ifndef HELPERA_H
#define HELPERA_H #define HELPERA_H
#include <iostream> #include <iostream>
#include "armadillo" #include "armadillo.h"
#include <stdarg.h> #include <stdarg.h>
#include <initializer_list> #include <initializer_list>
using namespace arma; using namespace arma;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment