gs_lesson1 Example¶
Python Version¶
Model Code:
1 | print('Hello from Python')
|
Model YAML:
1 2 3 4 | models:
- name: python_model
language: python # Runs the python script using default Python
args: ./src/gs_lesson1.py
|
Matlab Version¶
Model Code:
1 | disp('Hello from Matlab');
|
Model YAML:
1 2 3 4 | models:
- name: matlab_model
language: matlab # Runs the script using a Matlab engine
args: ./src/gs_lesson1.m
|
C Version¶
Model Code:
1 2 3 4 5 6 7 | #include <stdio.h>
int main(int argc, char *argv[]) {
printf("Hello from C\n");
return 0;
}
|
Model YAML:
1 2 3 4 | models:
- name: c_model
language: c # Compiles the C code with necessary cis_interface libraries
args: ./src/gs_lesson1.c
|
C++ Version¶
Model Code:
1 2 3 4 5 6 | #include <iostream>
int main(int argc, char *argv[]) {
std::cout << "Hello from C++" << std::endl;
return 0;
}
|
Model YAML:
1 2 3 4 | models:
- name: cpp_model
language: c++ # Compiles the C++ code with necessary cis_interface libraries
args: ./src/gs_lesson1.cpp
|