File : test.adb
------------------------------------------------------------------------------
--
-- procedure Test (body)
--
-- Testing routine for the Mandelbrot packages.
--
------------------------------------------------------------------------------
-- Update information:
--
-- 2001.07.30 (Jacob Sparre Andersen)
-- Written.
--
-- (Insert additional update information above this line.)
------------------------------------------------------------------------------
-- Standard packages:
------------------------------------------------------------------------------
-- Other packages:
with Mandelbrot;
with Mandelbrot.Parallel;
with Mandelbrot.Serial;
------------------------------------------------------------------------------
procedure Test is
---------------------------------------------------------------------------
-- type Real:
type Real is digits 12;
---------------------------------------------------------------------------
-- package MB:
package MB is new Mandelbrot (Real);
---------------------------------------------------------------------------
-- package Serial_Processing:
package Serial_Processing is new MB.Serial;
---------------------------------------------------------------------------
-- package Parallel_Processing:
package Parallel_Processing is new MB.Parallel;
---------------------------------------------------------------------------
use MB;
use MB.Complex_Types;
Map : Map_Type (1 .. 300, 1 .. 300);
View : View_Description := (Width => Map'Length (1),
Height => Map'Length (2),
Iteration_Limit => 1_000,
Re_Min => -2.0,
Re_Max => +2.0,
Im_Min => -2.0*i,
Im_Max => +2.0*i);
begin -- Test
Serial_Processing.Calculate (View => View,
Map => Map);
Save (Name => "mandelbrot-serial.pgm",
Map => Map);
Parallel_Processing.Calculate (View => View,
Map => Map);
Save (Name => "mandelbrot-parallel.pgm",
Map => Map);
end Test;