Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
shibatch committed May 28, 2018
1 parent 63ba8c8 commit ca35e1a
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (BUILD_TESTS)
endif()
add_subdirectory("common")

if (BUILD_DFT AND NOT MINGW AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
if (BUILD_DFT AND NOT MINGW)
add_subdirectory("dft")
if (BUILD_TESTS)
add_subdirectory("dft-tester")
Expand Down
16 changes: 5 additions & 11 deletions src/arch/helperpower_128.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,12 @@ static INLINE vfloat vloadu_vf_p(const float *ptr) { return (vector float)vec_ld
static INLINE void vstore_v_p_vf(float *ptr, vfloat v) { vec_st((vector int)v, 0, (int *)ptr); }
static INLINE void vstoreu_v_p_vf(float *ptr, vfloat v) { vec_st((vector int)v, 0, (int *)ptr); }

static INLINE void vscatter2_v_p_i_i_vd(double *ptr, int offset, int step, vdouble v) {
for(int i=0;i<VECTLENDP/2;i++) {
*(ptr+(offset + step * i)*2 + 0) = v[i*2+0];
*(ptr+(offset + step * i)*2 + 1) = v[i*2+1];
}
}

static INLINE void vscatter2_v_p_i_i_vd(double *ptr, int offset, int step, vdouble v) { vstore_v_p_vd((double *)(&ptr[2*offset]), v); }
static INLINE void vscatter2_v_p_i_i_vf(float *ptr, int offset, int step, vfloat v) {
for(int i=0;i<VECTLENSP/2;i++) {
*(ptr+(offset + step * i)*2 + 0) = v[i*2+0];
*(ptr+(offset + step * i)*2 + 1) = v[i*2+1];
}
*(ptr+(offset + step * 0)*2 + 0) = v[0];
*(ptr+(offset + step * 0)*2 + 1) = v[1];
*(ptr+(offset + step * 1)*2 + 0) = v[2];
*(ptr+(offset + step * 1)*2 + 1) = v[3];
}

static INLINE vint vcast_vi_i(int i) { return (vint) { i, i }; }
Expand Down
10 changes: 9 additions & 1 deletion src/dft-tester/fftwtest1d.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <time.h>

#if defined(UNDEF_USE_EXTERN_INLINES)
#include <features.h>
#ifdef __USE_EXTERN_INLINES
#undef __USE_EXTERN_INLINES
#endif
#endif

#include <math.h>
#include <complex.h>

#include "sleef.h"
Expand Down
12 changes: 10 additions & 2 deletions src/dft-tester/fftwtest2d.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
// Copyright Naoki Shibata 2010 - 2017.
// Copyright Naoki Shibata 2010 - 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <time.h>

#if defined(UNDEF_USE_EXTERN_INLINES)
#include <features.h>
#ifdef __USE_EXTERN_INLINES
#undef __USE_EXTERN_INLINES
#endif
#endif

#include <math.h>
#include <complex.h>

#include "sleef.h"
Expand Down
14 changes: 11 additions & 3 deletions src/dft-tester/measuredft.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright Naoki Shibata 2010 - 2017.
// Copyright Naoki Shibata 2010 - 2018.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Expand All @@ -10,12 +10,20 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <math.h>
#include <complex.h>
#include <time.h>
#include <unistd.h>
#include <sys/time.h>

#if defined(UNDEF_USE_EXTERN_INLINES)
#include <features.h>
#ifdef __USE_EXTERN_INLINES
#undef __USE_EXTERN_INLINES
#endif
#endif

#include <math.h>
#include <complex.h>

#include "sleef.h"
#include "sleefdft.h"

Expand Down
10 changes: 9 additions & 1 deletion src/dft-tester/naivetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <time.h>

#if defined(UNDEF_USE_EXTERN_INLINES)
#include <features.h>
#ifdef __USE_EXTERN_INLINES
#undef __USE_EXTERN_INLINES
#endif
#endif

#include <math.h>
#include <complex.h>
#include <time.h>

#include "sleef.h"
#include "sleefdft.h"
Expand Down
10 changes: 9 additions & 1 deletion src/dft-tester/roundtriptest1d.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <time.h>

#if defined(UNDEF_USE_EXTERN_INLINES)
#include <features.h>
#ifdef __USE_EXTERN_INLINES
#undef __USE_EXTERN_INLINES
#endif
#endif

#include <math.h>
#include <complex.h>
#include <time.h>

#include "sleef.h"
#include "sleefdft.h"
Expand Down
10 changes: 9 additions & 1 deletion src/dft-tester/roundtriptest2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <time.h>

#if defined(UNDEF_USE_EXTERN_INLINES)
#include <features.h>
#ifdef __USE_EXTERN_INLINES
#undef __USE_EXTERN_INLINES
#endif
#endif

#include <math.h>
#include <complex.h>
#include <time.h>

#include "sleef.h"
#include "sleefdft.h"
Expand Down

0 comments on commit ca35e1a

Please sign in to comment.