next up previous
Next: Interpolate Module Up: Library Modules Previous: Library Modules

Field Math Module

A field is an AVS data type which stores generalized multidimensional arrays. The field math module is used to perform arithmetic and logical operations (+, -, *, /, NOT, AND, OR, XOR, shift, square, square root, and root-mean-square) on AVS fields. The inputs consist of one or two fields of any type (byte, integer, float, double) and size. Binary operations may be performed either with a single field and a constant or between two fields of the same size. If the types differ, bytes are promoted to integers and integers, floats and doubles are converted to doubles.

Because of the diverse data types involved and large number of possible operators, the field math module provides a good model for the conversion and exchange of data that is required for AVS data types. The parallel implementation uses data parallelism based on the owner computes rule. After any necessary type conversions are performed by the Y-MP process, the T3D process is called and the input fields are transferred to the T3D master PE using the process memory file. The master PE partitions and distributes equal-size blocks of the input fields to the other PEs using the MPI_Scatter function. The processors perform the required operation on their own blocks in parallel and return the results to the master PE using MPI_Gather.

The primitive nature of the operations performed by the field math module makes it difficult to do enough computation in a single T3D processor to justify the cost of distributing the fields to the T3D processors. However, the structure of the T3D field math module is applicable to other modules which perform more intensive computations, as described below.



Mitch Roth
Tue Aug 6 09:57:21 ADT 1996