Mentions légales du service

Skip to content
Snippets Groups Projects
Commit fe0923e8 authored by EL MOUSSAWI Ali Hassan's avatar EL MOUSSAWI Ali Hassan
Browse files

add initial project structure and bundles from gecos svn

- gecos.model: trunk rev 17751
- model.edit: trunk rev 17725
- model.editor: trunk rev 17397
- cdtfrontend: trunk rev 17751
- includes.std: trunk rev 17799
- generator.c: trunk rev 17749
parents
Branches
Tags
No related merge requests found
Showing
with 649 additions and 0 deletions
# build output dirs
bin/
target/
# gitlab-runner local build dir
builds/
# Locally stored "Eclipse launch configurations"
*.launch
# Xtend temp files
*.xtendbin
# Tom temp files
*.tfix.parsed.table
*._trace
variables:
MAVEN_OPS: "-Dmaven.repo.local=.m2/repository -Xmx3072m"
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
cache:
paths:
- .m2/repository
# default docker image. can be overriden per job.
image: maven:3-jdk-8
stages:
- build
- test
- deploy
build:
stage: build
script:
- mvn -B -e -fae -DskipTests verify
test:
stage: test
script:
- mvn -B -e -fae -Dmaven.test.failure.ignore integration-test
deploy:
stage: deploy
script:
- mvn -B -e -fae -DskipTests -P release package
artifacts:
paths:
- releng/fr.irisa.cairn.gecos.framework.update/target/*.zip
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId>
<version>0.25.0</version>
</extension>
</extensions>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>root_pom</groupId>
<artifactId>root_pom</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tycho-version>0.26.0</tycho-version>
<mvn-compiler-version>3.6.0</mvn-compiler-version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<eclipse.repo>http://mirror.ibcp.fr/pub/eclipse</eclipse.repo>
<!-- Main: http://download.eclipse.org-->
<!-- Mirror: http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/ -->
<!-- Mirror: http://mirror.switch.ch/eclipse/ -->
</properties>
<repositories>
<repository>
<!-- eclipse version -->
<id>neon</id>
<layout>p2</layout>
<url>${eclipse.repo}/releases/neon/</url>
</repository>
<repository>
<id>TMF</id>
<layout>p2</layout>
<url>${eclipse.repo}/modeling/tmf/xtext/updates/composite/releases/</url>
</repository>
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
<outputDirectory>bin</outputDirectory>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-feature</type>
<id>org.eclipse.cdt</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mvn-compiler-version}</version>
</plugin>
<plugin>
<!-- enable tycho build extension -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<!-- eclipse updatesite -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-repository-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<repositoryName>neon_update_site</repositoryName>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
<includes>
<include>**/*IT.class</include>
<include>**/*Test.class</include>
<include>**/*TestCase.class</include>
<include>**/Test*.class</include>
</includes>
<excludes>
<exclude>**/Abstract*Test.class</exclude>
<exclude>**/Abstract*TestCase.class</exclude>
<exclude>**/*$*</exclude>
<exclude>**/skip/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<!--
<distributionManagement>
<snapshotRepository>
<id>gecos-private-snapshot</id>
<name>http://maven.inria.fr-snapshot</name>
<url>http://maven.inria.fr/artifactory/gecos-private-snapshot</url>
</snapshotRepository>
</distributionManagement>
-->
</project>
TODO
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/cdt/internal/core/pdom/indexer/IndexerPreferences"/>
</accessrules>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fr.irisa.cairn.gecos.model.cdtfrontend</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>fr.irisa.triskell.kermeta.kpm.kpmBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>fr.loria.eclipse.tom.GomBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>fr.loria.eclipse.tom.TomBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>fr.loria.eclipse.tom.TomBuildAnalyser</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>fr.loria.eclipse.tomnature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
digraph G {
compound=true;
node [shape=box];
subgraph cluster5 {
compound=true;
style=dashed;
color=gray;
label=" Composite 5()";
n1 [label="BB1"];
subgraph cluster3 {
compound=true;
style=dashed;
color=gray;
label=" Composite 3(m)";
n2 [label="BB2\nm = in.range(22, 0);\nreturn 1;\n"];
}
n6 [label="BB6"];
}
n1 -> n2[color="gray" label="Jmp"];
n2 -> n6[color="gray" label="Jmp"];
}
digraph G {
compound=true;
node [shape=box];
subgraph cluster5 {
compound=true;
style=dashed;
color=gray;
label=" Composite 5()";
n1 [label="BB1\n"];
subgraph cluster3 {
compound=true;
style=dashed;
color=gray;
label=" Composite 3(m)";
n2 [label="BB2\nm = in.range(22, 0);\nreturn 1;\n"];
}
n6 [label="BB6\n"];
}
n1 -> n2[color="gray" label="Jmp"];
n2 -> n6[color="gray" label="Jmp"];
}
<?xml version="1.0" encoding="ASCII"?>
<gecosproject:GecosProject xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:annotations="http://www.gecos.org/annotations" xmlns:blocks="http://www.gecos.org/blocks" xmlns:core="http://www.gecos.org/core" xmlns:fr.irisa.cairn.gecos.model.types="http://www.gecos.org/types" xmlns:gecosproject="http://www.irisa.fr/cairn/gecosproject" xmlns:instrs="http://www.gecos.org/instrs" name="test incs">
<includes name="/home/aelmouss/gecos/workspace/fr.irisa.cairn.gecos.model.includes.std/includes/ac_datatypes2.0"/>
<includes name="/home/aelmouss/gecos/workspace/fr.irisa.cairn.gecos.model.includes.std/includes/vivado"/>
<includes name="/home/aelmouss/gecos/workspace/fr.irisa.cairn.gecos.model.includes.std/includes/standard"/>
<sources name="/home/aelmouss/gecos/workspace/fr.irisa.cairn.gecos.model.cdtfrontend/.testscript/src-c/toto.cpp">
<model>
<scope>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:FunctionType" returnType="//@sources.0/@model/@scope/@types.0" parameters="//@sources.0/@model/@scope/@types.1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:FloatType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:FunctionType" returnType="//@sources.0/@model/@scope/@types.3" parameters="//@sources.0/@model/@scope/@types.4"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.7" size="7" signed="true" bitwidth="7" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.10" size="1" signed="true" bitwidth="1" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.15" size="2" signed="true" bitwidth="2" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.20" size="2" signed="true" bitwidth="2" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.25" size="2" signed="true" bitwidth="2" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.28" size="32" bitwidth="32" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:AliasType" alias="//@sources.0/@model/@scope/@types.29" name="FLOAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:BoolType" size="1"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:ACIntType" base="//@sources.0/@model/@scope/@types.32" size="24" bitwidth="24" overflowMode="AC_SAT"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:AliasType" alias="//@sources.0/@model/@scope/@types.33" name="mantissa"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:FunctionType" returnType="//@sources.0/@model/@scope/@types.35" parameters="//@sources.0/@model/@scope/@types.30"/>
<symbols xsi:type="core:ProcedureSymbol" type="//@sources.0/@model/@scope/@types.2" name="nu">
<scope>
<symbols xsi:type="core:ParameterSymbol" type="//@sources.0/@model/@scope/@types.1" name="n"/>
</scope>
</symbols>
<symbols xsi:type="core:ProcedureSymbol" type="//@sources.0/@model/@scope/@types.5" name="toto">
<scope>
<symbols xsi:type="core:ParameterSymbol" type="//@sources.0/@model/@scope/@types.4" name="n"/>
</scope>
</symbols>
<symbols type="//@sources.0/@model/@scope/@types.8" name="api_x"/>
<symbols type="//@sources.0/@model/@scope/@types.11" name="api_y"/>
<symbols type="//@sources.0/@model/@scope/@types.16" name="api_z"/>
<symbols type="//@sources.0/@model/@scope/@types.21" name="api_a"/>
<symbols type="//@sources.0/@model/@scope/@types.26" name="api_b"/>
<symbols xsi:type="core:ProcedureSymbol" type="//@sources.0/@model/@scope/@types.36" name="FP_to_accumulable">
<scope>
<symbols xsi:type="core:ParameterSymbol" type="//@sources.0/@model/@scope/@types.30" name="in"/>
</scope>
<procedure start="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.0" end="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.2">
<body number="5">
<scope/>
<children xsi:type="blocks:BasicBlock" number="1">
<outEdges to="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@children.0"/>
</children>
<children xsi:type="blocks:CompositeBlock" number="3">
<scope>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:VoidType"/>
<types xsi:type="fr.irisa.cairn.gecos.model.types:IntegerType" size="32"/>
<symbols type="//@sources.0/@model/@scope/@types.34" name="m"/>
</scope>
<children xsi:type="blocks:BasicBlock" number="2" inEdges="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.0/@outEdges.0">
<outEdges to="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.2"/>
<instructions xsi:type="instrs:SetInstruction" type="//@sources.0/@model/@scope/@types.34">
<children xsi:type="instrs:SymbolInstruction" type="//@sources.0/@model/@scope/@types.34" symbol="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@scope/@symbols.0"/>
<children xsi:type="instrs:MethodCallInstruction" type="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@scope/@types.2" name="range">
<children xsi:type="instrs:IntInstruction" type="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@scope/@types.0" value="22"/>
<children xsi:type="instrs:IntInstruction" type="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@scope/@types.1"/>
<receiver xsi:type="instrs:SymbolInstruction" type="//@sources.0/@model/@scope/@types.30" symbol="//@sources.0/@model/@scope/@symbols.7/@scope/@symbols.0"/>
</children>
</instructions>
<instructions xsi:type="instrs:RetInstruction" type="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@scope/@types.3">
<children xsi:type="instrs:IntInstruction" type="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@scope/@types.3" value="1"/>
</instructions>
</children>
</children>
<children xsi:type="blocks:BasicBlock" number="6" inEdges="//@sources.0/@model/@scope/@symbols.7/@procedure/@body/@children.1/@children.0/@outEdges.0"/>
</body>
</procedure>
</symbols>
</scope>
<annotations key="#pragma">
<value xsi:type="annotations:PragmaAnnotation">
<content>S2S4HLS:MODULE:PRINT:#include &lt;ap_int.h></content>
</value>
</annotations>
<annotations key="original_file_base_name">
<value xsi:type="annotations:StringAnnotation" content="/home/aelmouss/gecos/workspace/fr.irisa.cairn.gecos.model.cdtfrontend/.testscript/src-c/toto.cpp"/>
</annotations>
</model>
</sources>
</gecosproject:GecosProject>
#include "included_c.c"
#include <ap_int.h>
typedef ap_uint<32> FLOAT;
typedef ap_uint<24> mantissa;
int nu(int n);
float toto(int n);
ap_int<7> api_x;
ap_int<1> api_y;
ap_int<2> api_z;
ap_int<2> api_a;
ap_int<2> api_b;
int FP_to_accumulable(FLOAT in);
int FP_to_accumulable(FLOAT in) {
mantissa m;
m = in.range(22, 0);
return 1;
}
typedef int* imgpel[1000][1000];
extern int block_sad[1000];
extern int BlockSAD[100][10][5][100][100];
extern int pos_00[1000][1000],offset_x,offset_y;
extern int block_index;
extern int GlobalMem[1000000];
extern int spiral_search_x[100],spiral_search_y[100];
int shift(int,int);
int MV_COST_SMP(int,int,int,short,short);
int // ==> minimum motion cost after search
FastFullPelBlockMotionSearch (imgpel* orig_pic, // <-- not used
short ref, // <-- reference frame (0... or -1 (backward))
int list,
int pic_pix_x, // <-- absolute x-coordinate of regarded AxB block
int pic_pix_y, // <-- absolute y-coordinate of regarded AxB block
int blocktype, // <-- block type (1-16x16 ... 7-4x4)
short pred_mv_x, // <-- motion vector predictor (x) in sub-pel units
short pred_mv_y, // <-- motion vector predictor (y) in sub-pel units
short mv_x, // --> motion vector (x) - in pel units
short mv_y, // --> motion vector (y) - in pel units
int search_range, // <-- 1-d search range in pel units
int min_mcost, // <-- minimum motion cost (cost for center or huge value)
int lambda_factor) // <-- lagrangian parameter for determining motion cost
{
int max_pos,best_pos,pos;
int input_rdopt;
int mcost,affine;
int cand_x,cand_y;
max_pos = (2*search_range+1)*(2*search_range+1); // number of search positions
best_pos = 0; // position with minimum motion cost
//===== cost for (0,0)-vector: it is done before, because MVCost can be negative =====
if (input_rdopt != 0)
{
mcost = block_sad[pos_00[list][ref]] + MV_COST_SMP (lambda_factor, 0, 0, pred_mv_x, pred_mv_y);
// if (mcost < min_mcost)
if(affine > 0)
{
min_mcost = mcost;
best_pos = pos_00[list][ref];
}
}
//===== loop over all search positions =====
for (pos=0; pos<max_pos; pos++)
{
//--- check residual cost ---
if (BlockSAD[list][ref][blocktype][block_index][pos] < min_mcost)
{
//--- get motion vector cost ---
cand_x = shift((offset_x + spiral_search_x[pos]),2);
cand_y = shift((offset_y + spiral_search_y[pos]),2);
mcost = BlockSAD[list][ref][blocktype][block_index][pos];
mcost += MV_COST_SMP (lambda_factor, cand_x, cand_y, pred_mv_x, pred_mv_y);
//--- check motion cost ---
if (mcost < min_mcost)
{
min_mcost = mcost;
best_pos = pos;
}
}
}
//===== set best motion vector and return minimum motion cost =====
GlobalMem[mv_x] = offset_x + spiral_search_x[best_pos];
GlobalMem[mv_y] = offset_y + spiral_search_y[best_pos];
return(min_mcost);
}
typedef int* TS_DESC_2D[2];
extern float pivot[2];
extern float coef[2];
extern float inv[1000][1000][2];
extern float matinvptr[1000][1000][2];
void STAP_Mat_Invert(TS_DESC_2D mat, TS_DESC_2D matinv, int mat_ch_dim1,
int mat_ch_dim2, int matinv_ch_dim1, int matinv_ch_dim2) {
int i, j, k, re, im, l;
for (i = 0; i < mat_ch_dim1; i++) {
//recherche de pivot
pivot[0] = inv[i][i][0]; //S0 par defaut le pivot est l'élément sur la diagonale
pivot[1] = inv[i][i][1]; //S1
for (j = i; j < 2 * mat_ch_dim2; j++) {
re = inv[i][j][0]; //S2
im = inv[i][j][1]; //S3
inv[i][j][0] = (re * pivot[0] + im * pivot[1]) / (pivot[0] * pivot[0] + pivot[1] * pivot[1]); //S4
inv[i][j][1] = (im * pivot[0] - re * pivot[1]) / (pivot[0] * pivot[0] + pivot[1] * pivot[1]); //S5
} //(x+iy)/(a+ib)=((xa+yb)+i(ya-xb))/(a²+b²)
for (k = 0; k < mat_ch_dim2; k++) {
if (i > k || i < k) {
coef[0] = inv[k][i][0]; //S6
coef[1] = inv[k][i][1]; //S7 : S7[i, k] -> [0, i, 2, k, 1, 0, 0]
for (l = i; l < 2 * mat_ch_dim2; l++) {
inv[k][l][0] -= (coef[0] * inv[i][l][0] - coef[1] * inv[i][l][1]); //S8 -> S8[i, k, l] -> [0, i, 2, k, 1, l, 0]
inv[k][l][1] -= (coef[0] * inv[i][l][1] + coef[1] * inv[i][l][0]); //S9
}
}
}
}
//mettre le resultat dans matinvptr
for (i = 0; i < matinv_ch_dim1; i++) {
for (j = 0; j < matinv_ch_dim2; j++) {
matinvptr[i][j][0] = inv[i][j + mat_ch_dim2][0]; //S10
matinvptr[i][j][1] = inv[i][j + mat_ch_dim2][1]; //S11
}
}
}
typedef int int32;
void gauss_C99_I32(int h, int w, int32** X, int i0, int i1, int j0, int j1, int32** Y)
/* ---------------------------------------------------------------------------------------- */
{
/*
* [1 2 1]
* [2 4 2]
* [1 2 1]
*/
int i,j;
for(i=i0+1; i<=i1-1; i++) {
for(j=j0+1; j<=j1-1; j++) {
Y[i][j] = X[i-1][j-1] + 2*X[i-1][j] + X[i-1][j+1];
Y[i][j] += 2*X[i ][j-1] + 4*X[i ][j] + 2*X[i ][j+1];
Y[i][j] += X[i+1][j-1] + 2*X[i+1][j] + X[i+1][j+1];
Y[i][j] /= 16;
}
}
// voir fonction appelante
//makeBorder1_2D_I32(Y, i0, i1, j0, j1); // post duplication ->[i0..i1]x[j0..j1]
}
#pragma gcs_array_flattening(2)
int y[3][4];
#pragma GCS_PURE_FUNCTION
int test1(int cv);
#pragma GCS_PURE_FUNCTION
int test1(int cv) {
static int a;
register int *x,c;
int b;
int i;
int j;
#pragma unroll
for (i=0;i<16;i++){
#pragma test1
// This is a comment
a +=x[i];
#pragma test2
}
// This is a comment
#pragma unroll
for (i=0;i<3;i++) {
#pragma unroll
x[i];
for (j=0;j<4;j++) {
b+=y[i][j];
}
}
return 0;
}
int test (int var){
return (var+3);
}
/*ca c'est une fonction qui utilise une fontion en parametre*/
/*cette fonction met 3 comme variable d'entrée à la fonction entrée en parametre*/
int fonction (
#pragma GCS_PURE_FUNCTION
int (*fonc)()
){
return 0;
}
/*fonction principale*/
/*affiche le resultat a l'aide de printf ...*/
int main(){
/*printf ("\n");
printf ("resultat %i ...", fonction(test));
printf ("\n");*/
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment