Commit 70053978 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

fouriertrans.c: added omp simd pragmas

parent 5fe73e9f
......@@ -38,6 +38,10 @@
#include "datetime.h"
#define OPENMP4 201307
#if defined(_OPENMP) && defined(OPENMP4) && _OPENMP >= OPENMP4
#define HAVE_OPENMP4 1
#endif
#ifndef strdupx
#ifndef strdup
......
......@@ -6,6 +6,12 @@
# include "dmemory.h"
#endif
#define OPENMP4 201307
#if defined(_OPENMP) && defined(OPENMP4) && _OPENMP >= OPENMP4
#define HAVE_OPENMP4 1
#endif
#if defined(SX)
# define NFFT 1024
#else
......@@ -159,6 +165,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -191,6 +200,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -221,6 +233,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -241,6 +256,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -275,6 +293,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -314,6 +335,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -354,6 +378,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -378,6 +405,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -417,6 +447,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -461,6 +494,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -510,6 +546,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -536,6 +575,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -576,6 +618,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -633,6 +678,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -697,6 +745,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -732,6 +783,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -781,6 +835,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -840,6 +897,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -900,6 +960,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -928,6 +991,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -987,6 +1053,9 @@ int rpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1090,6 +1159,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1121,6 +1193,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1148,6 +1223,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1169,6 +1247,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1202,6 +1283,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1238,6 +1322,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1279,6 +1366,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1303,6 +1393,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1340,6 +1433,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1385,6 +1481,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1432,6 +1531,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1455,6 +1557,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1499,6 +1604,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1553,6 +1661,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1621,6 +1732,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1658,6 +1772,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1716,6 +1833,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1776,6 +1896,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1846,6 +1969,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1877,6 +2003,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......@@ -1937,6 +2066,9 @@ int qpassc(double *a, double *b, double *c, double *d, double *trigs,
j = jbase;
#if defined(SX)
#pragma vdir nodep
#endif
#if defined(HAVE_OPENMP4)
#pragma omp simd
#endif
for (ijk = 0; ijk < lot; ++ijk)
{
......
......@@ -327,7 +327,7 @@ void grid_search_nbr(int num_neighbors, remapgrid_t *src_grid, int *restrict nbr
}
ndist = j;
#if defined(_OPENMP) && _OPENMP >= OPENMP4
#if defined(HAVE_OPENMP4)
//#pragma omp simd aligned(dist:16)
#pragma omp simd
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment