[boinc-app-seti] 01/01: Imported Upstream version 7.19~svn2022

Gianfranco Costamagna locutusofborg-guest at alioth.debian.org
Fri Oct 11 16:24:10 UTC 2013


This is an automated email from the git hooks/post-receive script.

locutusofborg-guest pushed a commit to annotated tag upstream/7.19_svn2022
in repository boinc-app-seti.

commit 57bd3cec267b47c056cca402d9deca45cabaa0e3
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Fri Oct 11 18:20:49 2013 +0200

    Imported Upstream version 7.19~svn2022
---
 client/analyzeFuncs.cpp                |   13 +++--
 client/analyzePoT.cpp                  |    3 ++
 client/analyzeReport.cpp               |    3 ++
 client/chirpfft.cpp                    |    3 ++
 client/gaussfit.cpp                    |    3 ++
 client/main.cpp                        |    3 ++
 client/pulsefind.cpp                   |    3 ++
 client/sah_gfx.cpp                     |    3 ++
 client/seti_header.cpp                 |    3 ++
 client/vector/analyzeFuncs_vector.cpp  |   18 +++++--
 client/vector/analyzeFuncs_vector.h    |    7 +--
 client/vector/analyzeFuncs_vfp_aux.cpp |    3 +-
 client/vector/fp_arm.h                 |   88 ++++++++++++++++++++++++++------
 configure.ac                           |    2 +-
 splitter_pfb/mb_wufiles.cpp            |    2 +-
 15 files changed, 125 insertions(+), 32 deletions(-)

diff --git a/client/analyzeFuncs.cpp b/client/analyzeFuncs.cpp
index c1ddfce..5c8219e 100644
--- a/client/analyzeFuncs.cpp
+++ b/client/analyzeFuncs.cpp
@@ -67,6 +67,9 @@ const char *SAH_PACKAGE_STRING=CUSTOM_STRING;
 #include "sah_gfx_main.h"
 #endif
 #include "diagnostics.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 // In order to use IPP, set -DUSE_IPP and one of -DUSE_SSE3, -DUSE_SSE2,
 // -DUSE_SSE or nothing(generic),  IPP precedes FFTW, ooura // TMR
@@ -1157,7 +1160,7 @@ void FreeTrigArray() {
 }
 
 template <int x>
