dnl $Id$ dnl dnl Copyright 1989-2016 MINES ParisTech dnl dnl This file is part of PIPS. dnl dnl PIPS is free software: you can redistribute it and/or modify it dnl under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl any later version. dnl dnl PIPS is distributed in the hope that it will be useful, but WITHOUT ANY dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or dnl FITNESS FOR A PARTICULAR PURPOSE. dnl dnl See the GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with PIPS. If not, see . dnl dnl dnl GENERAL M4 MACROS dnl dnl THIS MACRO BUILDS A NAME FROM ITS ARGUMENTS, SEPARATED BY _ dnl define(`build_name',dnl `ifelse($#,0,,$#,1,``$1'',``$1 ''`build_name(shift($@))')')dnl dnl dnl FOR MACRO FROM M4 DOCUMENTATION dnl define(`forloop', `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')dnl define(`_forloop', `$4`'ifelse($1, `$3', , `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')dnl dnl dnl REPLICATE MACROS DEFINITION dnl define(`SIMPLE_REPLICATE',`dnl ifelse($1, 0, ,`forloop(`_I_', 1, $1, `$2(_I_)')')')dnl define(`COMMA_REPLICATE',dnl `ifelse($1, 0, ,dnl `forloop(`_I_', 1, $1, `ifelse(_I_, 1, `$2(_I_)',`,$2(_I_)')')')')dnl define(`REVERSE_BUT_LAST_REPLICATE',dnl `ifelse($1, 0,, $1, 1,, `$2($1) dnl REVERSE_BUT_LAST_REPLICATE(eval($1 - 1),`$2')')')dnl define(`REVERSE_REPLICATE',dnl `ifelse($1, 0,, `$2($1) dnl REVERSE_REPLICATE(eval($1 - 1),`$2')')')dnl define(`LEVEL_ZERO',`ifelse(LEVEL,0,$1,$2)')dnl dnl dnl TO7 DEFINITION dnl define(`TO7',`eval(7-$1)')dnl dnl dnl VERSIONS dnl ifdef(`_HPFC_DEBUG_',`define(`debug',`$@')',`define(`debug')')dnl ifdef(`_HPFC_DEMO_',`define(`demo',`$@')',`define(`demo')')dnl ifdef(`_HPFC_DIRECT_',`define(`_direct',`$@')',`define(`_direct')')dnl ifdef(`_HPFC_SYNC_EXIT_',`define(`sync_exit',`$@')',`define(`sync_exit')')dnl ifdef(`_HPFC_FAKE_BUFFERS_',`define(`fake_buffers',`$@')',`define(`fake_buffers')')dnl dnl dnl ARCHITECTURES dnl include(`hpfc_architecture_m4_macros')dnl dnl dnl PVM LENGTH dnl define(`M4_PVM_LENGTH',`dnl ifelse($1,`HPFC BYTE1',1,$1,`HPFC INTEGER2',2,$1,`HPFC INTEGER4',4,dnl $1,`HPFC REAL4',4,$1,`HPFC REAL8',8,$1,`HPFC COMPLEX8',8,dnl $1,`HPFC COMPLEX16',16,$1,`HPFC STRING',1)')dnl define(`m4_type_name',`dnl ifelse($1,`HPFC BYTE1',byte,dnl $1,`HPFC INTEGER2',integer*2,dnl $1,`HPFC INTEGER4',integer*4,dnl $1,`HPFC STRING',character,dnl $1,`HPFC REAL4',real*4,dnl $1,`HPFC REAL8',real*8,dnl $1,`HPFC COMPLEX8',complex*8,dnl $1,`HPFC COMPLEX16',complex*16)')dnl dnl dnl END OF GENERAL M4 MACROS dnl