%%
%% $Id$
%%
%% Copyright 1989-2016 MINES ParisTech
%%
%% This file is part of PIPS.
%%
%% PIPS is free software: you can redistribute it and/or modify it
%% under the terms of the GNU General Public License as published by
%% the Free Software Foundation, either version 3 of the License, or
%% any later version.
%%
%% PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
%% WARRANTY; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE.
%%
%% See the GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with PIPS.  If not, see <http://www.gnu.org/licenses/>.
%%

\documentclass[a4paper]{article}

\usepackage[latin1]{inputenc}
\usepackage{newgen_domain}
\usepackage[backref,pagebackref]{hyperref}

\title{HPFC \\ (High Performance Fortran Compiler) \\ datastructure}
\author{Fabien Coelho\\
                \\
        CRI, École des mines de Paris}

\begin{document}
\maketitle

\section*{Introduction}
  Ce document présente très brèvement les domaines Newgen utilisés
par le prototype de compilateur {\tt hpfc} pour décrire les directives
de placement d'un programme HPF.

\domain{import entity from "ri.newgen"}
{}

\domain{import expression from "ri.newgen"}
{}

\section{Directives}
  Les directives HPF considérées sont l'alignement et la distribution.
L'alignement d'un tableau a lieu sur un {\tt template}, et la
distribution d'un {\em template} est faite sur un {\tt processors}.

\domain{align =  alignment* x template:entity}
{}
\domain{distribute = distribution* x processors:entity}
{}

\section{Alignements et Distributions}
  L'alignement d'une dimension de tableau sur une dimension de {\em
template} est décrit au moyen du domaine Newgen {\tt alignment}~:

\domain{alignment = arraydim:int x templatedim:int x rate:expression x constant:expression}
{
  La dimension du tableau {\tt arraydim} est alignée avec la dimension
de {\em template} {\tt templatedim} avec pour paramètres {\tt rate} et
{\tt constant}.

  La distribution d'une dimension de {\em template} sur une dimension de
{\em processors} est décrite au moyen du domaine {\tt distribution},
qui permet de retrouver le paramètre de distribution d'une part ({\tt
parameter}, et le {\tt style} de la distribution, nulle, par blocks ou
cyclique.
}

\domain{distribution = style x parameter:expression}
{}
\domain{style = \{ none , block , cyclic \}}
{}

\end{document}
