Hello community,

here is the log from the commit of package Vc for openSUSE:Factory checked in 
at 2017-03-10 21:46:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/Vc (Old)
 and      /work/SRC/openSUSE:Factory/.Vc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "Vc"

Fri Mar 10 21:46:23 2017 rev:6 rq:477980 version:1.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/Vc/Vc.changes    2017-02-03 17:31:05.408842954 
+0100
+++ /work/SRC/openSUSE:Factory/.Vc.new/Vc.changes       2017-03-10 
21:46:23.677692750 +0100
@@ -1,0 +2,10 @@
+Thu Mar  9 14:27:37 UTC 2017 - [email protected]
+
+- Update to version 1.3.1
+  * swap(v[i], v[j]) did not compile. Vc 1.3.1 overloads the swap
+    function and thus enables swapping scalars into/out of vector
+    and mask objects.
+  * The spline example has moved to the new Vc-examples-nonfree
+    repository since it has a license that restricts redistribution.
+
+-------------------------------------------------------------------

Old:
----
  Vc-1.3.0.tar.gz

New:
----
  Vc-1.3.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ Vc.spec ++++++
--- /var/tmp/diff_new_pack.s8RjGM/_old  2017-03-10 21:46:24.273608230 +0100
+++ /var/tmp/diff_new_pack.s8RjGM/_new  2017-03-10 21:46:24.277607663 +0100
@@ -18,15 +18,13 @@
 
 
 Name:           Vc
-Version:        1.3.0
+Version:        1.3.1
 Release:        0
 Summary:        Collection of SIMD Vector Classes
 License:        BSD-3-Clause
 Group:          System/Libraries
 Url:            https://github.com/VcDevel/Vc/
-#Source0:        
https://github.com/VcDevel/Vc/releases/download/%{version}/%{name}-%{version}.tar.gz
-#Repackaged to remove spline example: https://github.com/VcDevel/Vc/issues/150
-Source0:        %{name}-%{version}.tar.gz
+Source0:        
https://github.com/VcDevel/Vc/releases/download/%{version}/%{name}-%{version}.tar.gz
 BuildRequires:  cmake
 BuildRequires:  doxygen
 BuildRequires:  fdupes

++++++ Vc-1.3.0.tar.gz -> Vc-1.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/.travis.yml new/Vc-1.3.1/.travis.yml
--- old/Vc-1.3.0/.travis.yml    2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/.travis.yml    2017-03-09 14:36:15.000000000 +0100
@@ -3,8 +3,9 @@
 cache: ccache
 
 env:
-    - GCC_VERSION=5
-    - GCC_VERSION=default
+    - CXX_VERSION=current
+    - CXX_VERSION=previous
+    - CXX_VERSION=default
 
 os:
     - linux
@@ -16,45 +17,68 @@
 
 matrix:
     exclude:
-        - env: GCC_VERSION=5
+        - env: CXX_VERSION=previous
           os: osx
           compiler: clang
-        - env: GCC_VERSION=5
-          os: linux
-          compiler: clang
 
 # The following gives us Ubuntu 14.04 LTS instead of 12.04 LTS
 sudo: required
 dist: trusty
 
 install:
-    - if test "$TRAVIS_OS_NAME" = "osx" -a "$CXX" = "g++"; then
-        brew update &&
-        if test $GCC_VERSION = 5; then
-          brew install gcc5 && export CXX=g++-5 CC=gcc-5;
-        else
-          brew install coreutils && export CXX=g++-4.9 CC=gcc-4.9;
-        fi
-      fi
-    - if test "$TRAVIS_OS_NAME" = "osx" -a "$CXX" = "clang++"; then
-        brew update &&
-        brew install llvm &&
-        export CXX=/usr/local/opt/llvm/bin/clang++ 
CC=/usr/local/opt/llvm/bin/clang &&
-        export LDFLAGS="-L/usr/local/opt/llvm/lib 
-Wl,-rpath,/usr/local/opt/llvm/lib" &&
-        export CPPFLAGS=-I/usr/local/opt/llvm/include;
-      fi
-    - if test "$TRAVIS_OS_NAME" = "linux" -a "$GCC_VERSION" = "5"; then
-        sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-        sudo apt-get update -q &&
-        sudo apt-get install g++-5 -y &&
-        export CXX=g++-5 CC=gcc-5;
-      fi
-    - if test "$TRAVIS_OS_NAME" = "linux" -a "$CXX" = "clang++"; then
-        sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
-        sudo apt-get update -q &&
-        sudo apt-get install clang-3.8 libstdc++-6-dev libc++-dev 
libc++abi-dev -y;
-        export CXX=clang++-3.8 CC=clang-3.8;
-      fi
+    - case "$TRAVIS_OS_NAME-$CXX-$CXX_VERSION" in
+        linux-g++-current)
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
+          sudo apt-get update -q &&
+          sudo apt-get install g++-6 -y &&
+          export CXX=g++-6 CC=gcc-6;;
+        linux-g++-previous)
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
+          sudo apt-get update -q &&
+          sudo apt-get install g++-5 -y &&
+          export CXX=g++-5 CC=gcc-5;;
+        linux-g++-default)
+          ;;
+        linux-clang++-current)
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
+          wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add 
- &&
+          sudo tee /etc/apt/sources.list.d/llvm.list <<< "deb 
http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main" &&
+          sudo apt-get update -q &&
+          sudo apt-get install clang-4.0 -y &&
+          export CXX=clang++-4.0 CC=clang-4.0;;
+        linux-clang++-previous)
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
+          wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add 
- &&
+          sudo tee /etc/apt/sources.list.d/llvm.list <<< "deb 
http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" &&
+          sudo apt-get update -q &&
+          sudo apt-get install clang-3.9 -y &&
+          export CXX=clang++-3.9 CC=clang-3.9;;
+        linux-clang++-default)
+          sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y &&
+          sudo apt-get update -q &&
+          sudo apt-get install clang-3.8 libstdc++-6-dev libc++-dev 
libc++abi-dev -y &&
+          export CXX=clang++-3.8 CC=clang-3.8;;
+        osx-g++-current)
+          brew update &&
+          brew install gcc6 &&
+          export CXX=g++-6 CC=gcc-6;;
+        osx-g++-previous)
+          brew update &&
+          brew install gcc5 &&
+          export CXX=g++-5 CC=gcc-5;;
+        osx-g++-default)
+          export CXX=g++-4.9 CC=gcc-4.9;;
+        osx-clang++-current)
+          brew update &&
+          brew install llvm &&
+          export CXX=/usr/local/opt/llvm/bin/clang++ 
CC=/usr/local/opt/llvm/bin/clang &&
+          export LDFLAGS="-L/usr/local/opt/llvm/lib 
-Wl,-rpath,/usr/local/opt/llvm/lib" &&
+          export CPPFLAGS=-I/usr/local/opt/llvm/include;;
+        osx-clang++-previous)
+          exit 1;;
+        osx-clang++-default)
+          ;;
+      esac
 
 before_script:
     - $CXX --version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/CMakeLists.txt new/Vc-1.3.1/CMakeLists.txt
--- old/Vc-1.3.0/CMakeLists.txt 2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/CMakeLists.txt 2017-03-09 14:36:15.000000000 +0100
@@ -4,6 +4,12 @@
    message(FATAL_ERROR "You don't want to configure in the source directory!")
 endif()
 
