blob: 596cb077a5bf093ebda92ecacc0676021c7c2aba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
-- { dg-do compile { target i?86-*-* x86_64-*-* } }
-- { dg-options "-O3 -msse2 -fdump-tree-vect-details" }
package body Vect5 is
function "+" (X : Varray; Y : Long_Float) return Varray is
R : Varray (X'Range);
begin
for I in X'Range loop
R(I) := X(I) + Y;
end loop;
return R;
end;
procedure Add (X : Varray; Y : Long_Float; R : out Varray) is
begin
for I in X'Range loop
R(I) := X(I) + Y;
end loop;
end;
procedure Add (X : not null access Varray; Y : Long_Float; R : not null access Varray) is
begin
for I in X'Range loop
R(I) := X(I) + Y;
end loop;
end;
function "+" (X : Sarray; Y : Long_Float) return Sarray is
R : Sarray;
begin
for I in Sarray'Range loop
R(I) := X(I) + Y;
end loop;
return R;
end;
procedure Add (X : Sarray; Y : Long_Float; R : out Sarray) is
begin
for I in Sarray'Range loop
R(I) := X(I) + Y;
end loop;
end;
procedure Add (X : not null access Sarray; Y : Long_Float; R : not null access Sarray) is
begin
for I in Sarray'Range loop
R(I) := X(I) + Y;
end loop;
end;
function "+" (X : Darray1; Y : Long_Float) return Darray1 is
R : Darray1;
begin
for I in Darray1'Range loop
R(I) := X(I) + Y;
end loop;
return R;
end;
procedure Add (X : Darray1; Y : Long_Float; R : out Darray1) is
begin
for I in Darray1'Range loop
R(I) := X(I) + Y;
end loop;
end;
procedure Add (X : not null access Darray1; Y : Long_Float; R : not null access Darray1) is
begin
for I in Darray1'Range loop
R(I) := X(I) + Y;
end loop;
end;
function "+" (X : Darray2; Y : Long_Float) return Darray2 is
R : Darray2;
begin
for I in Darray2'Range loop
R(I) := X(I) + Y;
end loop;
return R;
end;
procedure Add (X : Darray2; Y : Long_Float; R : out Darray2) is
begin
for I in Darray2'Range loop
R(I) := X(I) + Y;
end loop;
end;
procedure Add (X : not null access Darray2; Y : Long_Float; R : not null access Darray2) is
begin
for I in Darray2'Range loop
R(I) := X(I) + Y;
end loop;
end;
function "+" (X : Darray3; Y : Long_Float) return Darray3 is
R : Darray3;
begin
for I in Darray3'Range loop
R(I) := X(I) + Y;
end loop;
return R;
end;
procedure Add (X : Darray3; Y : Long_Float; R : out Darray3) is
begin
for I in Darray3'Range loop
R(I) := X(I) + Y;
end loop;
end;
procedure Add (X : not null access Darray3; Y : Long_Float; R : not null access Darray3) is
begin
for I in Darray3'Range loop
R(I) := X(I) + Y;
end loop;
end;
end Vect5;
-- { dg-final { scan-tree-dump-times "vectorized 1 loops" 15 "vect" } }
-- { dg-final { cleanup-tree-dump "vect" } }
|