FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


SIMPLIFY EXPRESSIONS TO TRIPLES

Syntax:

[DO NOT] SIMPLIFY EXPRESSIONS TO TRIPLES

[DO NOT] REDUCE EXPRESSIONS TO TRIPLES

TRIPLES

Function:

Scalar assignment statements are split into statements of the form A = B <operator> C. Additional temporary local variables, named, for example, rtemp_1, rtemp_2 etc. are created if they are required, and declarations are added for them. No change is made to statements introduced by Fortran keywords.

This command is used to prepare code for execution on machines with novel architectures. Please see "APPRASE: Automatic parallelisation of Fortran to run on an FPGA" Farrimond B.T., Collins J. and Sharma A. 2008, Paper presented at The Summer Conference of the Society for Computer Simulation, Edinburgh, Scotland, June 2008. The command is used in combination with the commands:

Note, however, that unexpected speed improvements have been observed when this change is made to some Fortran codes.

Where to use this command:

Operating system command line

Yes


Configuration file, config.fsp

Yes


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

Yes


Interactive command files

Yes


Embedded in the Fortran code

Yes


Default:

This change is not made by default (Note that defaults may be modified in the configuration file).

Example:

The code fragment shown below computes a polynomial:

REAL*8 r,x,k0,k1,k2,k3,k4 r = k0 + k1*x + k2*x*x + k3*x*x*x

This code is modified by the command (written in an fsp script):

% reduce expressions to triples

REAL*8 rtemp_1 REAL*8 rtemp_2 REAL*8 rtemp_3 REAL*8 rtemp_4 REAL*8 rtemp_5 REAL*8 rtemp_6 REAL*8 rtemp_7 REAL*8 rtemp_8 REAL*8 r,x,k0,k1,k2,k3,k4 ! ! FPT r=k0+k1*x+k2*x*x+k3*x*x*x rtemp_1=k1*x rtemp_2=k2*x rtemp_3=rtemp_2*x rtemp_4=k3*x rtemp_5=rtemp_4*x rtemp_6=rtemp_5*x rtemp_7=k0+rtemp_1 rtemp_8=rtemp_7+rtemp_3 r=rtemp_8+rtemp_6

Note that the original statement is commented-out by the delimiter "! FPT ".


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.