-inline void v_subTranspose(float *in, float *out, int xline, int yline) {
+inline void v_subTranspose(float * __restrict in, float * __restrict out, int xline, int yline) {
     // Transpose an X by X subsection of a XLINE by YLINE matrix into the
     // appropriate part of a YLINE by XLINE matrix.  "IN" points to the first
     // (lowest address) element of the input submatrix.  "OUT" points to the
@@ -1179,7 +1182,7 @@ inline void v_subTranspose(float *in, float *out, int xline, int yline) {
     }
 }
 
-int v_Transpose(int x, int y, float *in, float *out) {
+int v_Transpose(int x, int y, float * __restrict in, float * __restrict out) {
     // stupidest possible algorithm
     // assume in and out can't overlap
     int i,j;
@@ -1191,7 +1194,7 @@ int v_Transpose(int x, int y, float *in, float *out) {
     return 0;
 }
 
-int v_Transpose2(int x, int y, float *in, float *out) {
+int v_Transpose2(int x, int y, float * __restrict in, float * __restrict out) {
     // Attempts to improve cache hit ratio by transposing 4 elements at a time.
     int i,j;
     for (j=0;j<y-1;j+=2) {
@@ -1210,7 +1213,7 @@ int v_Transpose2(int x, int y, float *in, float *out) {
     return 0;
 }
 
-int v_Transpose4(int x, int y, float *in, float *out) {
+int v_Transpose4(int x, int y, float * __restrict in, float * __restrict out) {
     // Attempts to improve cache hit ratio by transposing 16 elements at a time.
     int i,j;
     for (j=0;j<y-3;j+=4) {
@@ -1240,7 +1243,7 @@ int v_Transpose4(int x, int y, float *in, float *out) {
     return 0;
 }
 
-int v_Transpose8(int x, int y, float *in, float *out) {
+int v_Transpose8(int x, int y, float * __restrict in, float * __restrict out) {
     // Attempts to improve cache hit ratio by transposing 64 elements at a time.
     int i,j;
     for (j=0;j<y-7;j+=8) {
diff --git a/client/analyzePoT.cpp b/client/analyzePoT.cpp
index 54f9d78..bcd73a8 100644
--- a/client/analyzePoT.cpp
+++ b/client/analyzePoT.cpp
@@ -58,6 +58,9 @@
 #include "util.h"
 #include "s_util.h"
 #include "progress.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 //#define DEBUG_POT
 
diff --git a/client/analyzeReport.cpp b/client/analyzeReport.cpp
index 0f8266a..9a893a8 100644
--- a/client/analyzeReport.cpp
+++ b/client/analyzeReport.cpp
@@ -50,6 +50,9 @@
 #include "chirpfft.h"
 #include "analyzeReport.h"
 #include "analyzePoT.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 #include "../db/schema_master.h"
 
diff --git a/client/chirpfft.cpp b/client/chirpfft.cpp
index 4546eec..0d2e568 100644
--- a/client/chirpfft.cpp
+++ b/client/chirpfft.cpp
@@ -50,6 +50,9 @@
 #include "analyze.h"
 #include "worker.h"
 #include "chirpfft.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 sh_sint8_t num_gaussian_searches;
 sh_sint8_t num_pulse_searches;
diff --git a/client/gaussfit.cpp b/client/gaussfit.cpp
index d7eb598..6270f72 100644
--- a/client/gaussfit.cpp
+++ b/client/gaussfit.cpp
@@ -66,6 +66,9 @@ int gul_Fftl;
 #include "lcgamm.h"
 #include "gaussfit.h"
 #include "chirpfft.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 bool dump_pot = false;
 //float gauss_display_power_thresh = 0;
diff --git a/client/main.cpp b/client/main.cpp
index c2e64a4..6a15962 100644
--- a/client/main.cpp
+++ b/client/main.cpp
@@ -165,6 +165,9 @@ int main(int argc, char** argv) {
   FORCE_FRAME_POINTER;
   run_stage=PREGRX;
   g_argc=argc;
+#ifdef ANDROID
+  argv0=argv[0];
+#endif
 
   if (!(g_argv=(char **)calloc(argc+2,sizeof(char *)))) {
     exit(MALLOC_FAILED);
diff --git a/client/pulsefind.cpp b/client/pulsefind.cpp
index 2e28849..2a1f508 100644
--- a/client/pulsefind.cpp
+++ b/client/pulsefind.cpp
@@ -67,6 +67,9 @@
 #include "malloc_a.h"
 #include "lcgamm.h"
 #include "pulsefind.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 //#define DEBUG_TRIPLET_VERBOSE
 //#define DEBUG_PULSE_VERBOSE
diff --git a/client/sah_gfx.cpp b/client/sah_gfx.cpp
index 8a48d79..1351612 100644
--- a/client/sah_gfx.cpp
+++ b/client/sah_gfx.cpp
@@ -129,6 +129,9 @@
 #include "gutil.h"
 #include "timecvt.h"
 #include "sah_gfx.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 bool mouse_down = false;
 int mouse_x, mouse_y;
diff --git a/client/seti_header.cpp b/client/seti_header.cpp
index ccfeed2..979a539 100644
--- a/client/seti_header.cpp
+++ b/client/seti_header.cpp
@@ -60,6 +60,9 @@
 #include "analyzePoT.h"
 #include "analyzeReport.h"
 #include "chirpfft.h"
+#ifdef __arm__
+#include "vector/fp_arm.h"
+#endif
 
 // Write a SETI work unit header to a file
 
diff --git a/client/vector/analyzeFuncs_vector.cpp b/client/vector/analyzeFuncs_vector.cpp
index a80892b..4a58551 100644
--- a/client/vector/analyzeFuncs_vector.cpp
+++ b/client/vector/analyzeFuncs_vector.cpp
@@ -251,7 +251,7 @@ void SetCapabilities(void) {
 #elif defined(USE_ALTIVEC)
   CPUCaps |= BA_ALTVC;
 
-#elif defined(__arm__)
+#elif defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
 
 #if defined(HAVE_CPU_FEATURES_H) && defined(ANDROID)
   uint64_t features=android_getCpuFeatures();
@@ -295,7 +295,7 @@ GPStb GetPowerSpectrumFuncs[]={
      v_avxGetPowerSpectrum, BA_AVX, "v_avxGetPowerSpectrum", 
 #  endif
 #endif
-#ifdef __arm__
+#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
      vfp_GetPowerSpectrum, BA_VFP, "vfp_GetPowerSpectrum",
      neon_GetPowerSpectrum, BA_NEON, "neon_GetPowerSpectrum",
 #endif
@@ -338,7 +338,7 @@ CDtb ChirpDataFuncs[]={
      avx_ChirpData_d, BA_AVX, "avx_ChirpData_d", 
 #  endif
 #endif
-#ifdef __arm__
+#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
      vfp_ChirpData, BA_VFP, "vfp_ChirpData",
      neon_ChirpData, BA_NEON, "neon_ChirpData",
 #endif
@@ -383,7 +383,7 @@ TPtb TransposeFuncs[]={
      v_avxTranspose8x8ntw_b, BA_AVX, "v_avxTranspose8x8ntw_b", 
 #  endif
 #endif
-#ifdef __arm__
+#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
     v_pfTranspose2, BA_VFP, "v_pfTranspose2",      
     v_pfTranspose4, BA_VFP, "v_pfTranspose4",      
     v_pfTranspose8, BA_VFP, "v_pfTranspose8",      
@@ -414,7 +414,7 @@ FolSub FoldSubs[] = {
   &AVXfold_a,    BA_AVX,
   &AVXfold_c,    BA_AVX,
 #endif
-#ifdef __arm__
+#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
   &vfpFoldMain,  BA_VFP,
   &neonFoldMain, BA_NEON,
 #endif
@@ -1340,6 +1340,7 @@ void ChooseFunctions(BaseLineSmooth_func *baseline_smooth,
              found_baseline_smooth=true;
              if (do_print) fprintf(stderr,"%32s (no other)\n",
                                    "v_BaseLineSmooth");
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
              if (CPUCaps & BA_NEON) {
                  *get_power_spectrum=neon_GetPowerSpectrum;
                  found_get_power_spectrum=true;
@@ -1359,6 +1360,7 @@ void ChooseFunctions(BaseLineSmooth_func *baseline_smooth,
                  if (do_print) fprintf(stderr,"%32s (CPU Caps)\n",
                                     "vfp_ChirpData");
              } else {
+#endif
                  *get_power_spectrum=v_GetPowerSpectrum;
                  found_get_power_spectrum=true;
                  if (do_print) fprintf(stderr,"%32s (default)\n",
@@ -1367,11 +1369,14 @@ void ChooseFunctions(BaseLineSmooth_func *baseline_smooth,
                  found_chirp_data=true;
                  if (do_print) fprintf(stderr,"%32s (default)\n",
                                        "v_ChirpData");
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
              }   
+#endif
              *transpose=v_Transpose4;   
              found_transpose=true;
              if (do_print) fprintf(stderr,"%32s (default)\n",
                                    "v_Transpose4");
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
              if (CPUCaps & BA_NEON) {
                  CopyFoldSet(&Foldmain, &neonFoldMain);
                  found_folding=true;
@@ -1383,11 +1388,14 @@ void ChooseFunctions(BaseLineSmooth_func *baseline_smooth,
                  if (do_print) fprintf(stderr,"%32s (CPU Caps)\n",
                                        "vfpFoldMain");
              } else {
+#endif
                  CopyFoldSet(&Foldmain, &swifold);
                  found_folding=true;
                  if (do_print) fprintf(stderr,"%32s (default)\n",
                                        "swifold");
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
              }
+#endif
              TestDur+=durtimer.stop();
              if (verbose)
                  fprintf(stderr,"%32s %8.2f seconds\n\n","Test duration",TestDur);
diff --git a/client/vector/analyzeFuncs_vector.h b/client/vector/analyzeFuncs_vector.h
index bc41229..ecb868c 100644
--- a/client/vector/analyzeFuncs_vector.h
+++ b/client/vector/analyzeFuncs_vector.h
@@ -235,7 +235,8 @@ extern int sse3_ChirpData_ak8(
 #endif
 
 extern int v_vTranspose(int i, int j, float *in, float *out);
-#if defined(__i386__) || defined(__x86_64__) || defined(USE_SSE) || defined(__arm__)
+#if defined(__i386__) || defined(__x86_64__) || defined(USE_SSE) || \
+    (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__))
 extern int v_pfTranspose2(int i, int j, float *in, float *out);
 extern int v_pfTranspose4(int i, int j, float *in, float *out);
 extern int v_pfTranspose8(int i, int j, float *in, float *out);
@@ -248,7 +249,7 @@ extern int v_vTranspose4x8ntw(int i, int j, float *in, float *out);
 extern int v_vTranspose4x16ntw(int i, int j, float *in, float *out);
 extern int v_vpfTranspose8x4ntw(int i, int j, float *in, float *out);
 #endif
-#if defined(__arm__) 
+#if (defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__))
 extern int v_vfpTranspose2(int i, int j, float *in, float *out);
 #endif
 
@@ -357,7 +358,7 @@ extern int v_avxGetPowerSpectrum(
 );
 #endif
 
-#if defined(__arm__)
+#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
 extern int neon_GetPowerSpectrum(
     sah_complex * cx_FreqData,
     float * fp_PowerSpectrum,
diff --git a/client/vector/analyzeFuncs_vfp_aux.cpp b/client/vector/analyzeFuncs_vfp_aux.cpp
index d127993..ada6bb3 100644
--- a/client/vector/analyzeFuncs_vfp_aux.cpp
+++ b/client/vector/analyzeFuncs_vfp_aux.cpp
@@ -33,7 +33,8 @@
 #include <vector>
 #include <cmath>
 
-#if defined(__arm__)
+#if defined(__arm__) && defined(__VFP_FP__) && !defined(__SOFTFP__)
+
 
 #define INVALID_CHIRP 2e+20
 
diff --git a/client/vector/fp_arm.h b/client/vector/fp_arm.h
index 93ae23b..a5f23af 100644
--- a/client/vector/fp_arm.h
+++ b/client/vector/fp_arm.h
@@ -37,6 +37,9 @@
 //
 
 #if defined(__arm__) && !defined(_RC_CHOP)
+#include <signal.h>
+#include <setjmp.h>
+#include "sighandler.h"
 
 // Exception masks
 #define _EM_INVALID     0x00000100      // Invalid Operation
@@ -70,29 +73,82 @@ These VFP vector mode has been deprecated
 #endif
 
 static unsigned int save_cw;
+static unsigned int cw;
+
+inline static unsigned int controlfp(unsigned int flags, unsigned int mask) {
+    install_sighandler();
+    FORCE_FRAME_POINTER;
+    if (sigsetjmp(jb,1))  {
+        uninstall_sighandler();
+        cw=0;
+        save_cw=0;
+        fprintf(stderr,"User mode control of fp control register not allowed\n");
+    } else {
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
+        __asm__ __volatile__ (
+          "fmrx %0,fpscr\n"
+          : "=r" (cw)
+        );
+#endif
+
+        save_cw=cw;
+        cw=(cw & ~mask) | (flags & mask);
 
-inline static unsigned int controlfp(unsigned int flags, unsigned int mask)  {
-    register unsigned int cw;
-    __asm__ __volatile__ (
-      "fmrx %0,fpscr\n"
-      : "=r" (cw)
-    );
-    save_cw=cw;
-    cw=(cw & ~mask) | (flags & mask);
-    __asm__ __volatile__ (
-      "fmxr fpscr,%0\n"
-      : : "r" (cw)
-    );
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
+        __asm__ __volatile__ (
+          "fmxr fpscr,%0\n"
+          : : "r" (cw)
+        );
+#endif
+        uninstall_sighandler();
+    }
     return cw;
 }
 
 inline static unsigned int restorefp() {
-    __asm__ __volatile__ (
-      "fmxr fpscr,%0\n"
-      : : "r" (save_cw)
-    );
+    if (save_cw != 0) {
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
+        __asm__ __volatile__ (
+          "fmxr fpscr,%0\n"
+          : : "r" (save_cw)
+        );
+#else
+        cw=save_cw;
+#endif
+    }
     return save_cw;
 }
 
+static const uint64_t arm_TWO_TO_52(0x4330000000000000);
+static const uint64_t arm_SIGN_BIT(0x8000000000000000);
+static const uint32_t arm_TWO_TO_23(0x4b000000);
+static const uint32_t arm_FSIGN_BIT(0x80000000);
+
+inline static double arm_round(double x) {
+    register uint64_t s=*reinterpret_cast<uint64_t *>(&x) & arm_SIGN_BIT;
+    uint64_t a=s | arm_TWO_TO_52;
+    register double d=*reinterpret_cast<double *>(&a);
+    return (x+d)-d;
+}
+
+inline static float arm_round(float x) {
+    register uint32_t s=*reinterpret_cast<uint32_t *>(&x) & arm_FSIGN_BIT;
+    uint32_t a=s | arm_TWO_TO_23;
+    register float d=*reinterpret_cast<float *>(&a);
+    return (x+d)-d;
+}
+
+#define round(x) arm_round(x)
+
+inline static double arm_floor(double x) {
+    return round(x-0.5);
+}
+
+inline static float arm_floor(float x) {
+    return round(x-0.5f);
+}
+
+#define floor(x) arm_floor(x)
+
 #endif
 
diff --git a/configure.ac b/configure.ac
index 665f351..f9807d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
 
 
 AC_PREREQ(2.57)
-AC_INIT(setiathome_v7, 7.09, korpela at ssl.berkeley.edu)
+AC_INIT(setiathome_v7, 7.19, korpela at ssl.berkeley.edu)
 AC_CONFIG_MACRO_DIR([m4])
 svnrev="`svn info | grep Revision:`"
 
diff --git a/splitter_pfb/mb_wufiles.cpp b/splitter_pfb/mb_wufiles.cpp
index d6a31bf..7247eb5 100644
--- a/splitter_pfb/mb_wufiles.cpp
+++ b/splitter_pfb/mb_wufiles.cpp
@@ -378,7 +378,7 @@ void rename_wu_files() {
           db_wu.rsc_fpops_est=2.378e+13+autocorr_flops;
         }
 	db_wu.rsc_fpops_est*=(0.333/wuheaders[i].group_info->analysis_cfg->chirp_resolution);
-        db_wu.rsc_fpops_bound=db_wu.rsc_fpops_est*10;
+        db_wu.rsc_fpops_bound=db_wu.rsc_fpops_est*20;
         db_wu.rsc_memory_bound=33554432;
         db_wu.rsc_disk_bound=33554432;
         // Our minimum is a 40 MFLOP machine

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc-app-seti.git



More information about the pkg-boinc-commits mailing list