--
-- This program measures the time required for the adding of the
-- elements of a large floating point vector
--

with Instrument;
use Instrument;

procedure Vfada2 is

    Vector_Size : constant Positive := 1000;

    type Vector is array (1 .. Vector_Size) of Float;

    V1, V2 : Vector := (others => 0.000_001);
    Vector_Result : Vector := (others => 0.0);

begin
    Start ("VFADA2", "Vector floating pt. addition (test)");

    for I in 1 .. 1000 loop

        -- Add vector elements
        for N in Vector'Range loop
            Vector_Result (N) := V1 (N) +
                                    V2 (N);     -- included in test version
            Vector_Result (N) := Float (Ident_Int (N));
        end loop;

    end loop;
    Stop;

end Vfada2;