+if(NOT DEFINED CMAKE_BUILD_TYPE)
+   set(CMAKE_BUILD_TYPE Release CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebug 
RelWithDebInfo MinSizeRel."
+      FORCE)
+endif()
+
 project(Vc)
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
@@ -89,12 +95,6 @@
    endif()
 endif()
 
-if(NOT CMAKE_BUILD_TYPE)
-   set(CMAKE_BUILD_TYPE Release CACHE STRING
-      "Choose the type of build, options are: None Debug Release RelWithDebug 
RelWithDebInfo MinSizeRel."
-      FORCE)
-endif(NOT CMAKE_BUILD_TYPE)
-
 vc_set_preferred_compiler_flags(WARNING_FLAGS BUILDTYPE_FLAGS)
 
 add_definitions(${Vc_DEFINITIONS})
@@ -137,7 +137,7 @@
 if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "([x3-7]86|AMD64)")
 
    list(APPEND _srcs src/cpuid.cpp src/support_x86.cpp)
-   vc_compile_for_all_implementations(_srcs src/trigonometric.cpp ONLY SSE2 
SSE3 SSSE3 SSE4_1 AVX SSE+XOP+FMA4 AVX+XOP+FMA4 AVX+XOP+FMA AVX+FMA)# 
AVX2+FMA+BMI2)
+   vc_compile_for_all_implementations(_srcs src/trigonometric.cpp ONLY SSE2 
SSE3 SSSE3 SSE4_1 AVX SSE+XOP+FMA4 AVX+XOP+FMA4 AVX+XOP+FMA AVX+FMA 
AVX2+FMA+BMI2)
    vc_compile_for_all_implementations(_srcs src/sse_sorthelper.cpp ONLY SSE2 
SSE4_1 AVX AVX2+FMA+BMI2)
    vc_compile_for_all_implementations(_srcs src/avx_sorthelper.cpp ONLY AVX 
AVX2+FMA+BMI2)
 else()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/CTestConfig.cmake 
new/Vc-1.3.1/CTestConfig.cmake
--- old/Vc-1.3.0/CTestConfig.cmake      2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/CTestConfig.cmake      2017-03-09 14:36:15.000000000 +0100
@@ -1,8 +1,8 @@
 set(CTEST_PROJECT_NAME "Vc")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 CEST")
 
-set(CTEST_DROP_METHOD "https")
-set(CTEST_DROP_SITE "cdash.gsi.de")
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "lxwww53.gsi.de")
 set(CTEST_DROP_LOCATION "/submit.php?project=Vc")
 
 set(CTEST_DROP_SITE_CDASH TRUE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/CTestCustom.cmake 
new/Vc-1.3.1/CTestCustom.cmake
--- old/Vc-1.3.0/CTestCustom.cmake      2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/CTestCustom.cmake      2017-03-09 14:36:15.000000000 +0100
@@ -12,9 +12,11 @@
    "include/qt4" # -Wuninitialized in QWeakPointer(X *ptr)
    " note: " # Notes are additional lines from errors (or warnings) that we 
don't want to count as additional warnings
    "clang: warning: argument unused during compilation: '-stdlib=libc"
+   "clang 3.6.x miscompiles AVX code" # a preprocessor warning for users of 
Vc, irrelevant for the dashboard
    )
 
 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}
+   "^ICECC"
    "^make\\[[1-9]\\]: "
    "^collect2: ld returned . exit status"
    "^make: \\*\\*\\* \\[.*\\] Error ")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/README.md new/Vc-1.3.1/README.md
--- old/Vc-1.3.0/README.md      2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/README.md      2017-03-09 14:36:15.000000000 +0100
@@ -39,6 +39,38 @@
 * NEON (in development)
 * NVIDIA GPUs / CUDA (in development)
 
+## Examples
+
+### Scalar Product
+
+Let's start from the code for calculating a 3D scalar product using builtin 
floats:
+```cpp
+using Vec3D = std::array<float, 3>;
+float scalar_product(Vec3D a, Vec3D b) {
+  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+```
+Using Vc, we can easily vectorize the code using the `float_v` type:
+```cpp
+using Vc::float_v
+using Vec3D = std::array<float_v, 3>;
+float_v scalar_product(Vec3D a, Vec3D b) {
+  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+```
+The above will scale to 1, 4, 8, 16, etc. scalar products calculated in 
parallel, depending
+on the target hardware's capabilities.
+
+For comparison, the same vectorization using Intel SSE intrinsics is more 
verbose and uses
+prefix notation (i.e. function calls):
+```cpp
+using Vec3D = std::array<__m128, 3>;
+__m128 scalar_product(Vec3D a, Vec3D b) {
+  return _mm_add_ps(_mm_add_ps(_mm_mul_ps(a[0], b[0]), _mm_mul_ps(a[1], b[1])),
+                    _mm_mul_ps(a[2], b[2]));
+}
+```
+The above will neither scale to AVX, MIC, etc. nor is it portable to other 
SIMD ISAs.
 
 ## Build Requirements
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/Test_all_compilers.sh 
new/Vc-1.3.1/Test_all_compilers.sh
--- old/Vc-1.3.0/Test_all_compilers.sh  2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/Test_all_compilers.sh  2017-03-09 14:36:15.000000000 +0100
@@ -26,10 +26,9 @@
 $id"
 
   # alright run the ctest script
-  runTest &
-  supports32Bit && runTest -m32 &
-  supportsx32 && runTest -mx32 &
-  wait
+  runTest
+  supports32Bit && runTest -m32
+  supportsx32 && runTest -mx32
 }
 
 supports32Bit() {
@@ -64,61 +63,75 @@
   return 0
 }
 
