Skip to content

Commit

Permalink
- Implemented the rest of RTOpts_omc.cpp needed for Main_main
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7128 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 20, 2010
1 parent 363d69a commit 3bd28c2
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Compiler/RTOpts.mo
Expand Up @@ -97,7 +97,7 @@ end noProc;
public function setEliminationLevel
input Integer level;

external "C" annotation(Library = "omcruntime");
external "C" RTOpts_setEliminationLevel(level) annotation(Library = "omcruntime");
end setEliminationLevel;

public function eliminationLevel
Expand Down Expand Up @@ -176,7 +176,7 @@ public function setAnnotationVersion
setAnnotationVersion(\"3.x\");
for annotations: 1.x or 2.x or 3.x"
input String annotationVersion;
external "C" annotation(Library = "omcruntime");
external "C" RTOpts_setAnnotationVersion(annotationVersion) annotation(Library = "omcruntime");
end setAnnotationVersion;

public function getNoSimplify
Expand All @@ -190,11 +190,8 @@ public function getNoSimplify
end getNoSimplify;

public function setNoSimplify
"@author: adrpo 2008-12-13
setAnnotationVersion(\"3.x\");
for annotations: 1.x or 2.x or 3.x"
input Boolean noSimplify;
external "C" annotation(Library = "omcruntime");
external "C" RTOpts_setNoSimplify(noSimplify) annotation(Library = "omcruntime");
end setNoSimplify;

public function vectorizationLimit
Expand All @@ -207,7 +204,7 @@ end vectorizationLimit;
public function setVectorizationLimit
"Sets the vectorization limit, see vectorizationLimit above."
input Integer limit;
external "C" annotation(Library = "omcruntime");
external "C" RTOpts_setVectorizationLimit(limit) annotation(Library = "omcruntime");
end setVectorizationLimit;

public function showAnnotations
Expand All @@ -217,7 +214,7 @@ end showAnnotations;

public function setShowAnnotations
input Boolean show;
external "C" annotation(Library = "omcruntime");
external "C" RTOpts_setShowAnnotations(show) annotation(Library = "omcruntime");
end setShowAnnotations;

public function getRunningTestsuite
Expand All @@ -229,14 +226,14 @@ public function getEvaluateParametersInAnnotations
"@author: adrpo
flag to tell us if we should evaluate parameters in annotations"
output Boolean shouldEvaluate;
external "C";
external "C" shouldEvaluate=RTOpts_getEvaluateParametersInAnnotations() annotation(Library = "omcruntime");
end getEvaluateParametersInAnnotations;

public function setEvaluateParametersInAnnotations
"@author: adrpo
flag to tell us if we should evaluate parameters in annotations"
input Boolean shouldEvaluate;
external "C";
external "C" RTOpts_setEvaluateParametersInAnnotations(shouldEvaluate) annotation(Library = "omcruntime");
end setEvaluateParametersInAnnotations;

end RTOpts;
Expand Down
64 changes: 64 additions & 0 deletions Compiler/runtime/RTOpts_omc.cpp
Expand Up @@ -75,6 +75,10 @@ extern int RTOpts_showAnnotations() {
return showAnnotations;
}

extern void RTOpts_setShowAnnotations(int show) {
showAnnotations = show;
}

extern int RTOpts_getNoSimplify() {
return noSimplify;
}
Expand All @@ -95,4 +99,64 @@ extern int RTOpts_acceptMetaModelicaGrammar() {
return acceptedGrammar == GRAMMAR_METAMODELICA;
}

extern int RTOpts_getRunningTestsuite() {
return running_testsuite;
}

extern int RTOpts_level() {
return elimination_level;
}

extern void RTOpts_setEliminationLevel(int level) {
elimination_level = level;
}

extern const char* RTOpts_classToInstantiate() {
return class_to_instantiate;
}

extern double RTOpts_bandwidth() {
return bandwidth;
}

extern int RTOpts_getEvaluateParametersInAnnotations() {
return evaluateParametersInAnnotations;
}

extern void RTOpts_setEvaluateParametersInAnnotations(int eval) {
evaluateParametersInAnnotations = eval;
}

extern const char* RTOpts_getAnnotationVersion() {
return annotation_version;
}

extern void RTOpts_setAnnotationVersion(const char* version) {
annotation_version = version;
}

extern int RTOpts_vectorizationLimit() {
return vectorization_limit;
}

extern void RTOpts_setVectorizationLimit(int limit) {
vectorization_limit = limit;
}

extern int RTOpts_simulationCg() {
return simulation_cg;
}

extern int RTOpts_silent() {
return silent;
}

extern int RTOpts_splitArrays() {
return split_arrays;
}

extern int RTOpts_versionRequest() {
return version_request;
}

}

0 comments on commit 3bd28c2

Please sign in to comment.