1 /* { dg-require-effective-target vect_double } */
7 typedef __SIZE_TYPE__
size_t;
9 extern void *malloc (size_t __size
) __attribute__ ((__nothrow__
,
13 static const num_t num__infty
= ((num_t
)1.0)/((num_t
)0.0);
16 typedef struct oct_tt oct_t
;
18 typedef unsigned int var_t
;
31 struct oct_tt
* closed
;
36 void* octfapg_mm_malloc (size_t t
);
37 oct_t
* octfapg_alloc (var_t n
);
38 oct_t
* octfapg_full_copy (oct_t
* m
);
41 typedef struct mmalloc_tt mmalloc_t
;
69 octfapg_mm_malloc (size_t t
)
71 char* m
= (char*)malloc(t
+sizeof(mmheader_t
));
72 return m
+sizeof(mmheader_t
);
75 oct_t
* octfapg_empty (var_t n
);
78 octfapg_empty (const var_t n
)
81 /*octfapg_timing_enter("oct_empty",3);*/
82 m
= ((oct_t
*) octfapg_mm_malloc (sizeof(oct_t
)));
86 m
->closed
= (oct_t
*)((void *)0);
87 m
->c
= (num_t
*)((void *)0);
88 /*octfapg_timing_exit("oct_empty",3);*/
93 octfapg_alloc (const var_t n
)
95 size_t nn
= (2*(size_t)(n
)*((size_t)(n
)+1));
98 m
->c
= ((num_t
*) octfapg_mm_malloc (sizeof(num_t
)*(nn
)));
100 m
->state
= OCT_NORMAL
;
101 m
->closed
= (oct_t
*)((void *)0);
106 octfapg_universe (const var_t n
)
109 size_t i
, nn
= (2*(size_t)(n
)*((size_t)(n
)+1));
110 m
= octfapg_alloc(n
);
111 for (i
=0;i
<nn
;i
++) *(m
->c
+i
) = num__infty
;
112 for (i
=0;i
<2*n
;i
++) *(m
->c
+((size_t)(i
)+(((size_t)(i
)+1)*((size_t)(i
)+1))/2)) = (num_t
)(0);
113 m
->state
= OCT_CLOSED
;
122 oct_t
*p
= octfapg_universe(10);
126 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_scatter_store } } } } */
127 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { target vect_scatter_store } } } */
128 /* { dg-final { scan-tree-dump-times "vector alignment may not be reachable" 1 "vect" { target { ! vector_alignment_reachable } } } } */
129 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { ! vector_alignment_reachable } } } } */