-cxxlist="`find /usr/bin/ /usr/local/bin/ -name '*++-[0-9]*'|grep -v -- 
-linux-gnu`"
-if test -z "$cxxlist"; then
-  cxxlist="`find /usr/bin/ /usr/local/bin/ -name '*++'|grep -v -- -linux-gnu`"
-fi
-if test -z "$cxxlist"; then
-  # default compiler
-  runAllTests
-else
-  for CXX in $cxxlist; do
-    CC=`echo "$CXX"|sed 's/clang++/clang/;s/g++/gcc/'`
-    if test -x "$CC" -a -x "$CXX"; then
-      export CC
-      export CXX
+system_compilers() {
+  cxxlist="`find /usr/bin/ /usr/local/bin/ -name '*++-[0-9]*'|grep -v -- 
-linux-gnu`"
+  if test -z "$cxxlist"; then
+    cxxlist="`find /usr/bin/ /usr/local/bin/ -name '*++'|grep -v -- 
-linux-gnu`"
+  fi
+  if test -z "$cxxlist"; then
+    # default compiler
+    runAllTests
+  else
+    for CXX in $cxxlist; do
+      CC=`echo "$CXX"|sed 's/clang++/clang/;s/g++/gcc/'`
+      if test -x "$CC" -a -x "$CXX"; then
+        export CC
+        export CXX
+        runAllTests
+      fi
+    done
+  fi
+}
+
+modules_compilers() {
+  if test -r /etc/profile.d/modules.sh; then
+    source /etc/profile.d/modules.sh
+    for mod in `module avail -t 2>&1`; do
+      case `echo $mod|tr '[:upper:]' '[:lower:]'` in
+        *intel*|*icc*) export CC=icc CXX=icpc;;
+        *gnu*|*gcc*) export CC=gcc CXX=g++;;
+        *llvm*|*clang*) export CC=clang CXX=clang++;;
+        *) continue;;
+      esac
+      module load $mod
       runAllTests
-    fi
-  done
-fi
-
-if test -r /etc/profile.d/modules.sh; then
-  source /etc/profile.d/modules.sh
-  for mod in `module avail -t 2>&1`; do
-    case `echo $mod|tr '[:upper:]' '[:lower:]'` in
-      *intel*|*icc*) export CC=icc CXX=icpc;;
-      *gnu*|*gcc*) export CC=gcc CXX=g++;;
-      *llvm*|*clang*) export CC=clang CXX=clang++;;
-      *) continue;;
+      module unload $mod
+    done
+  fi
+}
+
+gccbuild_compilers() {
+  for VcEnv in `find /opt/ -mindepth 2 -maxdepth 2 -name Vc.env`; do (
+    . "$VcEnv"
+    case "$VcEnv" in
+      *-snapshot/Vc.env)
+        ( cd $HOME/src/gcc-build && ./update.sh "`dirname "$VcEnv"`" )
+        ;;
     esac
-    module load $mod
     runAllTests
-    module unload $mod
-  done
-fi
-
-for VcEnv in `find /opt/ -mindepth 2 -maxdepth 2 -name Vc.env`; do (
-  . "$VcEnv"
-  case "$VcEnv" in
-    *-snapshot/Vc.env)
-      ( cd $HOME/src/gcc-build && ./update.sh "`dirname "$VcEnv"`" )
+  ) done
+}
+
+icc_compilers() {
+  export CC=icc
+  export CXX=icpc
+  icclist="`find /opt/intel/compiler* -name 'iccvars.sh' | xargs readlink -e | 
sort -ur`"
+  case `uname -m` in
+    x86_64)
+      COMPILERVARS_ARCHITECTURE=intel64
+      ;;
+    i[345678]86)
+      COMPILERVARS_ARCHITECTURE=ia32
       ;;
   esac
-  runAllTests
-) done
+  export COMPILERVARS_ARCHITECTURE
+  test -n "$icclist" && for IccEnv in $icclist; do (
+    . $IccEnv $COMPILERVARS_ARCHITECTURE
+    runAllTests
+  ) done
+}
 
-export CC=icc
-export CXX=icpc
-icclist="`find /opt/ -name 'iccvars.sh'`"
-case x86_64 in
-  x86_64)
-    arch=intel64
-    ;;
-  i[345678]86)
-    arch=ia32
-    ;;
-esac
-test -n "$icclist" && for IccEnv in $icclist; do (
-  . $IccEnv $arch
-  runAllTests
-) done
+system_compilers
+modules_compilers
+gccbuild_compilers
+icc_compilers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/avx/const_data.h 
new/Vc-1.3.1/avx/const_data.h
--- old/Vc-1.3.0/avx/const_data.h       2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/avx/const_data.h       2017-03-09 14:36:15.000000000 +0100
@@ -58,20 +58,27 @@
 {
     alignas(64) static const T data[];
 };
+#ifndef Vc_MSVC
+template <> alignas(64) const float c_trig<float>::data[];
+template <> alignas(64) const double c_trig<double>::data[];
+#endif
 
 template<typename T> struct c_log
 {
     typedef float floatAlias Vc_MAY_ALIAS;
     static Vc_ALWAYS_INLINE float d(int i) { return *reinterpret_cast<const 
floatAlias *>(&data[i]); }
-    alignas(64) static const unsigned int data[];
+    alignas(64) static const unsigned int data[21];
 };
+#ifndef Vc_MSVC
+template<> alignas(64) const unsigned int c_log<float>::data[21];
+#endif
 
 template<> struct c_log<double>
 {
     enum VectorSize { Size = 16 / sizeof(double) };
     typedef double doubleAlias Vc_MAY_ALIAS;
     static Vc_ALWAYS_INLINE double d(int i) { return *reinterpret_cast<const 
doubleAlias *>(&data[i]); }
-    alignas(64) static const unsigned long long data[];
+    alignas(64) static const unsigned long long data[21];
 };
 
 }  // namespace AVX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/avx/detail.h new/Vc-1.3.1/avx/detail.h
--- old/Vc-1.3.0/avx/detail.h   2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/avx/detail.h   2017-03-09 14:36:15.000000000 +0100
@@ -1302,6 +1302,7 @@
     }
     default:
         Vc_UNREACHABLE();
+        return R();
     }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/avx/intrinsics.h 
new/Vc-1.3.1/avx/intrinsics.h
--- old/Vc-1.3.0/avx/intrinsics.h       2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/avx/intrinsics.h       2017-03-09 14:36:15.000000000 +0100
@@ -48,6 +48,28 @@
 #include "macros.h"
 #include <cstdlib>
 
+#if (defined Vc_CLANG && Vc_CLANG >= 0x30900)
+#ifdef _mm256_permute2f128_si256
+#undef _mm256_permute2f128_si256
+#define _mm256_permute2f128_si256(V1, V2, M) __extension__ ({ \
+  (__m256i)__builtin_ia32_vperm2f128_si256((__v8si)(__m256i)(V1), \
+                                           (__v8si)(__m256i)(V2), (char)(M)); 
})
+#endif
+
+#ifdef _mm256_permute2f128_ps
+#undef _mm256_permute2f128_ps
+#define _mm256_permute2f128_ps(V1, V2, M) __extension__ ({ \
+  (__m256)__builtin_ia32_vperm2f128_ps256((__v8sf)(__m256)(V1), \
+                                          (__v8sf)(__m256)(V2), (char)(M)); })
+#endif
+
+#ifdef _mm256_permute2x128_si256
+#undef _mm256_permute2x128_si256
+#define _mm256_permute2x128_si256(V1, V2, M) __extension__ ({ \
+  (__m256i)__builtin_ia32_permti256((__m256i)(V1), (__m256i)(V2), (char)(M)); 
})
+#endif
+#endif
+
 namespace Vc_VERSIONED_NAMESPACE
 {
 namespace AvxIntrinsics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/cmake/FindMIC.cmake 
new/Vc-1.3.1/cmake/FindMIC.cmake
--- old/Vc-1.3.0/cmake/FindMIC.cmake    2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/cmake/FindMIC.cmake    2017-03-09 14:36:15.000000000 +0100
@@ -56,7 +56,12 @@
 set(MIC_NATIVE_FOUND false)
 set(MIC_OFFLOAD_FOUND false)
 
-option(ENABLE_MIC "Enable native builds for the MIC architecture (Intel 
Knights Corner)" ON)
+if(CMAKE_GENERATOR MATCHES "Makefile")
+   option(ENABLE_MIC "Enable native builds for the MIC architecture (Intel 
Knights Corner)" ON)
+else()
+   message(STATUS "MIC builds are only supported with a Makefile generator")
+   set(ENABLE_MIC false)
+endif()
 if(ENABLE_MIC)
    file(GLOB _intel_dirs "/opt/intel/compilers_and_libraries_*/linux")
    if ("${_intel_dirs}" STREQUAL "")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/cmake/OptimizeForArchitecture.cmake 
new/Vc-1.3.1/cmake/OptimizeForArchitecture.cmake
--- old/Vc-1.3.0/cmake/OptimizeForArchitecture.cmake    2016-10-27 
09:05:02.000000000 +0200
+++ new/Vc-1.3.1/cmake/OptimizeForArchitecture.cmake    2017-03-09 
14:36:15.000000000 +0100
@@ -17,7 +17,7 @@
 # macro will consequently disable the relevant features via compiler flags.
 
 #=============================================================================
-# Copyright 2010-2015 Matthias Kretz <[email protected]>
+# Copyright 2010-2016 Matthias Kretz <[email protected]>
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are
@@ -111,7 +111,7 @@
             set(TARGET_ARCHITECTURE "knl")  # Knights Landing
          elseif(_cpu_model EQUAL 92)
             set(TARGET_ARCHITECTURE "goldmont")
-         elseif(_cpu_model EQUAL 90)
+         elseif(_cpu_model EQUAL 90 OR _cpu_model EQUAL 76)
             set(TARGET_ARCHITECTURE "silvermont")
          elseif(_cpu_model EQUAL 102)
             set(TARGET_ARCHITECTURE "cannonlake")
@@ -255,6 +255,15 @@
       _broadwell()
       list(APPEND _available_vector_units_list "avx512f" "avx512pf" "avx512er" 
"avx512cd")
    endmacro()
+   macro(_silvermont)
+      list(APPEND _march_flag_list "silvermont")
+      _westmere()
+      list(APPEND _available_vector_units_list "rdrnd")
+   endmacro()
+   macro(_goldmont)
+      list(APPEND _march_flag_list "goldmont")
+      _silvermont()
+   endmacro()
 
    if(TARGET_ARCHITECTURE STREQUAL "core")
       list(APPEND _march_flag_list "core2")
@@ -294,6 +303,10 @@
       _westmere()
    elseif(TARGET_ARCHITECTURE STREQUAL "nehalem")
       _nehalem()
+   elseif(TARGET_ARCHITECTURE STREQUAL "goldmont")
+      _goldmont()
+   elseif(TARGET_ARCHITECTURE STREQUAL "silvermont")
+      _silvermont()
    elseif(TARGET_ARCHITECTURE STREQUAL "atom")
       list(APPEND _march_flag_list "atom")
       list(APPEND _march_flag_list "core2")
@@ -443,54 +456,33 @@
             add_definitions("-D${_flag}")
          endforeach(_flag)
       elseif(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$") # ICC (on Linux)
-         _my_find(_available_vector_units_list "avx2"    _found)
-         if(_found)
-            AddCompilerFlag("-xCORE-AVX2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-         else(_found)
-            _my_find(_available_vector_units_list "f16c"    _found)
-            if(_found)
-               AddCompilerFlag("-xCORE-AVX-I" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-            else(_found)
-               _my_find(_available_vector_units_list "avx"    _found)
-               if(_found)
-                  AddCompilerFlag("-xAVX" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
-               else(_found)
-                  _my_find(_available_vector_units_list "sse4.2" _found)
-                  if(_found)
-                     AddCompilerFlag("-xSSE4.2" CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
-                  else(_found)
-                     _my_find(_available_vector_units_list "sse4.1" _found)
-                     if(_found)
-                        AddCompilerFlag("-xSSE4.1" CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
-                     else(_found)
-                        _my_find(_available_vector_units_list "ssse3"  _found)
-                        if(_found)
-                           AddCompilerFlag("-xSSSE3" CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
-                        else(_found)
-                           _my_find(_available_vector_units_list "sse3"   
_found)
-                           if(_found)
-                              # If the target host is an AMD machine then we 
still want to use -xSSE2 because the binary would refuse to run at all otherwise
-                              _my_find(_march_flag_list "barcelona" _found)
-                              if(NOT _found)
-                                 _my_find(_march_flag_list "k8-sse3" _found)
-                              endif(NOT _found)
-                              if(_found)
-                                 AddCompilerFlag("-xSSE2" CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
-                              else(_found)
-                                 AddCompilerFlag("-xSSE3" CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
-                              endif(_found)
-                           else(_found)
-                              _my_find(_available_vector_units_list "sse2"   
_found)
-                              if(_found)
-                                 AddCompilerFlag("-xSSE2" CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
-                              endif(_found)
-                           endif(_found)
-                        endif(_found)
-                     endif(_found)
-                  endif(_found)
-               endif(_found)
-            endif(_found)
-         endif(_found)
+         set(OFA_map_knl "-xMIC-AVX512")
+         set(OFA_map_cannonlake "-xCORE-AVX512")
+         set(OFA_map_skylake-avx512 "-xCORE-AVX512")
+         set(OFA_map_skylake "-xCORE-AVX2")
+         set(OFA_map_broadwell "-xCORE-AVX2")
+         set(OFA_map_haswell "-xCORE-AVX2")
+         set(OFA_map_ivybridge "-xCORE-AVX-I")
+         set(OFA_map_sandybridge "-xAVX")
+         set(OFA_map_westmere "-xSSE4.2")
+         set(OFA_map_nehalem "-xSSE4.2")
+         set(OFA_map_penryn "-xSSSE3")
+         set(OFA_map_merom "-xSSSE3")
+         set(OFA_map_core2 "-xSSE3")
+         set(_ok FALSE)
+         foreach(arch ${_march_flag_list})
+            if(DEFINED OFA_map_${arch})
+               AddCompilerFlag(${OFA_map_${arch}} CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS CXX_RESULT _ok)
+               if(_ok)
+                  break()
+               endif()
+            endif()
+         endforeach()
+         if(NOT _ok)
+            # This is the Intel compiler, so SSE2 is a very reasonable 
baseline.
+            message(STATUS "Did not recognize the requested architecture flag, 
falling back to SSE2")
+            AddCompilerFlag("-xSSE2" CXX_FLAGS Vc_ARCHITECTURE_FLAGS)
+         endif()
       else() # not MSVC and not ICC => GCC, Clang, Open64
          foreach(_flag ${_march_flag_list})
             AddCompilerFlag("-march=${_flag}" CXX_RESULT _good CXX_FLAGS 
Vc_ARCHITECTURE_FLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/cmake/VcMacros.cmake 
new/Vc-1.3.1/cmake/VcMacros.cmake
--- old/Vc-1.3.0/cmake/VcMacros.cmake   2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/cmake/VcMacros.cmake   2017-03-09 14:36:15.000000000 +0100
@@ -348,7 +348,17 @@
 macro(_vc_compile_one_implementation _srcs _impl)
    list(FIND _disabled_targets "${_impl}" _disabled_index)
    list(FIND _only_targets "${_impl}" _only_index)
-   if(${_disabled_index} EQUAL -1 AND (NOT _only_targets OR ${_only_index} 
GREATER -1))
+   if(${_disabled_index} GREATER -1)
+      if(${_only_index} GREATER -1)
+         # disabled and enabled -> error
+         message(FATAL_ERROR "vc_compile_for_all_implementations lists 
${_impl} in both the ONLY and EXCLUDE lists. Please remove one.")
+      endif()
+      list(REMOVE_AT _disabled_targets ${_disabled_index})
+      # skip the rest and return
+   elseif(NOT _only_targets OR ${_only_index} GREATER -1)
+      if(${_only_index} GREATER -1)
+         list(REMOVE_AT _only_targets ${_only_index})
+      endif()
       set(_extra_flags)
       set(_ok FALSE)
       foreach(_flags_it ${ARGN})
@@ -456,4 +466,12 @@
       _vc_compile_one_implementation(${_srcs} AVX2+FMA+BMI2 "-xCORE-AVX2" 
"-mavx2 -mfma -mbmi2" "/arch:AVX2")
       #_vc_compile_one_implementation(${_srcs} AVX2+FMA "-mavx2 -mfma")
    endif()
+   list(LENGTH _only_targets _len)
+   if(_len GREATER 0)
+      message(WARNING "The following unknown targets where listed in the ONLY 
list of vc_compile_for_all_implementations: '${_only_targets}'")
+   endif()
+   list(LENGTH _disabled_targets _len)
+   if(_len GREATER 0)
+      message(WARNING "The following unknown targets where listed in the 
EXCLUDE list of vc_compile_for_all_implementations: '${_disabled_targets}'")
+   endif()
 endmacro()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/common/elementreference.h 
new/Vc-1.3.1/common/elementreference.h
--- old/Vc-1.3.0/common/elementreference.h      2016-10-27 09:05:02.000000000 
+0200
+++ new/Vc-1.3.1/common/elementreference.h      2017-03-09 14:36:15.000000000 
+0100
@@ -128,10 +128,29 @@
         return r;
     }
 
+    friend void swap(ElementReference &&a, ElementReference &&b) {
+        value_type tmp(a);
+        static_cast<ElementReference &&>(a) = static_cast<value_type>(b);
+        static_cast<ElementReference &&>(b) = tmp;
+    }
+
+    friend void swap(value_type &a, ElementReference &&b) {
+        value_type tmp(a);
+        a = static_cast<value_type>(b);
+        static_cast<ElementReference &&>(b) = tmp;
+    }
+
+    friend void swap(ElementReference &&a, value_type &b) {
+        value_type tmp(a);
+        static_cast<ElementReference &&>(a) = b;
+        b = tmp;
+    }
+
 private:
     int index;
     U &obj;
 };
+
 }  // namespace Detail
 }  // namespace Vc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/common/iterators.h 
new/Vc-1.3.1/common/iterators.h
--- old/Vc-1.3.0/common/iterators.h     2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/common/iterators.h     2017-03-09 14:36:15.000000000 +0100
@@ -30,6 +30,9 @@
 
 #include <array>
 #include <iterator>
+#ifdef Vc_MSVC
+#include <intrin.h> // for _BitScanForward
+#endif  // Vc_MSVC
 #include "where.h"
 #include "elementreference.h"
 #include "macros.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/doc/Doxyfile new/Vc-1.3.1/doc/Doxyfile
--- old/Vc-1.3.0/doc/Doxyfile   2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/doc/Doxyfile   2017-03-09 14:36:15.000000000 +0100
@@ -38,7 +38,7 @@
 # could be handy for archiving the generated documentation or if some version
 # control system is used.
 
-PROJECT_NUMBER         = 1.3.0
+PROJECT_NUMBER         = 1.3.1
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/doc/examples.h new/Vc-1.3.1/doc/examples.h
--- old/Vc-1.3.0/doc/examples.h 2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/doc/examples.h 2017-03-09 14:36:15.000000000 +0100
@@ -119,7 +119,7 @@
  * This pattern can be very efficient if the interleaved data members are 
always accessed together.
  * This optimizes for data locality and thus cache usage.
  *
- * \subsection ex_polarcoord_data_vectors Interleaved Vectors
+ * \subsection ex_polarcoord_data_vectors Interleaved Vectors / Array of 
Vectorized Structs (AoVS)
  *
  * If you can change the data structures, it might be a good option to store 
interleaved vectors:
  * \code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/examples/CMakeLists.txt 
new/Vc-1.3.1/examples/CMakeLists.txt
--- old/Vc-1.3.0/examples/CMakeLists.txt        2016-10-27 09:05:02.000000000 
+0200
+++ new/Vc-1.3.1/examples/CMakeLists.txt        2017-03-09 14:36:15.000000000 
+0100
@@ -110,21 +110,11 @@
    vc_add_run_target("example_${name}_default")
 endfunction(build_example)
 
-macro(my_add_subdirectory _name)
-   list(FIND disabled_targets "example_${_name}" _disabled)
+file(GLOB examples RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" 
"${CMAKE_CURRENT_SOURCE_DIR}/*/CMakeLists.txt")
+foreach(example ${examples})
+   string(REPLACE "/CMakeLists.txt" "" example "${example}")
+   list(FIND disabled_targets "example_${example}" _disabled)
    if(_disabled EQUAL -1)
-      add_subdirectory(${_name})
+      add_subdirectory(${example})
    endif()
-endmacro()
-
-my_add_subdirectory(polarcoord)
-my_add_subdirectory(matrix)
-my_add_subdirectory(mandelbrot)
-my_add_subdirectory(buddhabrot)
-my_add_subdirectory(cpuid)
-my_add_subdirectory(finitediff)
-my_add_subdirectory(scaling)
-my_add_subdirectory(test_inside)
-my_add_subdirectory(linear_find)
-my_add_subdirectory(spline)
-my_add_subdirectory(simdize)
+endforeach()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/examples/scaling/main.cpp 
new/Vc-1.3.1/examples/scaling/main.cpp
--- old/Vc-1.3.0/examples/scaling/main.cpp      2016-10-27 09:05:02.000000000 
+0200
+++ new/Vc-1.3.1/examples/scaling/main.cpp      2017-03-09 14:36:15.000000000 
+0100
@@ -43,22 +43,30 @@
  * The Runner recursively calls operator() on the Work template class with 
varying arguments for N
  * and FLOPs.
  */
-template<template<std::size_t N, std::size_t M, int, int> class Work, 
std::size_t N = 256, std::size_t M = 4, int FLOPs = 2> struct Runner
-{
-    static void run() {
-        Work<N, M, (N > 4096 ? 1 : 4096 / N), FLOPs>()();
-        Runner<Work, N, M, int(FLOPs * 1.5)>::run();
-    }
-};
-
-template<template<std::size_t N, std::size_t M, int, int> class Work, 
std::size_t N, std::size_t M> struct Runner<Work, N, M, 211>
+template<template<std::size_t N, std::size_t M, int, int> class Work, 
std::size_t N = 256, std::size_t M = 4> struct Runner
 {
     static void run() {
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 2>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 3>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 4>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 6>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 9>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 13>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 19>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 28>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 42>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 63>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 94>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 141>()();
+        Work<N, M, (N > 4096 ? 1 : 4096 / N), 211>()();
         Runner<Work, N * 2, M>::run();
     }
 };
-template<template<std::size_t N, std::size_t M, int, int> class Work, 
std::size_t M, int FLOPs> struct Runner<Work, 256 * 1024 * 1024, M, FLOPs>
-{
+
+template <template <std::size_t N, std::size_t M, int, int> class Work, 
std::size_t M>
+struct Runner<Work, 256 * 1024 * 32,  // don't make this number larger, 
otherwise GCC6
+                                      // blows up with Vc::Scalar to 10GB of 
memory usage
+              M> {
     static void run() {
     }
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/include/Vc/version.h 
new/Vc-1.3.1/include/Vc/version.h
--- old/Vc-1.3.0/include/Vc/version.h   2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/include/Vc/version.h   2017-03-09 14:36:15.000000000 +0100
@@ -37,13 +37,13 @@
  * \ingroup Utilities
  * Contains the version string of the %Vc headers. Same as Vc::versionString().
  */
-#define Vc_VERSION_STRING "1.3.0"
+#define Vc_VERSION_STRING "1.3.1"
 
 /**
  * \ingroup Utilities
  * Contains the encoded version number of the %Vc headers. Same as 
Vc::versionNumber().
  */
-#define Vc_VERSION_NUMBER 0x010300
+#define Vc_VERSION_NUMBER 0x010302
 
 /**
  * \ingroup Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/print_target_architecture.cmake 
new/Vc-1.3.1/print_target_architecture.cmake
--- old/Vc-1.3.0/print_target_architecture.cmake        2016-10-27 
09:05:02.000000000 +0200
+++ new/Vc-1.3.1/print_target_architecture.cmake        2017-03-09 
14:36:15.000000000 +0100
@@ -12,4 +12,4 @@
 endif()
 
 AutodetectHostArchitecture()
-message("${TARGET_ARCHITECTURE}")
+message(STATUS "${TARGET_ARCHITECTURE}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/sse/const_data.h 
new/Vc-1.3.1/sse/const_data.h
--- old/Vc-1.3.0/sse/const_data.h       2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/sse/const_data.h       2017-03-09 14:36:15.000000000 +0100
@@ -62,19 +62,26 @@
 {
     alignas(64) static const T data[];
 };
+#ifndef Vc_MSVC
+template <> alignas(64) const float c_trig<float>::data[];
+template <> alignas(64) const double c_trig<double>::data[];
+#endif
 
 template<typename T> struct c_log
 {
     enum VectorSize { Size = 16 / sizeof(T) };
     static Vc_ALWAYS_INLINE Vc_CONST const float *d(int i) { return 
reinterpret_cast<const  float *>(&data[i * Size]); }
-    alignas(64) static const unsigned int data[];
+    alignas(64) static const unsigned int data[21 * Size];
 };
+#ifndef Vc_MSVC
+template<> alignas(64) const unsigned int c_log<float>::data[21 * 4];
+#endif
 
 template<> struct c_log<double>
 {
     enum VectorSize { Size = 16 / sizeof(double) };
     static Vc_ALWAYS_INLINE Vc_CONST const double *d(int i) { return 
reinterpret_cast<const double *>(&data[i * Size]); }
-    alignas(64) static const unsigned long long data[];
+    alignas(64) static const unsigned long long data[21 * Size];
 };
 
 }  // namespace SSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/test.cmake new/Vc-1.3.1/test.cmake
--- old/Vc-1.3.0/test.cmake     2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/test.cmake     2017-03-09 14:36:15.000000000 +0100
@@ -1,29 +1,53 @@
+#!ctest -S
 if(NOT CTEST_SOURCE_DIRECTORY)
    get_filename_component(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_FILE}" 
PATH)
 endif()
 
+macro(read_argument name)
+   if(NOT ${name})
+      if(DEFINED ENV{${name}})
+         set(${name} "$ENV{${name}}")
+      elseif(${ARGC} GREATER 1)
+         set(${name} "${ARGV1}")
+      endif()
+   endif()
+   #message(STATUS "argument ${name}: '${${name}}'")
+endmacro()
+
 # Dashboard Model
 
################################################################################
-set(dashboard_model "$ENV{dashboard_model}")
-if(NOT dashboard_model)
-   set(dashboard_model "Experimental")
+read_argument(dashboard_model "Experimental")
+set(is_continuous FALSE)
+set(is_experimental FALSE)
+set(is_nightly FALSE)
+if(${dashboard_model} STREQUAL "Continuous")
+   set(is_continuous TRUE)
+elseif(${dashboard_model} STREQUAL "Experimental")
+   set(is_experimental TRUE)
+elseif(${dashboard_model} STREQUAL "Nightly")
+   set(is_nightly TRUE)
+else()
+   message(FATAL_ERROR "Unknown dashboard_model '${dashboard_model}'. Please 
use one of Experimental, Continuous, Nightly.")
 endif()
 
 # Set build variables from environment variables
 
################################################################################
-set(target_architecture "$ENV{target_architecture}")
-set(skip_tests "$ENV{skip_tests}")
+read_argument(target_architecture)
+read_argument(skip_tests FALSE)
+read_argument(subset)
+read_argument(CXXFLAGS "")
+set(ENV{CXXFLAGS} "${CXXFLAGS}")
 
 # Set CMAKE_BUILD_TYPE from environment variable
 
################################################################################
 set(appveyor $ENV{APPVEYOR})
 if(appveyor)
    set(build_type "$ENV{CONFIGURATION}")
+   if(NOT build_type)
+      set(build_type "Release")
+   endif()
 else()
-   set(build_type "$ENV{build_type}")
-endif()
-if(NOT build_type)
-   set(build_type "Release")
+   read_argument(build_type "Release")
 endif()
 
 # better make sure we get english output (this is vital for the 
implicit_type_conversion_failures tests)
@@ -33,14 +57,49 @@
 # determine the git branch we're testing
 
################################################################################
 file(READ "${CTEST_SOURCE_DIRECTORY}/.git/HEAD" git_branch)
-string(STRIP "${git_branch}" git_branch)
-# -> ref: refs/heads/foobar
-string(REGEX REPLACE "^.*/" "" git_branch "${git_branch}")
-# -> foobar
-if(git_branch MATCHES "^[0-9a-f]+$")
-   # it's a hash -> make it short
-   string(SUBSTRING "${git_branch}" 0 7 git_branch)
-elseif(git_branch MATCHES "^gh-[0-9]+")
+string(STRIP "${git_branch}" git_branch)                         # -> ref: 
refs/heads/user/foobar
+string(REPLACE "ref: refs/heads/" "" git_branch "${git_branch}") # -> 
user/foobar
+if(NOT git_branch MATCHES "^[0-9a-f]+$")                         # an actual 
branch name, not a hash
+   # read the associated hash
+   if(EXISTS "${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
+      set(git_hash_file 
"${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
+      file(READ "${git_hash_file}" git_hash LIMIT 7)
+      string(STRIP "${git_hash}" git_hash)
+   endif()
+   string(REGEX REPLACE "^.*/" "" git_branch "${git_branch}")
+else()
+   # a long hash -> make it shorter
+   string(SUBSTRING "${git_branch}" 0 7 git_hash)
+
+   # try harder to find a branch name
+   find_program(GIT git)
+   unset(git_branch_out)
+   if(GIT)
+      execute_process(COMMAND
+         "${GIT}" branch -a --contains=${git_branch} -v --abbrev=0
+         WORKING_DIRECTORY "${PROJECT_DIRECTORY}"
+         OUTPUT_VARIABLE git_branch_out
+         OUTPUT_STRIP_TRAILING_WHITESPACE
+         )
+      #message("${git_branch_out}")
+      string(REPLACE "\n" ";" git_branch_out "${git_branch_out}")
+      #message("${git_branch_out}")
+      foreach(i IN LISTS git_branch_out)
+         string(REGEX MATCH "[^() ]+ +${git_branch}" i "${i}")
+         string(REGEX REPLACE "^.*/" "" i "${i}")
+         string(REGEX REPLACE " *${git_branch}.*$" "" i "${i}")
+         if(NOT "${i}" MATCHES "^ *$")
+            set(git_branch "${i}")
+            break()
+         endif()
+      endforeach()
+   endif()
+   if(git_branch MATCHES "^[0-9a-f]+$")
+      # still just a hash -> make it empty because the hash is communicated 
via git_hash
+      set(git_branch "")
+   endif()
+endif()
+if(git_branch MATCHES "^gh-[0-9]+")
    # it's a feature branch referencing a GitHub issue number -> make it short
    string(REGEX MATCH "^gh-[0-9]+" git_branch "${git_branch}")
 endif()
@@ -86,7 +145,7 @@
    execute_process(COMMAND
       reg query "HKLM\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0" /v 
Identifier
       OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE processorId)
-   if("${processorId}" MATCHES "AMD64")
+   if("${processorId}" MATCHES "(Intel|AMD)64")
       set(chip "amd64")
    elseif("${processorId}" MATCHES "x86")
       set(chip "x86")
@@ -95,27 +154,9 @@
    endif()
 endif()
 
-# determine a short description of the OS we're running on
-################################################################################
-if(arch STREQUAL "linux")
-   execute_process(COMMAND lsb_release -d COMMAND cut -f2 OUTPUT_VARIABLE 
os_ident)
-   string(REGEX REPLACE "\\(.*\\)" "" os_ident "${os_ident}") # shorten the 
Distribution string, stripping everything in parens
-   string(REPLACE "Scientific Linux SL" "SL" os_ident "${os_ident}")
-   string(REPLACE " release" "" os_ident "${os_ident}")
-   string(REPLACE " GNU/Linux" "" os_ident "${os_ident}")
-   string(REPLACE "openSUSE" "Suse" os_ident "${os_ident}")
-   string(REPLACE " User Edition" "" os_ident "${os_ident}")
-   string(STRIP "${os_ident}" os_ident)
-elseif(arch STREQUAL "darwin")
-   set(os_ident "OSX")
-else()
-   set(os_ident "${arch}")
-   string(REPLACE "Windows" "Win" os_ident "${os_ident}")
-endif()
-
 # Determine the processor count (number_of_processors)
 
################################################################################
-set(number_of_processors "$ENV{NUMBER_OF_PROCESSORS}")
+read_argument(number_of_processors)
 if(NOT number_of_processors)
    if("${arch}" MATCHES "[Ww]indows" OR "${arch}" MATCHES "win7" OR "${arch}" 
MATCHES "mingw" OR "${arch}" MATCHES "msys")
       execute_process(COMMAND
@@ -220,10 +261,11 @@
 
 # Build the CTEST_BUILD_NAME string
 
################################################################################
-if(target_architecture)
+if(DEFINED target_architecture)
    set(tmp ${target_architecture})
 else()
    execute_process(COMMAND cmake -Darch=${arch} -P 
${CTEST_SOURCE_DIRECTORY}/print_target_architecture.cmake 
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE tmp)
+   string(REPLACE "-- " "" tmp "${tmp}")
 endif()
 if(build_type STREQUAL "Release")
    set(build_type_short "Rel")
@@ -238,11 +280,18 @@
 else()
    set(build_type_short "${build_type}")
 endif()
-string(STRIP "${git_branch} ${COMPILER_VERSION} $ENV{CXXFLAGS} 
${build_type_short} ${tmp} ${chip} ${os_ident}" CTEST_BUILD_NAME)
-if("$ENV{subset}" STREQUAL "sse")
-   set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} sse")
-elseif("$ENV{subset}" STREQUAL "avx")
-   set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} avx")
+
+string(STRIP "${git_branch} ${COMPILER_VERSION} ${CXXFLAGS} 
${build_type_short} ${tmp}" CTEST_BUILD_NAME)
+if(NOT is_nightly)
+   # nightly builds shouldn't contain the git hash, since it makes expected 
builds impossible
+   string(STRIP "${git_hash} ${CTEST_BUILD_NAME}" CTEST_BUILD_NAME)
+   # instead make sure the hash is included in the notes
+   if(DEFINED git_hash_file)
+      list(APPEND CTEST_NOTES_FILES "${git_hash_file}")
+   endif()
+endif()
+if(DEFINED subset)
+   set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ${subset}")
 endif()
 
 string(REPLACE "  " " " CTEST_BUILD_NAME "${CTEST_BUILD_NAME}")
@@ -253,7 +302,7 @@
 
 # Determine build directory
 
################################################################################
-string(REGEX REPLACE "[][ ():, ]" "" CTEST_BINARY_DIRECTORY 
"${CTEST_BUILD_NAME}")
+string(REGEX REPLACE "[][ ():, |!*]" "" CTEST_BINARY_DIRECTORY 
"${CTEST_BUILD_NAME}")
 set(CTEST_BINARY_DIRECTORY 
"${CTEST_SOURCE_DIRECTORY}/build-${dashboard_model}/${CTEST_BINARY_DIRECTORY}")
 
 # Give user feedback
@@ -267,15 +316,22 @@
 Set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE TRUE)
 
 list(APPEND CTEST_NOTES_FILES "${CTEST_SOURCE_DIRECTORY}/.git/HEAD")
-if(EXISTS "${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
-   list(APPEND CTEST_NOTES_FILES 
"${CTEST_SOURCE_DIRECTORY}/.git/refs/heads/${git_branch}")
+
+# attach information on the OS
+################################################################################
+if(arch STREQUAL "linux")
+   execute_process(COMMAND lsb_release -idrc OUTPUT_VARIABLE os_ident)
+elseif(arch STREQUAL "darwin")
+   execute_process(COMMAND system_profiler SPSoftwareDataType OUTPUT_VARIABLE 
os_ident)
+else()
+   set(os_ident "${arch}")
 endif()
+file(WRITE "${CTEST_SOURCE_DIRECTORY}/os_ident.txt" "${os_ident}")
+list(APPEND CTEST_NOTES_FILES "${CTEST_SOURCE_DIRECTORY}/os_ident.txt")
 
 include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
 ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-set(CTEST_USE_LAUNCHERS 0) # launchers once lead to much improved error/warning
-                           # message logging. Nowadays they lead to no warning/
-                           # error messages on the dashboard at all.
+set(CTEST_USE_LAUNCHERS TRUE)
 if(WIN32)
    set(MAKE_ARGS "-k")
 else()
@@ -284,14 +340,19 @@
 
 if(WIN32)
    if("${compiler}" STREQUAL "MSVC")
+      find_program(NINJA ninja)
       find_program(JOM jom)
-      if(JOM)
-        set(CTEST_CMAKE_GENERATOR "NMake Makefiles JOM")
-        set(CMAKE_MAKE_PROGRAM "jom")
+      if(NINJA)
+         set(CTEST_CMAKE_GENERATOR "Ninja")
+         set(CMAKE_MAKE_PROGRAM "${NINJA}")
+         set(MAKE_ARGS "-k50")
+      elseif(JOM)
+         set(CTEST_CMAKE_GENERATOR "NMake Makefiles JOM")
+         set(CMAKE_MAKE_PROGRAM "${JOM}")
       else()
-        set(CTEST_CMAKE_GENERATOR "NMake Makefiles")
-        set(CMAKE_MAKE_PROGRAM "nmake")
-        set(MAKE_ARGS "-I")
+         set(CTEST_CMAKE_GENERATOR "NMake Makefiles")
+         set(CMAKE_MAKE_PROGRAM "nmake")
+         set(MAKE_ARGS "-I")
       endif()
    elseif("${compiler}" STREQUAL "MinGW")
       set(CTEST_CMAKE_GENERATOR "MSYS Makefiles")
@@ -312,7 +373,7 @@
    list(APPEND configure_options "-DTEST_OPERATOR_FAILURES=TRUE")
 endif()
 list(APPEND configure_options "-DUSE_CCACHE=ON")
-if(target_architecture)
+if(DEFINED target_architecture)
    list(APPEND configure_options 
"-DTARGET_ARCHITECTURE=${target_architecture}")
 endif()
 
@@ -322,13 +383,33 @@
    message(FATAL_ERROR "Compiler too old for C++11 (${COMPILER_VERSION})")
 endif()
 
+if(chip STREQUAL "x86")
+   set(arch_abi "x86 32-bit")
+elseif(chip STREQUAL "amd64")
+   if(CXXFLAGS MATCHES "-m32")
+      set(arch_abi "x86 32-bit")
+   elseif(CXXFLAGS MATCHES "-mx32")
+      set(arch_abi "x86 x32")
+   else()
+      set(arch_abi "x86 64-bit")
+   endif()
+else()
+   set(arch_abi "${chip}")
+endif()
+
 macro(go)
-   # SubProjects currently don't improve the overview but rather make the 
dashboard more cumbersume to navigate
-   #set_property(GLOBAL PROPERTY SubProject "master: ${compiler}")
+   # On Continuous builds this string may change and thus must be inside go()
+   file(STRINGS "${CTEST_SOURCE_DIRECTORY}/include/Vc/version.h"
+      Vc_VERSION_STRING
+      REGEX "#define +Vc_VERSION_STRING "
+      )
+   string(REGEX REPLACE "\"$" "" Vc_VERSION_STRING "${Vc_VERSION_STRING}")
+   string(REGEX REPLACE "^.*\"" "" Vc_VERSION_STRING "${Vc_VERSION_STRING}")
+
    set_property(GLOBAL PROPERTY Label other)
-   CTEST_START (${dashboard_model})
+   CTEST_START (${dashboard_model} TRACK "${dashboard_model} 
${Vc_VERSION_STRING} ${arch_abi}")
    set(res 0)
-   if(NOT ${dashboard_model} STREQUAL "Experimental")
+   if(NOT is_experimental)
       CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
       if(res GREATER 0)
          ctest_submit(PARTS Update)
@@ -336,7 +417,7 @@
    endif()
 
    # enter the following section for Continuous builds only if the 
CTEST_UPDATE above found changes
-   if(NOT ${dashboard_model} STREQUAL "Continuous" OR res GREATER 0)
+   if(NOT is_continuous OR res GREATER 0)
       CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}"
          OPTIONS "${configure_options}"
          APPEND
@@ -363,9 +444,9 @@
                PARALLEL_LEVEL ${number_of_processors})
             ctest_submit(PARTS Test)
          else()
-            if("$ENV{subset}" STREQUAL "sse")
+            if("${subset}" STREQUAL "sse")
                set(label_list other Scalar SSE)
-            elseif("$ENV{subset}" STREQUAL "avx")
+            elseif("${subset}" STREQUAL "avx")
                set(label_list AVX AVX2 MIC)
             else()
                set(label_list other Scalar SSE AVX AVX2 MIC)
@@ -380,27 +461,34 @@
                   RETURN_VALUE res)
                ctest_submit(PARTS Build)
                if(res EQUAL 0 AND NOT skip_tests)
-                  ctest_test(
-                     BUILD "${CTEST_BINARY_DIRECTORY}"
-                     APPEND
-                     RETURN_VALUE res
-                     PARALLEL_LEVEL ${number_of_processors}
-                     INCLUDE_LABEL "^${label}$")
-                  ctest_submit(PARTS Test)
-                  if(NOT res EQUAL 0)
-                     set(test_results ${res})
+                  execute_process(
+                     COMMAND ${CMAKE_CTEST_COMMAND} -N -L "^${label}$"
+                     WORKING_DIRECTORY "${CTEST_BINARY_DIRECTORY}"
+                     OUTPUT_VARIABLE tmp
+                     OUTPUT_STRIP_TRAILING_WHITESPACE)
+                  if(tmp MATCHES "Total Tests: 0")
+                     message("No tests were defined. Skipping tests.")
+                  else()
+                     ctest_test(
+                        BUILD "${CTEST_BINARY_DIRECTORY}"
+                        APPEND
+                        RETURN_VALUE res
+                        PARALLEL_LEVEL ${number_of_processors}
+                        INCLUDE_LABEL "^${label}$")
+                     ctest_submit(PARTS Test)
+                     if(NOT res EQUAL 0)
+                        message("ctest_test returned non-zero result: ${res}")
+                        set(test_results ${res})
+                     endif()
                   endif()
                endif()
             endforeach()
          endif()
-         if(NOT test_results EQUAL 0)
-            message(FATAL_ERROR "One or more tests failed.")
-         endif()
       endif()
    endif()
 endmacro()
 
-if(${dashboard_model} STREQUAL "Continuous")
+if(is_continuous)
    while(${CTEST_ELAPSED_TIME} LESS 64800)
       set(START_TIME ${CTEST_ELAPSED_TIME})
       go()
@@ -411,4 +499,7 @@
       CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
    endif()
    go()
+   if(NOT test_results EQUAL 0)
+      message(FATAL_ERROR "One or more tests failed.")
+   endif()
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/tests/download.cmake 
new/Vc-1.3.1/tests/download.cmake
--- old/Vc-1.3.0/tests/download.cmake   2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/tests/download.cmake   2017-03-09 14:36:15.000000000 +0100
@@ -1 +1 @@
-file(DOWNLOAD "http://compeng.uni-frankfurt.de/~kretz/Vc-testdata/${filename}"; 
"./${filename}")
+file(DOWNLOAD "https://github.com/VcDevel/vc-testdata/raw/master/${filename}"; 
"./${filename}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Vc-1.3.0/tests/utils.cpp new/Vc-1.3.1/tests/utils.cpp
--- old/Vc-1.3.0/tests/utils.cpp        2016-10-27 09:05:02.000000000 +0200
+++ new/Vc-1.3.1/tests/utils.cpp        2017-03-09 14:36:15.000000000 +0100
@@ -400,4 +400,48 @@
     }
 }
 
+TEST_TYPES(V, swap, (ALL_VECTORS, SIMD_ARRAY_LIST))
+{
+    using T = typename V::EntryType;
+    V x = V::IndexesFromZero();
+    V y = V::IndexesFromZero();
+    using std::swap;
+    swap(x[0], y[V::size() - 1]);
+    COMPARE(x[0], T(V::size() - 1));
+    COMPARE(y[V::size() - 1], T(0));
+
+    T z = std::numeric_limits<T>::max();
+    swap(y[0], z);
+    COMPARE(y[0], std::numeric_limits<T>::max());
+    COMPARE(z, T(0));
+
+    swap(z, y[0]);
+    COMPARE(y[0], T(0));
+    COMPARE(z, std::numeric_limits<T>::max());
+
+    using M = typename V::MaskType;
+    const int i = M::size() > 1 ? 1 : 0;
+    M a(false);
+    M b = a;
+    b[i] = true;
+    COMPARE(a[0], false);
+    COMPARE(b[i], true);
+
+    swap(a[0], b[i]);
+    COMPARE(a[0], true);
+    COMPARE(b[i], false);
+
+    swap(b[i], a[0]);
+    COMPARE(a[0], false);
+    COMPARE(b[i], true);
+
+    bool c = true;
+    swap(a[0], c);
+    COMPARE(a[0], true);
+    COMPARE(c, false);
+
+    swap(c, a[0]);
+    COMPARE(a[0], false);
+    COMPARE(c, true);
+}
 // vim: foldmethod=marker


Reply via email to