diff --git a/.travis.yml b/.travis.yml index 01bb2f8ab1..5c3f6d59d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,134 +27,395 @@ matrix: - env: BOGUS_JOB=true include: - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE="quadrature include=/usr/include/eigen3" + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + - libeigen3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE="quadrature include=/usr/include/eigen3" + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + - libeigen3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE="quadrature include=/usr/include/eigen3" + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + - libeigen3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE="quadrature include=/usr/include/eigen3" + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + - libeigen3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE="quadrature include=/usr/include/eigen3" + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + - libeigen3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=../tools + addons: + apt: + packages: + - g++-6 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-5 + - libgmp-dev + - libmpfr-dev + - libfftw3-dev + sources: + - ubuntu-toolchain-r-test - os: linux - env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE="quadrature include=/usr/include/eigen3" + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=distribution_tests addons: apt: packages: - - g++-6 + - g++-5 - libgmp-dev - libmpfr-dev - libfftw3-dev - - libeigen3-dev sources: - ubuntu-toolchain-r-test - os: linux - env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE="quadrature include=/usr/include/eigen3" + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=misc addons: apt: packages: - - g++-6 + - g++-5 - libgmp-dev - libmpfr-dev - libfftw3-dev - - libeigen3-dev sources: - ubuntu-toolchain-r-test - os: linux - env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE="quadrature include=/usr/include/eigen3" + dist: bionic + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE="quadrature include=/usr/include/eigen3" addons: apt: packages: - - g++-6 + - g++-5 - libgmp-dev - libmpfr-dev - libfftw3-dev @@ -163,249 +424,31 @@ matrix: - ubuntu-toolchain-r-test - os: linux - env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE="quadrature include=/usr/include/eigen3" + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=float128_tests addons: apt: packages: - - g++-6 + - g++-5 - libgmp-dev - libmpfr-dev - libfftw3-dev - - libeigen3-dev sources: - ubuntu-toolchain-r-test - os: linux - env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE="quadrature include=/usr/include/eigen3" + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=../example//examples addons: apt: packages: - - g++-6 + - g++-5 - libgmp-dev - libmpfr-dev - libfftw3-dev - - libeigen3-dev sources: - ubuntu-toolchain-r-test - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-6 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-5 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-5 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=misc - # addons: - # apt: - # packages: - # - g++-5 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - os: linux - env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE="quadrature include=/usr/include/eigen3" + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=../tools addons: apt: packages: @@ -413,82 +456,45 @@ matrix: - libgmp-dev - libmpfr-dev - libfftw3-dev - - libeigen3-dev sources: - ubuntu-toolchain-r-test - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-5 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-5 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-5 - # - libgmp-dev - # - libmpfr-dev - # - libfftw3-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=misc - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test - os: linux dist: trusty compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=misc + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-8 env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE="quadrature include=/usr/include/eigen3" addons: apt: @@ -498,77 +504,77 @@ matrix: sources: - ubuntu-toolchain-r-test - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-8 - # - libgmp-dev - # - libmpfr-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=misc - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=c++14 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-8 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test - os: linux dist: trusty compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=misc + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-8 env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE="quadrature include=/usr/include/eigen3" addons: apt: @@ -578,66 +584,66 @@ matrix: sources: - ubuntu-toolchain-r-test - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-8 - # - libgmp-dev - # - libmpfr-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++03 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-8 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test - os: linux dist: trusty compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=special_fun + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: bionic + compiler: g++-8 env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE="quadrature include=/usr/include/eigen3" addons: apt: @@ -647,75 +653,76 @@ matrix: sources: - ubuntu-toolchain-r-test - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=float128_tests - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - g++-8 - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # dist: trusty - # compiler: g++-8 - # env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - g++-8 - # - libgmp-dev - # - libmpfr-dev - # sources: - # - ubuntu-toolchain-r-test - - # - os: linux - # compiler: clang++-6.0 - # env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=special_fun - # addons: - # apt: - # packages: - # - clang-6.0 - # sources: - # - ubuntu-toolchain-r-test - # - llvm-toolchain-xenial-6.0 - - # - os: linux - # compiler: clang++-6.0 - # env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=distribution_tests - # addons: - # apt: - # packages: - # - clang-6.0 - # sources: - # - ubuntu-toolchain-r-test - # - llvm-toolchain-xenial-6.0 - - # - os: linux - # compiler: clang++-6.0 - # env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=misc - # addons: - # apt: - # packages: - # - clang-6.0 - # sources: - # - ubuntu-toolchain-r-test - # - llvm-toolchain-xenial-6.0 + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=float128_tests + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=../example//examples + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=gnu++17 TEST_SUITE=../tools + addons: + apt: + packages: + - g++-8 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=special_fun + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-6.0 + + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=distribution_tests + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-6.0 + + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=misc + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-6.0 - os: linux + dist: bionic compiler: clang++-6.0 env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE="quadrature include=/usr/include/eigen3" addons: @@ -727,53 +734,57 @@ matrix: - ubuntu-toolchain-r-test - llvm-toolchain-xenial-6.0 - # - os: linux - # compiler: clang++-6.0 - # env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=../example//examples - # addons: - # apt: - # packages: - # - clang-6.0 - # sources: - # - ubuntu-toolchain-r-test - # - llvm-toolchain-xenial-6.0 - - # - os: linux - # compiler: clang++-6.0 - # env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=../tools - # addons: - # apt: - # packages: - # - clang-6.0 - # - libgmp-dev - # - libmpfr-dev - # sources: - # - ubuntu-toolchain-r-test - # - llvm-toolchain-xenial-6.0 - - # - os: osx - # env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=special_fun - # osx_image: xcode11 - - # - os: osx - # env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=distribution_tests - # osx_image: xcode11 - - # - os: osx - # env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=misc - # osx_image: xcode11 + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=../example//examples + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-6.0 + + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=c++11 TEST_SUITE=../tools + addons: + apt: + packages: + - clang-6.0 + - libgmp-dev + - libmpfr-dev + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-6.0 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=special_fun + osx_image: xcode11 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=distribution_tests + osx_image: xcode11 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=misc + osx_image: xcode11 - os: osx - env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=quadrature + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE="quadrature include=/usr/local/include/eigen3" osx_image: xcode11 + addons: + homebrew: + packages: + eigen - # - os: osx - # env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=float128_tests - # osx_image: xcode11 + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=float128_tests + osx_image: xcode11 - # - os: osx - # env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=../example//examples - # osx_image: xcode11 + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 TEST_SUITE=../example//examples + osx_image: xcode11 install: diff --git a/appveyor.yml b/appveyor.yml index bbee7ac0aa..01848bbcd2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,97 +16,95 @@ platform: environment: matrix: - - ARGS: --toolset=msvc-9.0 address-model=32 - TEST_SUITE: special_fun distribution_tests - - ARGS: --toolset=msvc-10.0 address-model=32 - TEST_SUITE: special_fun distribution_tests - - ARGS: --toolset=msvc-11.0 address-model=32 - TEST_SUITE: special_fun distribution_tests - - ARGS: --toolset=msvc-12.0 address-model=32 - TEST_SUITE: special_fun distribution_tests - - ARGS: --toolset=msvc-14.0 address-model=32 - TEST_SUITE: special_fun distribution_tests - - ARGS: --toolset=msvc-9.0 address-model=32 + # - ARGS: --toolset=msvc-9.0 address-model=32 + # TEST_SUITE: special_fun distribution_tests + # - ARGS: --toolset=msvc-10.0 address-model=32 + # TEST_SUITE: special_fun distribution_tests + # - ARGS: --toolset=msvc-11.0 address-model=32 + # TEST_SUITE: special_fun distribution_tests + # - ARGS: --toolset=msvc-12.0 address-model=32 + # TEST_SUITE: special_fun distribution_tests + # - ARGS: --toolset=msvc-14.0 address-model=32 + # TEST_SUITE: special_fun distribution_tests + - ARGS: --include=/c/tools/vcpkg/installed/eigen3_x86-windows --toolset=msvc-9.0 address-model=32 TEST_SUITE: misc quadrature ../example//examples - ARGS: --toolset=msvc-10.0 address-model=32 TEST_SUITE: misc quadrature ../example//examples - - ARGS: --toolset=msvc-11.0 address-model=32 + - ARGS: --toolset=msvc-11.0 address-model=32 include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - ARGS: --toolset=msvc-12.0 address-model=32 + - ARGS: --toolset=msvc-12.0 address-model=32 --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - ARGS: --toolset=msvc-14.0 address-model=32 + - ARGS: --toolset=msvc-14.0 address-model=32 --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - ARGS: --toolset=msvc-12.0 address-model=64 - TEST_SUITE: special_fun distribution_tests - - ARGS: --toolset=msvc-12.0 address-model=64 + # - ARGS: --toolset=msvc-12.0 address-model=64 + # TEST_SUITE: special_fun distribution_tests + - ARGS: --toolset=msvc-12.0 address-model=64 --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - ARGS: --toolset=msvc-14.0 address-model=64 - TEST_SUITE: special_fun - - ARGS: --toolset=msvc-14.0 address-model=64 - TEST_SUITE: distribution_tests - - ARGS: --toolset=msvc-14.0 address-model=64 + # - ARGS: --toolset=msvc-14.0 address-model=64 + # TEST_SUITE: special_fun + # - ARGS: --toolset=msvc-14.0 address-model=64 + # TEST_SUITE: distribution_tests + - ARGS: --toolset=msvc-14.0 address-model=64 --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=17 - TEST_SUITE: special_fun distribution_tests + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + # ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=17 + # TEST_SUITE: special_fun distribution_tests - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=17 + ARGS: --toolset=msvc-14.1 address-model=64 cxxstd=17 --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=32 - TEST_SUITE: special_fun + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + # ARGS: --toolset=msvc-14.1 address-model=32 + # TEST_SUITE: special_fun - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=32 - TEST_SUITE: distribution_tests + # - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + # ARGS: --toolset=msvc-14.1 address-model=32 + # TEST_SUITE: distribution_tests - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - ARGS: --toolset=msvc-14.1 address-model=32 + ARGS: --toolset=msvc-14.1 address-model=32 --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: misc quadrature ../example//examples - - ARGS: --toolset=gcc address-model=64 - TEST_SUITE: float128_tests - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 + # TEST_SUITE: float128_tests + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z - TEST_SUITE: float128_tests - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z + # TEST_SUITE: float128_tests + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 - TEST_SUITE: special_fun - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 + # TEST_SUITE: special_fun + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z - TEST_SUITE: special_fun - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z + # TEST_SUITE: special_fun + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 - TEST_SUITE: distribution_tests - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 + # TEST_SUITE: distribution_tests + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z - TEST_SUITE: distribution_tests - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z + # TEST_SUITE: distribution_tests + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 - TEST_SUITE: misc - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 + # TEST_SUITE: misc + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z + - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z --include=/c/tools/vcpkg/installed/eigen3_x86-windows TEST_SUITE: quadrature PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 - TEST_SUITE: ../example//examples - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z - TEST_SUITE: ../example//examples - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - + # - ARGS: --toolset=gcc address-model=64 + # TEST_SUITE: ../example//examples + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + # - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z + # TEST_SUITE: ../example//examples + # PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% install: - cd .. @@ -122,6 +120,8 @@ install: - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\math - git submodule update --init tools/boostdep - python tools/boostdep/depinst/depinst.py math + - vcpkg install eigen3 + - vcpkg integrate install - bootstrap - b2 headers diff --git a/include/boost/math/differentiation/autodiff_eigen.hpp b/include/boost/math/differentiation/autodiff_eigen.hpp deleted file mode 100644 index 1c7c44f977..0000000000 --- a/include/boost/math/differentiation/autodiff_eigen.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef BOOST_MATH_DIFFERENTIATION_AUTODIFF_EIGEN_HPP -#define BOOST_MATH_DIFFERENTIATION_AUTODIFF_EIGEN_HPP - -#include -#include - -namespace Eigen { -template -struct NumTraits> : NumTraits { - using fvar = - boost::math::differentiation::autodiff_v1::detail::template fvar; - - enum { - RequireInitialization = 1, - ReadCost = 1, - AddCost = 16, - MulCost = 16, - }; -}; - -template -struct ScalarBinaryOpTraits, - A, BinaryOp> { - typedef boost::math::differentiation::autodiff_v1::detail::template fvar< - RealType, Order> - ReturnType; -}; - -template -struct ScalarBinaryOpTraits, - BinaryOp> { - typedef boost::math::differentiation::autodiff_v1::detail::template fvar< - RealType, Order> - ReturnType; -}; - -template -struct ScalarBinaryOpTraits< - boost::math::differentiation::autodiff_v1::detail::template fvar, - boost::math::differentiation::autodiff_v1::detail::template fvar, - BinaryOp> { - typedef ScalarBinaryOpTraits::ReturnType - RealReturn; - const size_t ReturnOrder = (Order > Order2) ? Order : Order2; - typedef boost::math::differentiation::autodiff_v1::detail::template fvar< - RealReturn, ReturnOrder> - ReturnType; -} -} // namespace Eigen - -#endif // BOOST_MATH_DIFFERENTIATION_AUTODIFF_EIGEN_HPP diff --git a/test/test_autodiff_9.cpp b/test/test_autodiff_9.cpp index 926ef24449..8b373c39fd 100644 --- a/test/test_autodiff_9.cpp +++ b/test/test_autodiff_9.cpp @@ -1,15 +1,64 @@ #include -#include +#include #include "test_autodiff.hpp" +namespace Eigen { +template +struct NumTraits> : NumTraits { + using fvar = + boost::math::differentiation::autodiff_v1::detail::template fvar; + + enum { + RequireInitialization = 1, + ReadCost = 1, + AddCost = 16, + MulCost = 16, + }; +}; + +#define BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(A) \ + template \ + struct ScalarBinaryOpTraits, \ + A, BinaryOp> { \ + typedef boost::math::differentiation::autodiff_v1::detail::template fvar< \ + RealType, Order> \ + ReturnType; \ + }; \ + template \ + struct ScalarBinaryOpTraits, \ + BinaryOp> { \ + typedef boost::math::differentiation::autodiff_v1::detail::template fvar< \ + RealType, Order> \ + ReturnType; \ + }; + +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(float); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(double); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(long double); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(short); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(unsigned short); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(int); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(unsigned int); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(long); +BOOST_AUTODIFF_EIGEN_SCALAR_TRAITS(unsigned long); + +} // namespace Eigen + BOOST_AUTO_TEST_SUITE(test_autodiff_9) +using boost::math::differentiation::autodiff_v1::detail::fvar; + BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_init, T, all_float_types) { constexpr int size = 5; constexpr std::size_t n = 5; - typedef typename fvar fTn; + typedef fvar fTn; Eigen::Matrix x; x[0] = fTn(1.5); x[1] = make_fvar(2.5); @@ -18,19 +67,19 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_init, T, all_float_types) { x[4] = 5.5; constexpr std::size_t m = 2; - typedef typename fvar fTm; + typedef fvar fTm; Eigen::Matrix y; - y = x.template cast(); + y = x.template cast(); BOOST_CHECK_EQUAL(x[0].derivative(0), y[0].derivative(0)); BOOST_CHECK_EQUAL(x[1].derivative(0), y[1].derivative(0)); BOOST_CHECK_EQUAL(x[2].derivative(0), y[2].derivative(0)); BOOST_CHECK_EQUAL(x[3].derivative(0), y[3].derivative(0)); BOOST_CHECK_EQUAL(x[4].derivative(0), y[4].derivative(0)); - constexpr std::size_t p = 3; - typedef typename fvar fTp; - Eigen::Matrix z = - Eigen::Matrix::Random().transpose().template cast(); + // constexpr std::size_t p = 3; + // typedef fvar fTp; + // Eigen::Matrix z = + // Eigen::Matrix::Random().transpose().template cast(); } BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_general, T, all_float_types) { @@ -40,23 +89,23 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_general, T, all_float_types) { using std::pow; using std::sin; - constexpr int dim = 3; + constexpr int dim = 4; constexpr std::size_t n = 2; constexpr double p = 3.456; - typedef typename fvar fTn; + typedef fvar fTn; Eigen::Matrix x; - x[0] = -1; - x[1] = 0; - x[2] = 1; - x[3] = 5; + x[0] = make_fvar(-1); + x[1] = make_fvar(0); + x[2] = make_fvar(1); + x[3] = make_fvar(5); Eigen::Matrix y1, y2, y3, y4, y5; - y1 = sin(x); - y2 = cos(x); - y3 = exp(x); - y4 = pow(x, p); - y5 = log(x); + y1 = x.array().sin(); + y2 = x.array().cos(); + y3 = x.array().exp(); + y4 = x.array().pow(p); + y5 = x.array().log(); // Check sin BOOST_CHECK_EQUAL(y1[0].derivative(0), sin(x[0].derivative(0))); @@ -100,39 +149,37 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_general, T, all_float_types) { BOOST_CHECK_EQUAL(y3[2].derivative(2), exp(x[2].derivative(0))); BOOST_CHECK_EQUAL(y3[3].derivative(2), exp(x[3].derivative(0))); - // Check pow - BOOST_CHECK_EQUAL(y4[0].derivative(0), pow(x[0].derivative(0), p)); - BOOST_CHECK_EQUAL(y4[1].derivative(0), pow(x[1].derivative(0), p)); - BOOST_CHECK_EQUAL(y4[2].derivative(0), pow(x[2].derivative(0), p)); - BOOST_CHECK_EQUAL(y4[3].derivative(0), pow(x[3].derivative(0), p)); - BOOST_CHECK_EQUAL(y4[0].derivative(1), p * pow(x[0].derivative(0), p - 1)); - BOOST_CHECK_EQUAL(y4[1].derivative(1), p * pow(x[1].derivative(0), p - 1)); - BOOST_CHECK_EQUAL(y4[2].derivative(1), p * pow(x[2].derivative(0), p - 1)); - BOOST_CHECK_EQUAL(y4[3].derivative(1), p * pow(x[3].derivative(0), p - 1)); - BOOST_CHECK_EQUAL(y4[0].derivative(2), - (p - 1) * p * pow(x[0].derivative(0), p - 2)); - BOOST_CHECK_EQUAL(y4[1].derivative(2), - (p - 1) * p * pow(x[1].derivative(0), p - 2)); - BOOST_CHECK_EQUAL(y4[2].derivative(2), - (p - 1) * p * pow(x[2].derivative(0), p - 2)); - BOOST_CHECK_EQUAL(y4[3].derivative(2), - (p - 1) * p * pow(x[3].derivative(0), p - 2)); - - // Check log - BOOST_CHECK_EQUAL(y5[2].derivative(0), log(x[0].derivative(0)); - BOOST_CHECK_EQUAL(y5[3].derivative(0), log(x[3].derivative(0)); - BOOST_CHECK_EQUAL(y5[2].derivative(1), 1/x[2].derivative(0)); - BOOST_CHECK_EQUAL(y5[3].derivative(1), 1/x[3].derivative(0)); - BOOST_CHECK_EQUAL(y5[2].derivative(2), -1/pow(x[2].derivative(0), 2)); - BOOST_CHECK_EQUAL(y5[3].derivative(2), -1/pow(x[3].derivative(0), 2)); + // Check pow (without negative or zero) + T powTol = 1e-4; + BOOST_CHECK_CLOSE(y4[2].derivative(0), pow(x[2].derivative(0), p), powTol); + BOOST_CHECK_CLOSE(y4[3].derivative(0), pow(x[3].derivative(0), p), powTol); + BOOST_CHECK_CLOSE(y4[2].derivative(1), p * pow(x[2].derivative(0), p - 1), + powTol); + BOOST_CHECK_CLOSE(y4[3].derivative(1), p * pow(x[3].derivative(0), p - 1), + powTol); + BOOST_CHECK_CLOSE(y4[2].derivative(2), + (p - 1) * p * pow(x[2].derivative(0), p - 2), powTol); + BOOST_CHECK_CLOSE(y4[3].derivative(2), + (p - 1) * p * pow(x[3].derivative(0), p - 2), powTol); + + // Check log (without negative or zero) + T logTol = 1e-5; + BOOST_CHECK_CLOSE(y5[2].derivative(0), log(x[2].derivative(0)), logTol); + BOOST_CHECK_CLOSE(y5[3].derivative(0), log(x[3].derivative(0)), logTol); + BOOST_CHECK_CLOSE(y5[2].derivative(1), 1 / x[2].derivative(0), logTol); + BOOST_CHECK_CLOSE(y5[3].derivative(1), 1 / x[3].derivative(0), logTol); + BOOST_CHECK_CLOSE(y5[2].derivative(2), -1 / pow(x[2].derivative(0), 2), + logTol); + BOOST_CHECK_CLOSE(y5[3].derivative(2), -1 / pow(x[3].derivative(0), 2), + logTol); } BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_scalar, T, all_float_types) { constexpr int dim = 4; constexpr size_t n = 4; - typedef typename fvar fTn; - fTn x = 4; + typedef fvar fTn; + fTn x = make_fvar(4); Eigen::Matrix X; Eigen::Matrix Z; Eigen::Matrix I = Eigen::Matrix::Identity(); @@ -170,8 +217,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_vector, T, all_float_types) { constexpr int dim = 3; constexpr size_t n = 4; - typedef typename fvar fTn; - fTn x = 5; + typedef fvar fTn; + fTn x = make_fvar(5); T xD0 = x.derivative(0); Eigen::Matrix X; X[0] = 1; @@ -190,8 +237,10 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_vector, T, all_float_types) { Eigen::Matrix Y = M * X; + T powTol = 1e-4; + // Y[0] = 1 + 2*x + x*x*x - BOOST_CHECK_EQUAL(Y[0].derivative(0), 1 + 2 * xD0 + pow(xD0, 3)); + BOOST_CHECK_CLOSE(Y[0].derivative(0), 1 + 2 * xD0 + pow(xD0, 3), powTol); BOOST_CHECK_EQUAL(Y[0].derivative(1), 2 + 3 * xD0 * xD0); BOOST_CHECK_EQUAL(Y[0].derivative(2), 6 * xD0); BOOST_CHECK_EQUAL(Y[0].derivative(3), 6); @@ -200,30 +249,64 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_vector, T, all_float_types) { // Y[1] = 1/x + 4*x + 0 BOOST_CHECK_EQUAL(Y[1].derivative(0), 1 / xD0 + 4 * xD0); BOOST_CHECK_EQUAL(Y[1].derivative(1), -1 / (xD0 * xD0) + 4); - BOOST_CHECK_EQUAL(Y[1].derivative(2), 2 / (pow(xD0, 3))); - BOOST_CHECK_EQUAL(Y[1].derivative(3), -6 / (pow(xD0, 3) * xD0)); - BOOST_CHECK_EQUAL(Y[1].derivative(4), 24 / (pow(xD0, 3) * xD0 * xD0)); + BOOST_CHECK_CLOSE(Y[1].derivative(2), 2 / (pow(xD0, 3)), powTol); + BOOST_CHECK_CLOSE(Y[1].derivative(3), -6 / (pow(xD0, 3) * xD0), powTol); + BOOST_CHECK_CLOSE(Y[1].derivative(4), 24 / (pow(xD0, 3) * xD0 * xD0), powTol); // Y[2] = 5 + x*sin(x) + x*x*cos(x*x) BOOST_CHECK_EQUAL(Y[2].derivative(0), 5 + xD0 * sin(xD0) + xD0 * xD0 * cos(xD0 * xD0)); - BOOST_CHECK_EQUAL(Y[2].derivative(1), 2 * xD0 * cos(xD0 * xD0) - - 2 * pow(xD0, 3) * sin(xD0 * xD0) + - sin(xD0) + xD0 * cos(xD0)); - BOOST_CHECK_EQUAL(Y[2].derivative(2), + BOOST_CHECK_CLOSE(Y[2].derivative(1), + 2 * xD0 * cos(xD0 * xD0) - + 2 * pow(xD0, 3) * sin(xD0 * xD0) + sin(xD0) + + xD0 * cos(xD0), + powTol); + BOOST_CHECK_CLOSE(Y[2].derivative(2), -xD0 * (10 * xD0 * sin(xD0 * xD0) + sin(xD0)) + - (2 - 4 * pow(xD0, 4)) * cos(xD0 * xD0) + 2 * cos(xD0)); - BOOST_CHECK_EQUAL(Y[2].derivative(3), -24 * xD0 * sin(xD0 * xD0) + - 8 * pow(xD0, 5) * sin(xD0 * xD0) - - 36 * pow(xD0, 3) * cos(xD0 * xD0) - - 3 * sin(xD0) - xD0 * cos(xD0)); - BOOST_CHECK_EQUAL( + (2 - 4 * pow(xD0, 4)) * cos(xD0 * xD0) + 2 * cos(xD0), + powTol); + BOOST_CHECK_CLOSE( + Y[2].derivative(3), + -24 * xD0 * sin(xD0 * xD0) + 8 * pow(xD0, 5) * sin(xD0 * xD0) - + 36 * pow(xD0, 3) * cos(xD0 * xD0) - 3 * sin(xD0) - xD0 * cos(xD0), + powTol); + BOOST_CHECK_CLOSE( Y[2].derivative(4), -24 * sin(xD0 * xD0) + 112 * pow(xD0, 4) * sin(xD0 * xD0) + 4 * (4 * pow(xD0, 4) - 39) * xD0 * xD0 * cos(xD0 * xD0) + - xD0 * sin(xD0) - 4 * cos(xD0)); + xD0 * sin(xD0) - 4 * cos(xD0), + powTol); +} + +BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_determinant, T, all_float_types) { + using std::cos; + using std::sin; + constexpr int dim = 4; + constexpr size_t n = 1; + + typedef fvar fTn; + fTn x = make_fvar(3); + T xD0 = x.derivative(0); + Eigen::Matrix M = 10 * Eigen::Matrix::Random(); + M(0, 3) = x; + M(1, 0) = 3 * x; + M(1, 2) = 1 / x; + M(2, 2) = x * x; + M(3, 1) = sin(x); + fTn y = M.determinant(); + + Eigen::Matrix dMdx = Eigen::Matrix::Zero(); + dMdx(0, 3) = 1; + dMdx(1, 0) = 3; + dMdx(1, 2) = -1 / (xD0 * xD0); + dMdx(2, 2) = 2 * xD0; + dMdx(3, 1) = cos(xD0); + + T detTol = 1e-3; + + T ans = y.derivative(0) * + (M.inverse() * dMdx.template cast()).trace().derivative(0); + BOOST_CHECK_CLOSE(y.derivative(1), ans, detTol); } -// BOOST_AUTO_TEST_CASE_TEMPLATE(eigen_determinant, T, all_float_types) { -// constexpr int dim = 4; -// } +BOOST_AUTO_TEST_SUITE_END()