| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target fopenmp } */ |
| 3 |
/* { dg-options "-ffast-math -fstack-protector-strong -fopenmp" } */ |
| 4 |
typedef struct { |
| 5 |
long size_z; |
| 6 |
int width; |
| 7 |
} dt_bilateral_t; |
| 8 |
typedef float dt_aligned_pixel_t[4]; |
| 9 |
#pragma omp declare simd |
| 10 |
void dt_bilateral_splat(dt_bilateral_t *b) { |
| 11 |
float *buf; |
| 12 |
long offsets[8]; |
| 13 |
for (; b;) { |
| 14 |
int firstrow; |
| 15 |
for (int j = firstrow; j; j++) |
| 16 |
for (int i; i < b->width; i++) { |
| 17 |
dt_aligned_pixel_t contrib; |
| 18 |
for (int k = 0; k < 4; k++) |
| 19 |
buf[offsets[k]] += contrib[k]; |
| 20 |
} |
| 21 |
float *dest; |
| 22 |
for (int j = (long)b; j; j++) { |
| 23 |
float *src = (float *)b->size_z; |
| 24 |
for (int i = 0; i < (long)b; i++) |
| 25 |
dest[i] += src[i]; |
| 26 |
} |
| 27 |
} |
| 28 |
} |