HPC Magazine Mars 2014 - OpenSPL, le langage de programmation spatiale

Listing 2 - Exemple de noyau control flow dans data flow.


class Simple Kernel extends Kernel {
  SimpleKernel() {
    SCSVar x = io.input("x", scsFix(24));
    SCSVar result = (x > 10) ? x+1 : x--1;
    io.output("y", result, scsFix(25));
  }
}