<?xml version="1.0"?>

<document extend="style.bml">

<pageTitle> Download </pageTitle>
<pageLink>
	<define name="download.html" scope="global"/> 
</pageLink>

<import document="prec_sitemap.bml"/>

<pageNavigation>
  <maplink link="#down" title="Download"/>
  <maplink link="#install" title="Install"/>
  <maplink link="#usage" title="First Usage"/>
</pageNavigation>


<content>
  <firstSection title="Download" id="down">
<table class="bordered">
	<tr><th>File</th><th>Description</th><th>release date</th></tr>
	<!--<tr><td><a
	href="files/precompiler_algorithm.tar.gz">precompiler_algorithm.tar.gz</a></td><td>ACM
	TOMS Algorithm submission</td><td>24/8/2005</td></tr>-->
	<tr><td><a href="files/precompiler.tar.gz">precompiler.tar.gz</a></td><td>Source code</td><td>17/5/2006</td></tr>
	<tr><td><a href="files/precompiler-bin.tar.gz">precompiler-bin.tar.gz</a></td><td>Linux binary</td><td>17/5/2006</td></tr>
	<tr><td><a href="files/precompiler-bin64.tar.gz">precompiler-bin64.tar.gz</a></td><td>Linux binary for new 64 bit machines</td><td>17/05/2006</td></tr>
	<tr><td><a href="files/precompiler-win32.zip">precompiler-win32.zip</a></td><td>Windows binary (tested on Windows 2000 and XP)</td><td>17/5/2006</td></tr>
	<tr><td><a href="files/precompiler-MacOSX.tar.gz">precompiler-MacOSX.tar.gz</a></td><td>Binary for Mac OS X compiled with darwin ports.</td><td>17/5/2006</td></tr>
	<tr><td><a href="files/test.cpp">test.cpp</a></td><td>test input file</td><td>14/7/2005</td></tr>
	<tr><td><a href="files/in.cpp">in.cpp</a></td><td>input file used in <a href="examples.html">examples</a></td><td>1/2/2006</td></tr>
	<tr><td><a href="files/precompile.xml">precompile.xml</a></td><td>test configuration file</td><td>14/7/2005</td></tr>
	<tr><td><a href="files/mpieee.xml">mpieee.xml</a></td><td>configuration file used in <a href="examples.html">examples</a></td><td>1/2/2006</td></tr>
	<tr><td><a href="files/convert.schema">convert.schema</a></td><td>Schema definition for conversion configuration files</td><td>20/9/2006</td></tr>
	<tr><td><a href="files/convert.dtd">convert.dtd</a></td><td>DTD for conversion configuration files</td><td>20/9/2006</td></tr>
	<tr><td><a href="files/skip.schema">skip.schema</a></td><td>Schema definition for conversion configuration files</td><td>20/9/2006</td></tr>
	<tr><td><a href="files/skip.dtd">skip.dtd</a></td><td>DTD for conversion configuration files</td><td>20/9/2006</td></tr>
</table>
  </firstSection>
  
  <section title="Installation" id="install">
    <b>Requirements for compiling sources:</b><br/>
    <p>
      QT 3.2.3 or greater and tools (qmake) must be installed.
    </p>
    <b>Unix</b><br/>
    <p>
    Run the following commands in your favorite shell.
    </p>
	  <pre>
tar -xzvf precompiler.tar.gz
cd precompiler
qmake precompile.pro
make
	  </pre>
  <b>Binaries for Windows/Linux </b><br/>
  <p>
	Download and extract the binary package for your platform.
	Copy the binary executable <b>precompile</b> to the correct path (in Linux /usr/bin/ or /usr/local/bin ).
  </p>	            
	</section>		

<section title="First Usage" id="usage">
<p>
To precompile the code in the file <a href="files/test.cpp">test.cpp</a>,
according to the type conversions specified in the configuration file 
<a href="files/precompile.xml">precompile.xml</a>, execute:<br/>
</p>
<pre>
 ./precompile test.cpp test_pre.cpp -x precompile.xml
</pre>

<p>
The output file test_pre.cpp generated by the precompiler should look
like this:<br/>
</p>
<pre>
wschrep> cat test_pre.cpp
#include <lt/>iostream>
#include <lt/>iomanip>
using namespace std;

#include "MpIeee.hh"
#include "ArithmosIO.hh"

#include <lt/>stdio.h>

MpIeee func(MpIeee <amp/> a){
  MpIeee k;
  for(int i= 1;i<lt/>5;i++)
    for(int j= 1;j<lt/>3;j++){
      char k=32;
      if(i+j>5) k='y';
      if(k=='y') {cout<lt/><lt/>"k="<lt/><lt/>k<lt/><lt/>", i+j="<lt/><lt/>i+j<lt/><lt/>"\n";}
    }
  k=MpIeee( "2" )*a;
  return MpIeee( "3" )*a;
}

int main(){
  MpIeee b= MpIeee( "0.1" );MpIeee c= MpIeee( "0" );
  MpIeee d[3][3]=
    {
      MpIeee( "1.0" ), MpIeee( "2.0" ), MpIeee( "3" ),
      MpIeee( "4" ), MpIeee( "5" ), MpIeee( "6" ),
      MpIeee( "7" ), MpIeee( "8" ), MpIeee( "9" )
    };
  c=MpIeee( "3" )+MpIeee( "26" );
  b=func(c);
  {cout<lt/><lt/>"b="<lt/><lt/>setiosflags((ios::fixed <amp/> ios::floatfield))<lt/><lt/>b;
cout.precision(6);cout.fill('
');cout.width(0);cout.setf(ios::dec,ios::basefield);
cout<lt/><lt/>resetiosflags((ios::fixed <amp/> ios::floatfield))<lt/><lt/>"\n";}
  {cout<lt/><lt/>"d[1][2]="<lt/><lt/>setiosflags((ios::fixed <amp/> ios::floatfield))<lt/><lt/>d[1][2];
cout.precision(6);cout.fill('
');cout.width(0);cout.setf(ios::dec,ios::basefield);
cout<lt/><lt/>resetiosflags((ios::fixed <amp/> ios::floatfield))<lt/><lt/>"\n";}
  return 0;
}
</pre>


</section>
</content>

</document>
