diff --git a/.gitlab/issue_templates/Bug Report.md b/.gitlab/issue_templates/Bug Report.md index 0c49b0fe38d4a21c32fb4da83d073e992a0fa6a9..b85ae6884beae8bcb5cbe1999ffd538d37fa7d90 100644 --- a/.gitlab/issue_templates/Bug Report.md +++ b/.gitlab/issue_templates/Bug Report.md @@ -24,9 +24,9 @@ and verify the issue you're about to submit isn't a duplicate. --> ### Minimal Example @@ -40,7 +40,7 @@ on how to create a good minimal example. --> 1. first step 2. second step -3. ... +3. ... ### What is the current *bug* behavior? @@ -60,10 +60,10 @@ on how to create a good minimal example. --> ### Anything else that might help - +- last known working/first broken version (release number or commit hash). --> - [ ] Have a plan to fix this issue. diff --git a/.gitlab/merge_request_templates/Merge Request Template.md b/.gitlab/merge_request_templates/Merge Request Template.md index 3fe963afa104b0c70bc9fcbe9e7824c8c839a99f..04da0859b89d61b8dacc2de38b09e8fd9467416a 100644 --- a/.gitlab/merge_request_templates/Merge Request Template.md +++ b/.gitlab/merge_request_templates/Merge Request Template.md @@ -1,4 +1,4 @@ - - + @@ -28,4 +28,4 @@ - \ No newline at end of file + diff --git a/bench/tensors/README b/bench/tensors/README index 3aca7672c596f033b2668f3d880d740d57b3fc80..d8b5feb7ecb0ac8ad08613314552f588502c3590 100644 --- a/bench/tensors/README +++ b/bench/tensors/README @@ -16,11 +16,11 @@ following commands: 1. export COMPUTECPP_PACKAGE_ROOT_DIR={PATH TO COMPUTECPP ROOT DIRECTORY} 2. bash eigen_sycl_bench.sh -To compile the floating point GPU benchmarks using Intel DPCPP compiler +To compile the floating point GPU benchmarks using Intel DPCPP compiler /path/to/dpcpp/bin/clang+ -DSYCL_COMPILER_IS_DPCPP -DNDEBUG -DEIGEN_USE_SYCL=1 -I ../../ -O3 -DNDEBUG -fsycl -fsycl-targets="supported backend in DPCPP. i.e. spir64 or nvptx64-nvidia-cuda" -std=c++17 tensor_benchmarks_sycl.cc benchmark_main.cc -lpthread -o eigen_dpcpp_sycl Last but not least, we also provide a suite of benchmarks to measure the scalability of the contraction code on CPU. To compile these benchmarks, call g++ contraction_benchmarks_cpu.cc benchmark_main.cc -I ../../ -std=c++11 -O3 -DNDEBUG -pthread -mavx -o benchmarks_cpu -To compile the contraction with DPCPP: +To compile the contraction with DPCPP: /path/to/dpcpp/bin/clang++ -DSYCL_COMPILER_IS_DPCPP -DNDEBUG -DEIGEN_USE_SYCL=1 -I ../../ -O3 -DNDEBUG -fsycl -fsycl-targets="supported backend in DPCPP. i.e. spir64 or nvptx64-nvidia-cuda" -std=c++17 tensor_contract_sycl_bench.cc -lpthread -o eigen_dpcpp_contract diff --git a/bench/tensors/eigen_sycl_bench_contract.sh b/bench/tensors/eigen_sycl_bench_contract.sh index 3ab0138a169bf7e44d664ff7b6fa61295b239624..158b0a940d38cc9f63f53190d85b97a97ff6a46c 100644 --- a/bench/tensors/eigen_sycl_bench_contract.sh +++ b/bench/tensors/eigen_sycl_bench_contract.sh @@ -4,4 +4,3 @@ echo "COMPUTECPP_PACKAGE_ROOT_DIR is set to: "$COMPUTECPP_PACKAGE_ROOT_DIR ${COMPUTECPP_PACKAGE_ROOT_DIR}/bin/compute++ tensor_contract_sycl_bench.cc -I ../../ -I ${COMPUTECPP_PACKAGE_ROOT_DIR}/include/ -std=c++11 -O3 -DNDEBUG -DEIGEN_USE_SYCL=1 -no-serial-memop -mllvm -inline-threshold=10000 -fsycl-ih-last -sycl-driver -Xclang -cl-mad-enable -lOpenCL -lComputeCpp -lpthread -o tensor_contract_sycl_bench ${@:1} export LD_LIBRARY_PATH=${COMPUTECPP_PACKAGE_ROOT_DIR}/lib:$LD_LIBRARY_PATH ./tensor_contract_sycl_bench - diff --git a/blas/README.txt b/blas/README.txt index 63a5203b974896e6131b959cf0c8c978d2873fce..257218c655738355d344094b6d509efd572a4b5b 100644 --- a/blas/README.txt +++ b/blas/README.txt @@ -3,4 +3,3 @@ This directory contains a BLAS library built on top of Eigen. This module is not built by default. In order to compile it, you need to type 'make blas' from within your build dir. - diff --git a/blas/level2_impl.h b/blas/level2_impl.h index ca9f48f3d9479eefae5912e2c589a283c0b3e630..83e80adb555c1b58b621ec19936934e0e75e74e0 100644 --- a/blas/level2_impl.h +++ b/blas/level2_impl.h @@ -94,34 +94,36 @@ EIGEN_BLAS_FUNC(trsv) using Eigen::Upper; static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Upper | 0, false, ColMajor > ::run), // array index: TR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Lower | 0, false, RowMajor > ::run), // array index: ADJ | (UP << 2) | (NUNIT << 3) - (Eigen::internal::triangular_solve_vector::run), 0, + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Lower | 0, Conj, RowMajor > ::run), 0, // array index: NOTR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Lower | 0, false, ColMajor > ::run), // array index: TR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Upper | 0, false, RowMajor > ::run), // array index: ADJ | (LO << 2) | (NUNIT << 3) - (Eigen::internal::triangular_solve_vector::run), 0, + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Upper | 0, Conj, RowMajor > ::run), 0, // array index: NOTR | (UP << 2) | (UNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Upper | UnitDiag, false, + ColMajor > ::run), // array index: TR | (UP << 2) | (UNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Lower | UnitDiag, false, + RowMajor > ::run), // array index: ADJ | (UP << 2) | (UNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Lower | UnitDiag, Conj, + RowMajor > ::run), 0, // array index: NOTR | (LO << 2) | (UNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Lower | UnitDiag, false, + ColMajor > ::run), // array index: TR | (LO << 2) | (UNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Upper | UnitDiag, false, + RowMajor > ::run), // array index: ADJ | (LO << 2) | (UNIT << 3) - (Eigen::internal::triangular_solve_vector::run), + (Eigen::internal::triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, Upper | UnitDiag, Conj, + RowMajor > ::run), 0}; const Scalar *a = reinterpret_cast(pa); @@ -160,41 +162,46 @@ EIGEN_BLAS_FUNC(trmv) using Eigen::RowMajor; using Eigen::UnitDiag; using Eigen::Upper; - static const functype func[16] = { - // array index: NOTR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: TR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: ADJ | (UP << 2) | (NUNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - 0, - // array index: NOTR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: TR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: ADJ | (LO << 2) | (NUNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - 0, - // array index: NOTR | (UP << 2) | (UNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: TR | (UP << 2) | (UNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: ADJ | (UP << 2) | (UNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - 0, - // array index: NOTR | (LO << 2) | (UNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: TR | (LO << 2) | (UNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - // array index: ADJ | (LO << 2) | (UNIT << 3) - (Eigen::internal::triangular_matrix_vector_product::run), - 0}; + static const functype func[16] = {// array index: NOTR | (UP << 2) | (NUNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Upper | 0, Scalar, false, + Scalar, false, ColMajor > ::run), + // array index: TR | (UP << 2) | (NUNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Lower | 0, Scalar, false, + Scalar, false, RowMajor > ::run), + // array index: ADJ | (UP << 2) | (NUNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Lower | 0, Scalar, Conj, + Scalar, false, RowMajor > ::run), + 0, + // array index: NOTR | (LO << 2) | (NUNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Lower | 0, Scalar, false, + Scalar, false, ColMajor > ::run), + // array index: TR | (LO << 2) | (NUNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Upper | 0, Scalar, false, + Scalar, false, RowMajor > ::run), + // array index: ADJ | (LO << 2) | (NUNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Upper | 0, Scalar, Conj, + Scalar, false, RowMajor > ::run), + 0, + // array index: NOTR | (UP << 2) | (UNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Upper | UnitDiag, Scalar, + false, Scalar, false, ColMajor > ::run), + // array index: TR | (UP << 2) | (UNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Lower | UnitDiag, Scalar, + false, Scalar, false, RowMajor > ::run), + // array index: ADJ | (UP << 2) | (UNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Lower | UnitDiag, Scalar, + Conj, Scalar, false, RowMajor > ::run), + 0, + // array index: NOTR | (LO << 2) | (UNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Lower | UnitDiag, Scalar, + false, Scalar, false, ColMajor > ::run), + // array index: TR | (LO << 2) | (UNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Upper | UnitDiag, Scalar, + false, Scalar, false, RowMajor > ::run), + // array index: ADJ | (LO << 2) | (UNIT << 3) + (Eigen::internal::triangular_matrix_vector_product < int, Upper | UnitDiag, Scalar, + Conj, Scalar, false, RowMajor > ::run), + 0}; const Scalar *a = reinterpret_cast(pa); Scalar *b = reinterpret_cast(pb); @@ -381,32 +388,36 @@ EIGEN_BLAS_FUNC(tbsv) using Eigen::Upper; static const functype func[16] = { // array index: NOTR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Upper | 0, Scalar, false, Scalar, ColMajor > ::run), // array index: TR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Lower | 0, Scalar, false, Scalar, RowMajor > ::run), // array index: ADJ | (UP << 2) | (NUNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Lower | 0, Scalar, Conj, Scalar, RowMajor > ::run), 0, // array index: NOTR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Lower | 0, Scalar, false, Scalar, ColMajor > ::run), // array index: TR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Upper | 0, Scalar, false, Scalar, RowMajor > ::run), // array index: ADJ | (LO << 2) | (NUNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Upper | 0, Scalar, Conj, Scalar, RowMajor > ::run), 0, // array index: NOTR | (UP << 2) | (UNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Upper | UnitDiag, Scalar, false, Scalar, + ColMajor > ::run), // array index: TR | (UP << 2) | (UNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Lower | UnitDiag, Scalar, false, Scalar, + RowMajor > ::run), // array index: ADJ | (UP << 2) | (UNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Lower | UnitDiag, Scalar, Conj, Scalar, RowMajor > ::run), 0, // array index: NOTR | (LO << 2) | (UNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Lower | UnitDiag, Scalar, false, Scalar, + ColMajor > ::run), // array index: TR | (LO << 2) | (UNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Upper | UnitDiag, Scalar, false, Scalar, + RowMajor > ::run), // array index: ADJ | (LO << 2) | (UNIT << 3) - (Eigen::internal::band_solve_triangular_selector::run), + (Eigen::internal::band_solve_triangular_selector < int, Upper | UnitDiag, Scalar, Conj, Scalar, RowMajor > ::run), 0, }; @@ -460,47 +471,46 @@ EIGEN_BLAS_FUNC(tpmv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap using Eigen::RowMajor; using Eigen::UnitDiag; using Eigen::Upper; - static const functype func[16] = { - // array index: NOTR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: TR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: ADJ | (UP << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - 0, - // array index: NOTR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: TR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: ADJ | (LO << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - 0, - // array index: NOTR | (UP << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: TR | (UP << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: ADJ | (UP << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - 0, - // array index: NOTR | (LO << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: TR | (LO << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - // array index: ADJ | (LO << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_matrix_vector_product::run), - 0}; + static const functype func[16] = {// array index: NOTR | (UP << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Upper | 0, Scalar, + false, Scalar, false, ColMajor > ::run), + // array index: TR | (UP << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Lower | 0, Scalar, + false, Scalar, false, RowMajor > ::run), + // array index: ADJ | (UP << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Lower | 0, Scalar, + Conj, Scalar, false, RowMajor > ::run), + 0, + // array index: NOTR | (LO << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Lower | 0, Scalar, + false, Scalar, false, ColMajor > ::run), + // array index: TR | (LO << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Upper | 0, Scalar, + false, Scalar, false, RowMajor > ::run), + // array index: ADJ | (LO << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Upper | 0, Scalar, + Conj, Scalar, false, RowMajor > ::run), + 0, + // array index: NOTR | (UP << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Upper | UnitDiag, + Scalar, false, Scalar, false, ColMajor > ::run), + // array index: TR | (UP << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Lower | UnitDiag, + Scalar, false, Scalar, false, RowMajor > ::run), + // array index: ADJ | (UP << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Lower | UnitDiag, + Scalar, Conj, Scalar, false, RowMajor > ::run), + 0, + // array index: NOTR | (LO << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Lower | UnitDiag, + Scalar, false, Scalar, false, ColMajor > ::run), + // array index: TR | (LO << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Upper | UnitDiag, + Scalar, false, Scalar, false, RowMajor > ::run), + // array index: ADJ | (LO << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_matrix_vector_product < int, Upper | UnitDiag, + Scalar, Conj, Scalar, false, RowMajor > ::run), + 0}; Scalar *ap = reinterpret_cast(pap); Scalar *x = reinterpret_cast(px); @@ -551,45 +561,46 @@ EIGEN_BLAS_FUNC(tpsv)(char *uplo, char *opa, char *diag, int *n, RealScalar *pap using Eigen::RowMajor; using Eigen::UnitDiag; using Eigen::Upper; - static const functype func[16] = { - // array index: NOTR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: TR | (UP << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: ADJ | (UP << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - 0, - // array index: NOTR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: TR | (LO << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: ADJ | (LO << 2) | (NUNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - 0, - // array index: NOTR | (UP << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: TR | (UP << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: ADJ | (UP << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - 0, - // array index: NOTR | (LO << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: TR | (LO << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - // array index: ADJ | (LO << 2) | (UNIT << 3) - (Eigen::internal::packed_triangular_solve_vector::run), - 0}; + static const functype func[16] = {// array index: NOTR | (UP << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Upper | 0, false, ColMajor > ::run), + // array index: TR | (UP << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Lower | 0, false, RowMajor > ::run), + // array index: ADJ | (UP << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Lower | 0, Conj, RowMajor > ::run), + 0, + // array index: NOTR | (LO << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Lower | 0, false, ColMajor > ::run), + // array index: TR | (LO << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Upper | 0, false, RowMajor > ::run), + // array index: ADJ | (LO << 2) | (NUNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Upper | 0, Conj, RowMajor > ::run), + 0, + // array index: NOTR | (UP << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Upper | UnitDiag, false, ColMajor > ::run), + // array index: TR | (UP << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Lower | UnitDiag, false, RowMajor > ::run), + // array index: ADJ | (UP << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Lower | UnitDiag, Conj, RowMajor > ::run), + 0, + // array index: NOTR | (LO << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Lower | UnitDiag, false, ColMajor > ::run), + // array index: TR | (LO << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Upper | UnitDiag, false, RowMajor > ::run), + // array index: ADJ | (LO << 2) | (UNIT << 3) + (Eigen::internal::packed_triangular_solve_vector < Scalar, Scalar, int, OnTheLeft, + Upper | UnitDiag, Conj, RowMajor > ::run), + 0}; Scalar *ap = reinterpret_cast(pap); Scalar *x = reinterpret_cast(px); diff --git a/blas/level3_impl.h b/blas/level3_impl.h index 4ea1b46c2229c15c53709c98660441386e690be1..9db61864256a00e4af99c7f25acec492cb970c4d 100644 --- a/blas/level3_impl.h +++ b/blas/level3_impl.h @@ -240,87 +240,86 @@ EIGEN_BLAS_FUNC(trsm) using Eigen::Upper; typedef void (*functype)(DenseIndex, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, Eigen::internal::level3_blocking &); - static const functype func[32] = { - // array index: NOTR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (LEFT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (LEFT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (LEFT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (LEFT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (LEFT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (RIGHT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (LEFT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (LEFT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (LEFT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: TR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - // array index: ADJ | (RIGHT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::triangular_solve_matrix::run), - 0}; + static const functype func[32] = {// array index: NOTR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Upper | 0, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Lower | 0, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Lower | 0, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Upper | 0, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Lower | 0, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Lower | 0, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Lower | 0, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Upper | 0, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Upper | 0, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Lower | 0, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Upper | 0, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Upper | 0, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (LEFT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Upper | UnitDiag, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Lower | UnitDiag, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Lower | UnitDiag, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Upper | UnitDiag, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Lower | UnitDiag, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Lower | UnitDiag, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (LEFT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Lower | UnitDiag, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Upper | UnitDiag, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheLeft, + Upper | UnitDiag, Conj, RowMajor, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Lower | UnitDiag, false, ColMajor, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Upper | UnitDiag, false, RowMajor, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::triangular_solve_matrix < Scalar, DenseIndex, OnTheRight, + Upper | UnitDiag, Conj, RowMajor, ColMajor, 1 > ::run), + 0}; const Scalar *a = reinterpret_cast(pa); Scalar *b = reinterpret_cast(pb); @@ -377,87 +376,86 @@ EIGEN_BLAS_FUNC(trmm) typedef void (*functype)(DenseIndex, DenseIndex, DenseIndex, const Scalar *, DenseIndex, const Scalar *, DenseIndex, Scalar *, DenseIndex, DenseIndex, const Scalar &, Eigen::internal::level3_blocking &); - static const functype func[32] = { - // array index: NOTR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (LEFT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (LEFT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (LEFT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (LEFT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (LEFT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (RIGHT << 2) | (UP << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (LEFT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (LEFT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (LEFT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0, - // array index: NOTR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: TR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - // array index: ADJ | (RIGHT << 2) | (LO << 3) | (UNIT << 4) - (Eigen::internal::product_triangular_matrix_matrix::run), - 0}; + static const functype func[32] = {// array index: NOTR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Upper | 0, + true, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Lower | 0, + true, RowMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Lower | 0, + true, RowMajor, Conj, ColMajor, false, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Upper | 0, + false, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Lower | 0, + false, ColMajor, false, RowMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (UP << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Lower | 0, + false, ColMajor, false, RowMajor, Conj, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Lower | 0, + true, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Upper | 0, + true, RowMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Upper | 0, + true, RowMajor, Conj, ColMajor, false, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Lower | 0, + false, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Upper | 0, + false, ColMajor, false, RowMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (LO << 3) | (NUNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, Upper | 0, + false, ColMajor, false, RowMajor, Conj, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (LEFT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Upper | UnitDiag, true, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Lower | UnitDiag, true, RowMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Lower | UnitDiag, true, RowMajor, Conj, ColMajor, false, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Upper | UnitDiag, false, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Lower | UnitDiag, false, ColMajor, false, RowMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (UP << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Lower | UnitDiag, false, ColMajor, false, RowMajor, Conj, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (LEFT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Lower | UnitDiag, true, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (LEFT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Upper | UnitDiag, true, RowMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (LEFT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Upper | UnitDiag, true, RowMajor, Conj, ColMajor, false, ColMajor, 1 > ::run), + 0, + // array index: NOTR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Lower | UnitDiag, false, ColMajor, false, ColMajor, false, ColMajor, 1 > ::run), + // array index: TR | (RIGHT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Upper | UnitDiag, false, ColMajor, false, RowMajor, false, ColMajor, 1 > ::run), + // array index: ADJ | (RIGHT << 2) | (LO << 3) | (UNIT << 4) + (Eigen::internal::product_triangular_matrix_matrix < Scalar, DenseIndex, + Upper | UnitDiag, false, ColMajor, false, RowMajor, Conj, ColMajor, 1 > ::run), + 0}; const Scalar *a = reinterpret_cast(pa); Scalar *b = reinterpret_cast(pb); diff --git a/blas/testing/CMakeLists.txt b/blas/testing/CMakeLists.txt index f0ee6a487e6d28e92f3e48e281e83cc7f27c8562..d5512595cc302edc5831d29ad49e52a1863f9d92 100644 --- a/blas/testing/CMakeLists.txt +++ b/blas/testing/CMakeLists.txt @@ -26,7 +26,7 @@ macro(ei_add_blas_test testname) add_test(${testname} "${Eigen_SOURCE_DIR}/blas/testing/runblastest.sh" "${testname}" "${Eigen_SOURCE_DIR}/blas/testing/${testname}.dat") add_dependencies(buildtests ${targetname}) - + endmacro() ei_add_blas_test(sblat1) @@ -49,4 +49,3 @@ ei_add_blas_test(zblat3) # add_dependencies(level1 sblat1) endif() - diff --git a/blas/testing/cblat2.f b/blas/testing/cblat2.f index 5833ea81ae950402bb65e0bdc83af280163dae8c..74dd85d781a12c2ca56636b079f876d5b030a21e 100644 --- a/blas/testing/cblat2.f +++ b/blas/testing/cblat2.f @@ -3276,4 +3276,3 @@ * End of XERBLA * END - diff --git a/blas/testing/cblat3.f b/blas/testing/cblat3.f index 09f2cb9c5cb46d7203433fc9772bcf037a93358c..c0a8b8c11f6626bb963f4152ca2d62ebd49c76f0 100644 --- a/blas/testing/cblat3.f +++ b/blas/testing/cblat3.f @@ -3489,4 +3489,3 @@ * End of XERBLA * END - diff --git a/blas/testing/dblat2.f b/blas/testing/dblat2.f index 0fa80afa4df8b42b4a5ba5553510480360877a19..637a84b66bd11a552858a49c2b5c4cbb1d1cbfe6 100644 --- a/blas/testing/dblat2.f +++ b/blas/testing/dblat2.f @@ -3173,4 +3173,3 @@ * End of XERBLA * END - diff --git a/blas/testing/dblat3.f b/blas/testing/dblat3.f index 8d37c7453164245ab6e0fbd40e0201760ea3403a..96f0bcc5bc094dcef9a948d4731dc166d385b1d3 100644 --- a/blas/testing/dblat3.f +++ b/blas/testing/dblat3.f @@ -2870,4 +2870,3 @@ * End of XERBLA * END - diff --git a/blas/testing/runblastest.sh b/blas/testing/runblastest.sh index 4ffaf0111149adf881baa6e735cd344936a16e79..abac198f7f705ee670249d482a2aaf3737c8979e 100755 --- a/blas/testing/runblastest.sh +++ b/blas/testing/runblastest.sh @@ -39,7 +39,7 @@ else cat .runtest.log echo -e $black exit 1; - fi + fi fi echo -e $green Test $1 passed$black fi diff --git a/blas/testing/sblat2.f b/blas/testing/sblat2.f index 71605ed3121dcf1cef75943cb64a0862b3e15134..66e3dcc36aaaffd4ce8f5ef222c2057979c0910c 100644 --- a/blas/testing/sblat2.f +++ b/blas/testing/sblat2.f @@ -3173,4 +3173,3 @@ * End of XERBLA * END - diff --git a/blas/testing/sblat3.f b/blas/testing/sblat3.f index 8792696337c2a7317d3d2b23be380af496964d2c..ce886d199efd864eda559c57aa6cfb1a7c282238 100644 --- a/blas/testing/sblat3.f +++ b/blas/testing/sblat3.f @@ -2870,4 +2870,3 @@ * End of XERBLA * END - diff --git a/blas/testing/zblat2.f b/blas/testing/zblat2.f index 53129a11e9869761f501197291e0176be668ea17..aa5a430a247169ca1d7d81c901c2b36ac140eb9e 100644 --- a/blas/testing/zblat2.f +++ b/blas/testing/zblat2.f @@ -3284,4 +3284,3 @@ * End of XERBLA * END - diff --git a/blas/testing/zblat3.f b/blas/testing/zblat3.f index 59ca241456adb1e978ecc125e9c5d7d9e29a7231..ed52804efefbe3c90b7b634afd3e03e434087330 100644 --- a/blas/testing/zblat3.f +++ b/blas/testing/zblat3.f @@ -3499,4 +3499,3 @@ * End of XERBLA * END - diff --git a/ci/scripts/build.linux.script.sh b/ci/scripts/build.linux.script.sh old mode 100644 new mode 100755 diff --git a/ci/scripts/common.linux.before_script.sh b/ci/scripts/common.linux.before_script.sh old mode 100644 new mode 100755 diff --git a/ci/scripts/test.linux.after_script.sh b/ci/scripts/test.linux.after_script.sh old mode 100644 new mode 100755 diff --git a/ci/scripts/test.linux.script.sh b/ci/scripts/test.linux.script.sh old mode 100644 new mode 100755 diff --git a/ci/scripts/vars.linux.sh b/ci/scripts/vars.linux.sh old mode 100644 new mode 100755 index 6676868d1b5481308c564a5f6c8e63cee5619ae0..ca951ec1fab908cecaf4d569aa8ec27b7d0e195d --- a/ci/scripts/vars.linux.sh +++ b/ci/scripts/vars.linux.sh @@ -11,4 +11,3 @@ export EIGEN_CI_TEST_CUSTOM_CXX_FLAGS="" export EIGEN_CI_CTEST_LABEL="Official" export EIGEN_CI_CTEST_REGEX="" export EIGEN_CI_CTEST_ARGS="" - diff --git a/cmake/Eigen3ConfigVersion.cmake.in b/cmake/Eigen3ConfigVersion.cmake.in index b680c63a0dd6025c98e36d8e98e7d1700ffd761f..e40320ba9f35af7515b655f7c14b138c5a725406 100644 --- a/cmake/Eigen3ConfigVersion.cmake.in +++ b/cmake/Eigen3ConfigVersion.cmake.in @@ -1,5 +1,5 @@ # This is a CMake version file for the Config-mode of find_package(). -# +# # The version constraint is compatible with the current package under the # following conditions: # - If a version range is specified, the package version falls within the diff --git a/cmake/EigenConfigureTesting.cmake b/cmake/EigenConfigureTesting.cmake index d72d88a020f6375637ae515e393cc04648e21ec5..5a64f8a0acdde5d9b3d985c221943ef9f8c17e6b 100644 --- a/cmake/EigenConfigureTesting.cmake +++ b/cmake/EigenConfigureTesting.cmake @@ -70,5 +70,3 @@ if(CMAKE_COMPILER_IS_GNUCXX) elseif(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS") endif() - - diff --git a/cmake/EigenUninstall.cmake b/cmake/EigenUninstall.cmake index 5e63c98d9974cdf7a5679690be9dbf7d78a02b30..400eee69158d616cb6214404512de32f01765bb3 100644 --- a/cmake/EigenUninstall.cmake +++ b/cmake/EigenUninstall.cmake @@ -35,6 +35,3 @@ else() message(STATUS "Probably make install has not been performed") message(STATUS " or install_manifest.txt has been deleted.") endif() - - - diff --git a/cmake/FindAdolc.cmake b/cmake/FindAdolc.cmake index 13c59fcf72b239670020a9f9a129fcd4637d91af..12df181e1d45ece0de839be72ab72553f3e7ad4e 100644 --- a/cmake/FindAdolc.cmake +++ b/cmake/FindAdolc.cmake @@ -8,9 +8,9 @@ find_path(ADOLC_INCLUDES PATHS $ENV{ADOLCDIR} $ENV{ADOLCDIR}/include ${INCLUDE_INSTALL_DIR} ) -find_library(ADOLC_LIBRARIES - adolc - PATHS $ENV{ADOLCDIR} ${LIB_INSTALL_DIR} +find_library(ADOLC_LIBRARIES + adolc + PATHS $ENV{ADOLCDIR} ${LIB_INSTALL_DIR} PATH_SUFFIXES lib lib64) include(FindPackageHandleStandardArgs) diff --git a/cmake/FindCHOLMOD.cmake b/cmake/FindCHOLMOD.cmake index e470cb2e0e502b432625d7813e07c1c42da2f3b1..c24086d25984ec7dc839a0501d221f9dd8e578c9 100644 --- a/cmake/FindCHOLMOD.cmake +++ b/cmake/FindCHOLMOD.cmake @@ -79,7 +79,7 @@ if(CHOLMOD_LIBRARIES) if (SUITESPARSE_LIBRARY) set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${SUITESPARSE_LIBRARY}) endif () - + endif() include(FindPackageHandleStandardArgs) diff --git a/cmake/FindDPCPP.cmake b/cmake/FindDPCPP.cmake index 73aa30f653d42deff3ee0256cd1b675e2605a927..7273814294f14dfeee0d7e036c12035fd750c8e8 100644 --- a/cmake/FindDPCPP.cmake +++ b/cmake/FindDPCPP.cmake @@ -9,7 +9,7 @@ if("${DPCPP_SYCL_TARGET}" STREQUAL "amdgcn-amd-amdhsa" AND " please specify in DPCPP_SYCL_ARCH") endif() -set(DPCPP_USER_FLAGS "" CACHE STRING +set(DPCPP_USER_FLAGS "" CACHE STRING "Additional user-specified compiler flags for DPC++") get_filename_component(DPCPP_BIN_DIR ${CMAKE_CXX_COMPILER} DIRECTORY) diff --git a/cmake/FindFFTW.cmake b/cmake/FindFFTW.cmake index ed55c5fad6baa31628a2327541a03c1701055566..e0415e3d9444ed151ea254c9bda4efb21a2cb292 100644 --- a/cmake/FindFFTW.cmake +++ b/cmake/FindFFTW.cmake @@ -2,7 +2,7 @@ # # Usage: # find_package(FFTW [REQUIRED] [QUIET] ) -# +# # It sets the following variables: # FFTW_FOUND ... true if fftw is found on the system # FFTW_LIBRARIES ... full path to fftw library @@ -117,4 +117,3 @@ find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW_INCLUDES FFTW_LIBRARIES) mark_as_advanced(FFTW_INCLUDES FFTW_LIBRARIES FFTW_LIB FFTWF_LIB FFTWL_LIB) - diff --git a/cmake/FindKLU.cmake b/cmake/FindKLU.cmake index 6217d14908fe3720af561c2101e91666bda2ee07..a07d1aa4772ea306acc6418e793a850199a44f31 100644 --- a/cmake/FindKLU.cmake +++ b/cmake/FindKLU.cmake @@ -28,7 +28,7 @@ if(KLU_LIBRARIES) if(COLAMD_LIBRARY) set(KLU_LIBRARIES ${KLU_LIBRARIES} ${COLAMD_LIBRARY}) endif () - + find_library(AMD_LIBRARY amd PATHS ${KLU_LIBDIR} $ENV{KLUDIR} ${LIB_INSTALL_DIR}) if(AMD_LIBRARY) set(KLU_LIBRARIES ${KLU_LIBRARIES} ${AMD_LIBRARY}) diff --git a/cmake/FindMPFR.cmake b/cmake/FindMPFR.cmake index d8da9d6ff81105913c58741831e38d6abb803653..c19cc90daee88124e46758542ad917cefe7791d4 100644 --- a/cmake/FindMPFR.cmake +++ b/cmake/FindMPFR.cmake @@ -47,20 +47,20 @@ endif() if(MPFR_INCLUDES) # Set MPFR_VERSION - + file(READ "${MPFR_INCLUDES}/mpfr.h" _mpfr_version_header) - + string(REGEX MATCH "define[ \t]+MPFR_VERSION_MAJOR[ \t]+([0-9]+)" _mpfr_major_version_match "${_mpfr_version_header}") set(MPFR_MAJOR_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+MPFR_VERSION_MINOR[ \t]+([0-9]+)" _mpfr_minor_version_match "${_mpfr_version_header}") set(MPFR_MINOR_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+MPFR_VERSION_PATCHLEVEL[ \t]+([0-9]+)" _mpfr_patchlevel_version_match "${_mpfr_version_header}") set(MPFR_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}") - + set(MPFR_VERSION ${MPFR_MAJOR_VERSION}.${MPFR_MINOR_VERSION}.${MPFR_PATCHLEVEL_VERSION}) - + # Check whether found version exceeds minimum version - + if(${MPFR_VERSION} VERSION_LESS ${MPFR_FIND_VERSION}) set(MPFR_VERSION_OK FALSE) message(STATUS "MPFR version ${MPFR_VERSION} found in ${MPFR_INCLUDES}, " diff --git a/cmake/FindMPREAL.cmake b/cmake/FindMPREAL.cmake index 947a1ce88678ddb4ffd7f49d38ac30e731afb332..65e41f2832bce4c550c08cd3068846dfb689c3d2 100644 --- a/cmake/FindMPREAL.cmake +++ b/cmake/FindMPREAL.cmake @@ -61,33 +61,33 @@ int main(int argc, char** argv) { if(MPREAL_INCLUDES) # Set MPREAL_VERSION - + file(READ "${MPREAL_INCLUDES}/mpreal.h" _mpreal_version_header) - + string(REGEX MATCH "define[ \t]+MPREAL_VERSION_MAJOR[ \t]+([0-9]+)" _mpreal_major_version_match "${_mpreal_version_header}") set(MPREAL_MAJOR_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+MPREAL_VERSION_MINOR[ \t]+([0-9]+)" _mpreal_minor_version_match "${_mpreal_version_header}") set(MPREAL_MINOR_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+MPREAL_VERSION_PATCHLEVEL[ \t]+([0-9]+)" _mpreal_patchlevel_version_match "${_mpreal_version_header}") set(MPREAL_PATCHLEVEL_VERSION "${CMAKE_MATCH_1}") - + set(MPREAL_VERSION ${MPREAL_MAJOR_VERSION}.${MPREAL_MINOR_VERSION}.${MPREAL_PATCHLEVEL_VERSION}) - + # Check whether found version exceeds minimum version - + if(${MPREAL_VERSION} VERSION_LESS ${MPREAL_FIND_VERSION}) set(MPREAL_VERSION_OK FALSE) message(STATUS "MPREAL version ${MPREAL_VERSION} found in ${MPREAL_INCLUDES}, " "but at least version ${MPREAL_FIND_VERSION} is required") else() set(MPREAL_VERSION_OK TRUE) - + list(APPEND MPREAL_INCLUDES "${MPFR_INCLUDES}" "${GMP_INCLUDES}") list(REMOVE_DUPLICATES MPREAL_INCLUDES) - + list(APPEND MPREAL_LIBRARIES "${MPFR_LIBRARIES}" "${GMP_LIBRARIES}") list(REMOVE_DUPLICATES MPREAL_LIBRARIES) - + # Make sure it compiles with the current compiler. unset(MPREAL_WORKS CACHE) include(CheckCXXSourceCompiles) diff --git a/cmake/FindSPQR.cmake b/cmake/FindSPQR.cmake index d6fb2e13d98065505bd959298ebeb9d488cb5507..83e508b0445ed9fcbbf96df2d93fe87bfb1eb0c0 100644 --- a/cmake/FindSPQR.cmake +++ b/cmake/FindSPQR.cmake @@ -1,7 +1,7 @@ # SPQR lib usually requires linking to a blas and lapack library. # It is up to the user of this module to find a BLAS and link to it. -# SPQR lib requires Cholmod, colamd and amd as well. +# SPQR lib requires Cholmod, colamd and amd as well. # FindCholmod.cmake can be used to find those packages before finding spqr if (SPQR_INCLUDES AND SPQR_LIBRARIES) @@ -32,10 +32,10 @@ if(SPQR_LIBRARIES) if(CHOLMOD_LIBRARY) set(SPQR_LIBRARIES ${SPQR_LIBRARIES} ${CHOLMOD_LIBRARY}) endif() - + endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SPQR DEFAULT_MSG SPQR_INCLUDES SPQR_LIBRARIES) -mark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES) \ No newline at end of file +mark_as_advanced(SPQR_INCLUDES SPQR_LIBRARIES) diff --git a/cmake/FindUMFPACK.cmake b/cmake/FindUMFPACK.cmake index 91cf6372f798dbdb86d46bfc8d7f56b913524395..c61e9cdd0ef99b358ed6d1a6e88484ed9a3b16ee 100644 --- a/cmake/FindUMFPACK.cmake +++ b/cmake/FindUMFPACK.cmake @@ -28,7 +28,7 @@ if(UMFPACK_LIBRARIES) if(COLAMD_LIBRARY) set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY}) endif () - + find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR}) if(AMD_LIBRARY) set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY}) diff --git a/cmake/RegexUtils.cmake b/cmake/RegexUtils.cmake index f0a15248bb8f5ad912ad492d642bd0b3e3c6d2e0..e0c5819cded08bc43bc386b46d656dfcc498ba1a 100644 --- a/cmake/RegexUtils.cmake +++ b/cmake/RegexUtils.cmake @@ -16,4 +16,4 @@ function(test_escape_string_as_regex) if(NOT test2 STREQUAL testRef) message("Error in the escape_string_for_regex function : \n ${test1} was escaped as ${test2}, should be ${testRef}") endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/debug/gdb/printers.py b/debug/gdb/printers.py index 2c3fccfa3bc92f58e6d6f0f5cb73570f47636d9e..4a9cc3f5f934387ada037388f45e8069c067e699 100644 --- a/debug/gdb/printers.py +++ b/debug/gdb/printers.py @@ -9,13 +9,13 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Pretty printers for Eigen::Matrix -# This is still pretty basic as the python extension to gdb is still pretty basic. +# This is still pretty basic as the python extension to gdb is still pretty basic. # It cannot handle complex eigen types and it doesn't support many of the other eigen types # This code supports fixed size as well as dynamic size matrices # To use it: # -# * Create a directory and put the file as well as an empty __init__.py in +# * Create a directory and put the file as well as an empty __init__.py in # that directory. # * Create a ~/.gdbinit file, that contains the following: # python @@ -32,7 +32,7 @@ from bisect import bisect_left # Basic row/column iteration code for use with Sparse and Dense matrices class _MatrixEntryIterator(object): - + def __init__(self, rows, cols, row_major): self.rows = rows self.cols = cols @@ -52,7 +52,7 @@ class _MatrixEntryIterator(object): if self.rowMajor == 0: if self.currentCol >= self.cols: raise StopIteration - + self.currentRow += 1 if self.currentRow >= self.rows: self.currentRow = 0 @@ -60,7 +60,7 @@ class _MatrixEntryIterator(object): else: if self.currentRow >= self.rows: raise StopIteration - + self.currentCol += 1 if self.currentCol >= self.cols: self.currentCol = 0 @@ -74,10 +74,10 @@ class EigenMatrixPrinter: def __init__(self, variety, val): """Extract all the necessary information""" - + # Save the variety (presumably "Matrix" or "Array") for later usage self.variety = variety - + # The gdb extension does not support value template arguments - need to extract them by hand typeinfo = val.type if typeinfo.code == gdb.TYPE_CODE_REF: @@ -88,33 +88,33 @@ class EigenMatrixPrinter: m = regex.findall(tag)[0][1:-1] template_params = m.split(',') template_params = [x.replace(" ", "") for x in template_params] - + if template_params[1] in ['-0x00000000000000001', '-0x000000001', '-1']: self.rows = val['m_storage']['m_rows'] else: self.rows = int(template_params[1]) - + if template_params[2] in ['-0x00000000000000001', '-0x000000001', '-1']: self.cols = val['m_storage']['m_cols'] else: self.cols = int(template_params[2]) - + self.options = 0 # default value if len(template_params) > 3: self.options = template_params[3] - + self.rowMajor = (int(self.options) & 0x1) - + self.innerType = self.type.template_argument(0) - + self.val = val - + # Fixed size matrices have a struct as their storage, so we need to walk through this self.data = self.val['m_storage']['m_data'] if self.data.type.code == gdb.TYPE_CODE_STRUCT: self.data = self.data['array'] self.data = self.data.cast(self.innerType.pointer()) - + class _Iterator(_MatrixEntryIterator): def __init__(self, rows, cols, data_ptr, row_major): super(EigenMatrixPrinter._Iterator, self).__init__(rows, cols, row_major) @@ -123,7 +123,7 @@ class EigenMatrixPrinter: def __next__(self): row, col = super(EigenMatrixPrinter._Iterator, self).__next__() - + item = self.dataPtr.dereference() self.dataPtr += 1 if self.cols == 1: # if it's a column vector @@ -131,10 +131,10 @@ class EigenMatrixPrinter: elif self.rows == 1: # if it's a row vector return '[%d]' % (col,), item return '[%d,%d]' % (row, col), item - + def children(self): return self._Iterator(self.rows, self.cols, self.data, self.rowMajor) - + def to_string(self): return "Eigen::%s<%s,%d,%d,%s> (data ptr: %s)" % ( self.variety, self.innerType, self.rows, self.cols, @@ -160,11 +160,11 @@ class EigenSparseMatrixPrinter: self.options = 0 if len(template_params) > 1: self.options = template_params[1] - + self.rowMajor = (int(self.options) & 0x1) - + self.innerType = self.type.template_argument(0) - + self.val = val self.data = self.val['m_data'] @@ -175,10 +175,10 @@ class EigenSparseMatrixPrinter: super(EigenSparseMatrixPrinter._Iterator, self).__init__(rows, cols, row_major) self.val = val - + def __next__(self): row, col = super(EigenSparseMatrixPrinter._Iterator, self).__next__() - + # repeat calculations from SparseMatrix.h: outer = row if self.rowMajor else col inner = col if self.rowMajor else row @@ -233,7 +233,7 @@ class EigenSparseMatrixPrinter: class EigenQuaternionPrinter: """Print an Eigen Quaternion""" - + def __init__(self, val): """Extract all the necessary information""" # The gdb extension does not support value template arguments - need to extract them by hand @@ -243,38 +243,38 @@ class EigenQuaternionPrinter: self.type = typeinfo.unqualified().strip_typedefs() self.innerType = self.type.template_argument(0) self.val = val - + # Quaternions have a struct as their storage, so we need to walk through this self.data = self.val['m_coeffs']['m_storage']['m_data']['array'] self.data = self.data.cast(self.innerType.pointer()) - + class _Iterator: def __init__(self, data_ptr): self.dataPtr = data_ptr self.currentElement = 0 self.elementNames = ['x', 'y', 'z', 'w'] - + def __iter__(self): return self - + def next(self): return self.__next__() # Python 2.x compatibility def __next__(self): element = self.currentElement - + if self.currentElement >= 4: # there are 4 elements in a quaternion raise StopIteration - + self.currentElement += 1 - + item = self.dataPtr.dereference() self.dataPtr += 1 return '[%s]' % (self.elementNames[element],), item - + def children(self): return self._Iterator(self.data) - + def to_string(self): return "Eigen::Quaternion<%s> (data ptr: %s)" % (self.innerType, self.data) @@ -314,22 +314,22 @@ def register_eigen_printers(obj): def lookup_function(val): """Look-up and return a pretty-printer that can print val.""" - + typeinfo = val.type - + if typeinfo.code == gdb.TYPE_CODE_REF: typeinfo = typeinfo.target() - + typeinfo = typeinfo.unqualified().strip_typedefs() - + typename = typeinfo.tag if typename is None: return None - + for function in pretty_printers_dict: if function.search(typename): return pretty_printers_dict[function](val) - + return None diff --git a/demos/opengl/CMakeLists.txt b/demos/opengl/CMakeLists.txt index 299aa441df95a47c84443068c95ad19ecee42516..c4d5adfc4afd5b64e48fdf1a0eafc5486e323f07 100644 --- a/demos/opengl/CMakeLists.txt +++ b/demos/opengl/CMakeLists.txt @@ -25,4 +25,4 @@ else() message(STATUS "OpenGL demo disabled because Qt4 and/or OpenGL have not been found.") -endif() \ No newline at end of file +endif() diff --git a/demos/opengl/README b/demos/opengl/README index 8fb16496c3ad7b6881b2ff94939916f3e158d526..92514450fdc991d2341b844b998322de533e314a 100644 --- a/demos/opengl/README +++ b/demos/opengl/README @@ -10,4 +10,3 @@ R : move the camera to initial position A : start/stop animation C : clear the animation G : add a key frame - diff --git a/doc/AsciiQuickReference.txt b/doc/AsciiQuickReference.txt index 0256c813a7aa5c03857c3854c329a356854c2d91..712e25e2c3fe8fe32b2ce858ee7a3f32d29deef1 100644 --- a/doc/AsciiQuickReference.txt +++ b/doc/AsciiQuickReference.txt @@ -11,7 +11,7 @@ Matrix3f P, Q, R; // 3x3 float matrix. Vector3f x, y, z; // 3x1 float matrix. RowVector3f a, b, c; // 1x3 float matrix. VectorXd v; // Dynamic column vector of doubles -double s; +double s; // Basic usage // Eigen // Matlab // comments @@ -25,7 +25,7 @@ A.resize(4, 4); // Runtime error if assertions are on. B.resize(4, 9); // Runtime error if assertions are on. A.resize(3, 3); // Ok; size didn't change. B.resize(3, 9); // Ok; only dynamic cols changed. - + A << 1, 2, 3, // Initialize A. The elements can also be 4, 5, 6, // matrices, which are stacked along cols 7, 8, 9; // and then the rows are stacked. diff --git a/doc/ClassHierarchy.dox b/doc/ClassHierarchy.dox index 468e60a7615bd71ad5cfd95dcadd9809fe47fd13..fa177c4faecc60afbb30fed3b38cad1857a5e22f 100644 --- a/doc/ClassHierarchy.dox +++ b/doc/ClassHierarchy.dox @@ -28,12 +28,12 @@ types. These are the classes that you need to know about if you want to write functions that accept or return Eigen objects. - - Matrix means plain dense matrix. If \c m is a \c %Matrix, then, for instance, \c m+m is no longer a + - Matrix means plain dense matrix. If \c m is a \c %Matrix, then, for instance, \c m+m is no longer a \c %Matrix, it is a "matrix expression". - MatrixBase means dense matrix expression. This means that a \c %MatrixBase is something that can be - added, matrix-multiplied, LU-decomposed, QR-decomposed... All matrix expression classes, including + added, matrix-multiplied, LU-decomposed, QR-decomposed... All matrix expression classes, including \c %Matrix itself, inherit \c %MatrixBase. - - Array means plain dense array. If \c x is an \c %Array, then, for instance, \c x+x is no longer an + - Array means plain dense array. If \c x is an \c %Array, then, for instance, \c x+x is no longer an \c %Array, it is an "array expression". - ArrayBase means dense array expression. This means that an \c %ArrayBase is something that can be added, array-multiplied, and on which you can perform all sorts of array operations... All array @@ -50,15 +50,15 @@ less interesting for users of the Eigen library. - PlainObjectBase means dense (matrix or array) plain object, i.e. something that stores its own dense array of coefficients. This is where, for instance, the \link PlainObjectBase::resize() resize() \endlink - methods go. \c %PlainObjectBase is inherited by \c %Matrix and by \c %Array. But above, we said that + methods go. \c %PlainObjectBase is inherited by \c %Matrix and by \c %Array. But above, we said that \c %Matrix inherits \c %MatrixBase and \c %Array inherits \c %ArrayBase. So does that mean multiple inheritance? No, because \c %PlainObjectBase \e itself inherits \c %MatrixBase or \c %ArrayBase depending - on whether we are in the matrix or array case. When we said above that \c %Matrix inherited + on whether we are in the matrix or array case. When we said above that \c %Matrix inherited \c %MatrixBase, we omitted to say it does so indirectly via \c %PlainObjectBase. Same for \c %Array. - DenseCoeffsBase means something that has dense coefficient accessors. It is a base class for \c %DenseBase. The reason for \c %DenseCoeffsBase to exist is that the set of available coefficient accessors is very different depending on whether a dense expression has direct memory access or not (the - \c DirectAccessBit flag). For example, if \c x is a plain matrix, then \c x has direct access, and + \c DirectAccessBit flag). For example, if \c x is a plain matrix, then \c x has direct access, and \c x.transpose() and \c x.block(...) also have direct access, because their coefficients can be read right off memory, but for example, \c x+x does not have direct memory access, because obtaining any of its coefficients requires a computation (an addition), it can't be just read off memory. diff --git a/doc/CustomizingEigen_InheritingMatrix.dox b/doc/CustomizingEigen_InheritingMatrix.dox index b21e554337bc79f1cd7998e76d31d2fbf50341a8..dad283b10e92662c878d28657c59571cc1c50125 100644 --- a/doc/CustomizingEigen_InheritingMatrix.dox +++ b/doc/CustomizingEigen_InheritingMatrix.dox @@ -7,7 +7,7 @@ EIGEN_MATRIX_PLUGIN is not what you really want (see previous section). If you just need to add few members to Matrix, this is the way to go. An example of when you actually need to inherit Matrix, is when you -have several layers of heritage such as +have several layers of heritage such as MyVerySpecificVector1, MyVerySpecificVector2 -> MyVector1 -> Matrix and MyVerySpecificVector3, MyVerySpecificVector4 -> MyVector2 -> Matrix. @@ -23,7 +23,7 @@ Output: \verbinclude CustomizingEigen_Inheritance.out This is the kind of error you can get if you don't provide those methods \verbatim error: no match for ‘operator=’ in ‘v = Eigen::operator*( -const Eigen::MatrixBase >::Scalar&, +const Eigen::MatrixBase >::Scalar&, const Eigen::MatrixBase >::StorageBaseType&) (((const Eigen::MatrixBase >::StorageBaseType&) ((const Eigen::MatrixBase >::StorageBaseType*)(& v))))’ diff --git a/doc/CustomizingEigen_NullaryExpr.dox b/doc/CustomizingEigen_NullaryExpr.dox index 37c8dcd896e7b513d038010106e66448c007404c..b1518c82ad85e722eb8b81b455d8a7d93cadd649 100644 --- a/doc/CustomizingEigen_NullaryExpr.dox +++ b/doc/CustomizingEigen_NullaryExpr.dox @@ -83,4 +83,3 @@ and the output is: */ } - diff --git a/doc/FunctionsTakingEigenTypes.dox b/doc/FunctionsTakingEigenTypes.dox index 3e745462cd42747c6f1a47898d7d32b52f1c9e56..99b214707ad212214bc181e4fe18646f29a342e2 100644 --- a/doc/FunctionsTakingEigenTypes.dox +++ b/doc/FunctionsTakingEigenTypes.dox @@ -149,7 +149,7 @@ When trying to execute the following code MatrixXf C = MatrixXf::Zero(3,6); cov(x,y, C.block(0,0,3,3)); \endcode -the compiler will fail, because it is not possible to convert the expression returned by \c MatrixXf::block() into a non-const \c MatrixXf&. This is the case because the compiler wants to protect you from writing your result to a temporary object. In this special case this protection is not intended -- we want to write to a temporary object. So how can we overcome this problem? +the compiler will fail, because it is not possible to convert the expression returned by \c MatrixXf::block() into a non-const \c MatrixXf&. This is the case because the compiler wants to protect you from writing your result to a temporary object. In this special case this protection is not intended -- we want to write to a temporary object. So how can we overcome this problem? The solution which is preferred at the moment is based on a little \em hack. One needs to pass a const reference to the matrix and internally the constness needs to be cast away. The correct implementation for C98 compliant compilers would be \code @@ -197,7 +197,7 @@ void cov(const MatrixBase& x, const MatrixBase& y, MatrixBase< const RowVectorType y_mean = y.colwise().sum() / num_observations; MatrixBase& C = const_cast< MatrixBase& >(C_); - + C.derived().resize(x.cols(),x.cols()); // resize the derived object C = (x.rowwise() - x_mean).transpose() * (y.rowwise() - y_mean) / num_observations; } diff --git a/doc/HiPerformance.dox b/doc/HiPerformance.dox index 9cee3351c21cae07130bf3f75b9262a6f6c7c528..899973728ec205ab1ea4cd0773ccedb71c2232e0 100644 --- a/doc/HiPerformance.dox +++ b/doc/HiPerformance.dox @@ -57,7 +57,7 @@ temp = m2 * m3; m1 += temp; \endcode \code m1.noalias() += m2 * m3; \endcode -Use .noalias() to tell Eigen the result and right-hand-sides do not alias. +Use .noalias() to tell Eigen the result and right-hand-sides do not alias. Otherwise the product m2 * m3 is evaluated into a temporary. diff --git a/doc/InplaceDecomposition.dox b/doc/InplaceDecomposition.dox index cb1c6d413831809cc27306580db6aeb925e61f54..f23d9adbcec740bc01ade5f5dbe4171936ca7982 100644 --- a/doc/InplaceDecomposition.dox +++ b/doc/InplaceDecomposition.dox @@ -112,4 +112,4 @@ Here is the list of matrix decompositions supporting this inplace mechanism: */ -} \ No newline at end of file +} diff --git a/doc/LeastSquares.dox b/doc/LeastSquares.dox index ddbf38dec9b27f7fd5bac0d74efc5af9dfe77ca8..3ccdb71f4651115e63434bcd0e4f5f7c26f71739 100644 --- a/doc/LeastSquares.dox +++ b/doc/LeastSquares.dox @@ -31,7 +31,7 @@ computing least squares solutions: This is example from the page \link TutorialLinearAlgebra Linear algebra and decompositions \endlink. If you just need to solve the least squares problem, but are not interested in the SVD per se, a -faster alternative method is CompleteOrthogonalDecomposition. +faster alternative method is CompleteOrthogonalDecomposition. \section LeastSquaresQR Using the QR decomposition @@ -72,4 +72,4 @@ methods mentioned above. */ -} \ No newline at end of file +} diff --git a/doc/MatrixfreeSolverExample.dox b/doc/MatrixfreeSolverExample.dox index 3efa292b56a6d04fb542441bd14e465cf5a50060..ab641ae6771d0dfb538df6aa0f335be790edfbe3 100644 --- a/doc/MatrixfreeSolverExample.dox +++ b/doc/MatrixfreeSolverExample.dox @@ -17,4 +17,4 @@ Output: \verbinclude matrixfree_cg.out */ -} \ No newline at end of file +} diff --git a/doc/NewExpressionType.dox b/doc/NewExpressionType.dox index c2f24331288e46f2f38619802a4fde60c99e8fb8..3cbe33d7d8d473352a826beccc6067f193b21e8c 100644 --- a/doc/NewExpressionType.dox +++ b/doc/NewExpressionType.dox @@ -25,8 +25,8 @@ vectorization etc., and refer to that page here. A circulant matrix is a matrix where each column is the same as the column to the left, except that it is cyclically shifted downwards. For example, here is a 4-by-4 circulant matrix: -\f[ \begin{bmatrix} - 1 & 8 & 4 & 2 \\ +\f[ \begin{bmatrix} + 1 & 8 & 4 & 2 \\ 2 & 1 & 8 & 4 \\ 4 & 2 & 1 & 8 \\ 8 & 4 & 2 & 1 @@ -56,7 +56,7 @@ to the \c makeCirculant function. \section TopicTraits The traits class -For every expression class \c X, there should be a traits class +For every expression class \c X, there should be a traits class \c Traits in the \c Eigen::internal namespace containing information about \c X known as compile time. @@ -113,7 +113,7 @@ which the circulant matrix is constructed. In the constructor, we save the evaluator for the column vector which defined the circulant matrix. We also save the size of that vector; remember that we can query an expression object to find the size but -not the evaluator. +not the evaluator. \include make_circulant.cpp.evaluator @@ -140,4 +140,3 @@ showing that the program works as expected: */ } - diff --git a/doc/Pitfalls.dox b/doc/Pitfalls.dox index 85282bd6f544e02bf7c4330837adde410e2771ff..24164b2572d34e24cb386aa686cdc99c3f08d27e 100644 --- a/doc/Pitfalls.dox +++ b/doc/Pitfalls.dox @@ -129,7 +129,7 @@ There are at least two ways around this: The current behaviour of using \c Matrix with boolean coefficients is inconsistent and likely to change in future versions of Eigen, so please use it carefully! -A simple example for such an inconsistency is +A simple example for such an inconsistency is \code template diff --git a/doc/PreprocessorDirectives.dox b/doc/PreprocessorDirectives.dox index 27ae531f69d5f30925746b3ebf85e9cbc9028efb..b7b7676667427abf314813729c3d3be27d7ee115 100644 --- a/doc/PreprocessorDirectives.dox +++ b/doc/PreprocessorDirectives.dox @@ -44,7 +44,7 @@ are doing. preferable. Not defined by default. \warning See the documentation of \c EIGEN_INITIALIZE_MATRICES_BY_ZERO for a discussion on a limitations of these macros when applied to \c 1x1, \c 1x2, and \c 2x1 fixed-size matrices. - - \b EIGEN_NO_AUTOMATIC_RESIZING - if defined, the matrices (or arrays) on both sides of an assignment + - \b EIGEN_NO_AUTOMATIC_RESIZING - if defined, the matrices (or arrays) on both sides of an assignment a = b have to be of the same size; otherwise, %Eigen automatically resizes \c a so that it is of the correct size. Not defined by default. @@ -72,8 +72,8 @@ The %Eigen library contains many assertions to guard against programming errors, run time. However, these assertions do cost time and can thus be turned off. - \b EIGEN_NO_DEBUG - disables %Eigen's assertions if defined. Not defined by default, unless the - \c NDEBUG macro is defined (this is a standard C++ macro which disables all asserts). - - \b EIGEN_NO_STATIC_ASSERT - if defined, compile-time static assertions are replaced by runtime assertions; + \c NDEBUG macro is defined (this is a standard C++ macro which disables all asserts). + - \b EIGEN_NO_STATIC_ASSERT - if defined, compile-time static assertions are replaced by runtime assertions; this saves compilation time. Not defined by default. - \b eigen_assert - macro with one argument that is used inside %Eigen for assertions. By default, it is basically defined to be \c assert, which aborts the program if the assertion is violated. Redefine this @@ -90,7 +90,7 @@ run time. However, these assertions do cost time and can thus be turned off. Let us emphasize that \c EIGEN_MAX_*_ALIGN_BYTES define only a desirable upper bound. In practice data is aligned to largest power-of-two common divisor of \c EIGEN_MAX_STATIC_ALIGN_BYTES and the size of the data, such that memory is not wasted. - \b \c EIGEN_DONT_PARALLELIZE - if defined, this disables multi-threading. This is only relevant if you enabled OpenMP. See \ref TopicMultiThreading for details. - - \b \c EIGEN_DONT_VECTORIZE - disables explicit vectorization when defined. Not defined by default, unless + - \b \c EIGEN_DONT_VECTORIZE - disables explicit vectorization when defined. Not defined by default, unless alignment is disabled by %Eigen's platform test or the user defining \c EIGEN_DONT_ALIGN. - \b \c EIGEN_UNALIGNED_VECTORIZE - disables/enables vectorization with unaligned stores. Default is 1 (enabled). If set to 0 (disabled), then expression for which the destination cannot be aligned are not vectorized (e.g., unaligned diff --git a/doc/QuickStartGuide.dox b/doc/QuickStartGuide.dox index 6042acaf929ee7dda4cfb32f435e8c91d285e51d..762be0cb99c927157b7f729962f90a3954f3c9f4 100644 --- a/doc/QuickStartGuide.dox +++ b/doc/QuickStartGuide.dox @@ -97,4 +97,3 @@ However if you think you don't need it, you can directly use the classes documen */ } - diff --git a/doc/SparseLinearSystems.dox b/doc/SparseLinearSystems.dox index a82ddfed9b56253aa49d1877264b8e84500139c2..6e0c14d952baa56f7de9eaeef042b7ab1a73831b 100644 --- a/doc/SparseLinearSystems.dox +++ b/doc/SparseLinearSystems.dox @@ -1,6 +1,6 @@ namespace Eigen { /** \eigenManualPage TopicSparseSystems Solving Sparse Linear Systems -In Eigen, there are several methods available to solve linear systems when the coefficient matrix is sparse. Because of the special representation of this class of matrices, special care should be taken in order to get a good performance. See \ref TutorialSparse for a detailed introduction about sparse matrices in Eigen. This page lists the sparse solvers available in Eigen. The main steps that are common to all these linear solvers are introduced as well. Depending on the properties of the matrix, the desired accuracy, the end-user is able to tune those steps in order to improve the performance of its code. Note that it is not required to know deeply what's hiding behind these steps: the last section presents a benchmark routine that can be easily used to get an insight on the performance of all the available solvers. +In Eigen, there are several methods available to solve linear systems when the coefficient matrix is sparse. Because of the special representation of this class of matrices, special care should be taken in order to get a good performance. See \ref TutorialSparse for a detailed introduction about sparse matrices in Eigen. This page lists the sparse solvers available in Eigen. The main steps that are common to all these linear solvers are introduced as well. Depending on the properties of the matrix, the desired accuracy, the end-user is able to tune those steps in order to improve the performance of its code. Note that it is not required to know deeply what's hiding behind these steps: the last section presents a benchmark routine that can be easily used to get an insight on the performance of all the available solvers. \eigenAutoToc @@ -69,7 +69,7 @@ They are summarized in the following tables: SuperLU\link SuperLUSupport_Module SuperLUSupport \endlinkDirect LU factorizationSquareFill-in reducing, Leverage fast dense algebra Requires the SuperLU library, (BSD-like) -SPQR\link SPQRSupport_Module SPQRSupport \endlink QR factorization +SPQR\link SPQRSupport_Module SPQRSupport \endlink QR factorization Any, rectangularfill-in reducing, multithreaded, fast dense algebra requires the SuiteSparse package, \b GPL recommended for linear least-squares problems, has a rank-revealing feature PardisoLLT \n PardisoLDLT \n PardisoLU\link PardisoSupport_Module PardisoSupport \endlinkDirect LLt, LDLt, LU factorizationsSPD \n SPD \n SquareFill-in reducing, Leverage fast dense algebra, Multithreading @@ -141,39 +141,39 @@ More details are available in the documentations of the respective classes. Finally, most of the iterative solvers, can also be used in a \b matrix-free context, see the following \link MatrixfreeSolverExample example \endlink. \section TheSparseCompute The Compute Step -In the `compute()` function, the matrix is generally factorized: LLT for self-adjoint matrices, LDLT for general hermitian matrices, LU for non hermitian matrices and QR for rectangular matrices. These are the results of using direct solvers. For this class of solvers precisely, the compute step is further subdivided into `analyzePattern()` and `factorize()`. +In the `compute()` function, the matrix is generally factorized: LLT for self-adjoint matrices, LDLT for general hermitian matrices, LU for non hermitian matrices and QR for rectangular matrices. These are the results of using direct solvers. For this class of solvers precisely, the compute step is further subdivided into `analyzePattern()` and `factorize()`. The goal of `analyzePattern()` is to reorder the nonzero elements of the matrix, such that the factorization step creates less fill-in. This step exploits only the structure of the matrix. Hence, the results of this step can be used for other linear systems where the matrix has the same structure. Note however that sometimes, some external solvers (like SuperLU) require that the values of the matrix are set in this step, for instance to equilibrate the rows and columns of the matrix. In this situation, the results of this step should not be used with other matrices. Eigen provides a limited set of methods to reorder the matrix in this step, either built-in (COLAMD, AMD) or external (METIS). These methods are set in template parameter list of the solver : \code DirectSolverClassName, OrderingMethod > solver; -\endcode +\endcode -See the \link OrderingMethods_Module OrderingMethods module \endlink for the list of available methods and the associated options. +See the \link OrderingMethods_Module OrderingMethods module \endlink for the list of available methods and the associated options. -In `factorize()`, the factors of the coefficient matrix are computed. This step should be called each time the values of the matrix change. However, the structural pattern of the matrix should not change between multiple calls. +In `factorize()`, the factors of the coefficient matrix are computed. This step should be called each time the values of the matrix change. However, the structural pattern of the matrix should not change between multiple calls. -For iterative solvers, the compute step is used to eventually setup a preconditioner. For instance, with the ILUT preconditioner, the incomplete factors L and U are computed in this step. Remember that, basically, the goal of the preconditioner is to speedup the convergence of an iterative method by solving a modified linear system where the coefficient matrix has more clustered eigenvalues. For real problems, an iterative solver should always be used with a preconditioner. In Eigen, a preconditioner is selected by simply adding it as a template parameter to the iterative solver object. +For iterative solvers, the compute step is used to eventually setup a preconditioner. For instance, with the ILUT preconditioner, the incomplete factors L and U are computed in this step. Remember that, basically, the goal of the preconditioner is to speedup the convergence of an iterative method by solving a modified linear system where the coefficient matrix has more clustered eigenvalues. For real problems, an iterative solver should always be used with a preconditioner. In Eigen, a preconditioner is selected by simply adding it as a template parameter to the iterative solver object. \code -IterativeSolverClassName, PreconditionerName > solver; +IterativeSolverClassName, PreconditionerName > solver; \endcode -The member function `preconditioner()` returns a read-write reference to the preconditioner +The member function `preconditioner()` returns a read-write reference to the preconditioner to directly interact with it. See the \link IterativeLinearSolvers_Module Iterative solvers module \endlink and the documentation of each class for the list of available methods. \section TheSparseSolve The Solve step The `solve()` function computes the solution of the linear systems with one or many right hand sides. \code X = solver.solve(B); -\endcode -Here, B can be a vector or a matrix where the columns form the different right hand sides. `The solve()` function can be called several times as well, for instance when all the right hand sides are not available at once. +\endcode +Here, B can be a vector or a matrix where the columns form the different right hand sides. `The solve()` function can be called several times as well, for instance when all the right hand sides are not available at once. \code x1 = solver.solve(b1); // Get the second right hand side b2 -x2 = solver.solve(b2); +x2 = solver.solve(b2); // ... \endcode -For direct methods, the solution are computed at the machine precision. Sometimes, the solution need not be too accurate. In this case, the iterative methods are more suitable and the desired accuracy can be set before the solve step using \b setTolerance(). For all the available functions, please, refer to the documentation of the \link IterativeLinearSolvers_Module Iterative solvers module \endlink. +For direct methods, the solution are computed at the machine precision. Sometimes, the solution need not be too accurate. In this case, the iterative methods are more suitable and the desired accuracy can be set before the solve step using \b setTolerance(). For all the available functions, please, refer to the documentation of the \link IterativeLinearSolvers_Module Iterative solvers module \endlink. \section BenchmarkRoutine Most of the time, all you need is to know how much time it will take to solve your system, and hopefully, what is the most suitable solver. In Eigen, we provide a benchmark routine that can be used for this purpose. It is very easy to use. In the build directory, navigate to `bench/spbench` and compile the routine by typing `make spbenchsolver`. Run it with `--help` option to get the list of all available options. Basically, the matrices to test should be in MatrixMarket Coordinate format, and the routine returns the statistics from all available solvers in Eigen. @@ -187,7 +187,7 @@ Eigen::saveMarket(A, "filename_SPD.mtx", Eigen::Symmetric); // if A is symmetric Eigen::saveMarketVector(B, "filename_b.mtx"); \endcode -The following table gives an example of XML statistics from several Eigen built-in and external solvers. +The following table gives an example of XML statistics from several Eigen built-in and external solvers.
Matrix N NNZ UMFPACK SUPERLU PASTIX LU BiCGSTAB BiCGSTAB+ILUT GMRES+ILUT LDLT CHOLMOD LDLT PASTIX LDLT LLT CHOLMOD SP LLT CHOLMOD LLT PASTIX LLT CG
vector_graphics 12855 72069 Compute Time 0.02545490.02156770.07018270.0001533880.01401070.01537090.01016010.009305020.0649689 @@ -197,15 +197,15 @@ The following table gives an example of XML statistics from several Eigen built-
poisson_SPD 19788 308232 Compute Time 0.4250261.823780.6173670.0004789211.340011.334710.7964190.8575730.4730070.8148260.1847190.8615550.4705590.000458188
Solve Time 0.02800530.01944020.02687470.2494370.05484440.09269910.008502040.00531710.02589320.008746030.005781550.005303610.02489420.239093
Total Time 0.4530311.843220.6442410.2499161.394861.427410.8049210.8628910.49890.8235720.1905010.8668590.4954530.239551 -
Error(Iter) 4.67146e-16 1.068e-15 1.3397e-15 6.29233e-11 (201) 3.68527e-11 (6) 3.3168e-15 (16) 1.86376e-15 1.31518e-16 1.42593e-15 3.45361e-15 3.14575e-16 2.21723e-15 7.21058e-16 9.06435e-12 (261) +
Error(Iter) 4.67146e-16 1.068e-15 1.3397e-15 6.29233e-11 (201) 3.68527e-11 (6) 3.3168e-15 (16) 1.86376e-15 1.31518e-16 1.42593e-15 3.45361e-15 3.14575e-16 2.21723e-15 7.21058e-16 9.06435e-12 (261)
sherman2 1080 23094 Compute Time 0.006317540.0150520.0247514 -0.02144250.0217988
Solve Time 0.0004784240.0003379980.0010291 -0.002431520.00246152
Total Time 0.006795970.015390.0257805 -0.0238740.0242603 -
Error(Iter) 1.83099e-15 8.19351e-15 2.625e-14 1.3678e+69 (1080) 4.1911e-12 (7) 5.0299e-13 (12) +
Error(Iter) 1.83099e-15 8.19351e-15 2.625e-14 1.3678e+69 (1080) 4.1911e-12 (7) 5.0299e-13 (12)
bcsstk01_SPD 48 400 Compute Time 0.0001690790.000107890.0005725381.425e-069.1612e-058.3985e-055.6489e-057.0913e-050.0004682515.7389e-058.0212e-055.8394e-050.0004630171.333e-06
Solve Time 1.2288e-051.1124e-050.0002863878.5896e-051.6381e-051.6984e-053.095e-064.115e-060.0003254383.504e-067.369e-063.454e-060.0002940956.0516e-05
Total Time 0.0001813670.0001190140.0008589258.7321e-050.0001079930.0001009695.9584e-057.5028e-050.0007936896.0893e-058.7581e-056.1848e-050.0007571126.1849e-05 -
Error(Iter) 1.03474e-16 2.23046e-16 2.01273e-16 4.87455e-07 (48) 1.03553e-16 (2) 3.55965e-16 (2) 2.48189e-16 1.88808e-16 1.97976e-16 2.37248e-16 1.82701e-16 2.71474e-16 2.11322e-16 3.547e-09 (48) +
Error(Iter) 1.03474e-16 2.23046e-16 2.01273e-16 4.87455e-07 (48) 1.03553e-16 (2) 3.55965e-16 (2) 2.48189e-16 1.88808e-16 1.97976e-16 2.37248e-16 1.82701e-16 2.71474e-16 2.11322e-16 3.547e-09 (48)
sherman1 1000 3750 Compute Time 0.002288050.002092310.005282689.846e-060.001635220.001621550.0007892590.0008044950.00438269
Solve Time 0.0002137889.7983e-050.0009388310.006298350.0003617640.000787944.3989e-052.5331e-050.000917166
Total Time 0.002501840.002190290.006221510.00630820.001996980.002409490.0008332480.0008298260.00529986 @@ -213,7 +213,7 @@ The following table gives an example of XML statistics from several Eigen built-
young1c 841 4089 Compute Time 0.002358430.002172280.005680751.2735e-050.002648660.00258236
Solve Time 0.0003295990.0001686340.000801180.05347380.001871930.00450211
Total Time 0.002688030.002340910.006481930.05348650.004520590.00708447 -
Error(Iter) 1.27029e-16 2.81321e-16 5.0492e-15 8.0507e-11 (706) 3.00447e-12 (8) 1.46532e-12 (16) +
Error(Iter) 1.27029e-16 2.81321e-16 5.0492e-15 8.0507e-11 (706) 3.00447e-12 (8) 1.46532e-12 (16)
mhd1280b 1280 22778 Compute Time 0.002348980.002070790.005709182.5976e-050.003025630.002980360.001445250.0009199220.00426444
Solve Time 0.001033920.0002119110.001050.01104320.0006282870.003920890.0001383036.2446e-050.00097564
Total Time 0.00338290.00228270.006759180.01106920.003653920.006901240.001583550.0009823680.00524008 @@ -221,7 +221,7 @@ The following table gives an example of XML statistics from several Eigen built-
crashbasis 160000 1750416 Compute Time 3.20195.789215.75730.003835153.10063.09921
Solve Time 0.2619150.1062250.4021411.490890.248880.443673
Total Time 3.463815.8954216.15941.494733.349483.54288 -
Error(Iter) 1.76348e-16 4.58395e-16 1.67982e-14 8.64144e-11 (61) 8.5996e-12 (2) 6.04042e-14 (5) +
Error(Iter) 1.76348e-16 4.58395e-16 1.67982e-14 8.64144e-11 (61) 8.5996e-12 (2) 6.04042e-14 (5)
*/ diff --git a/doc/SparseQuickReference.dox b/doc/SparseQuickReference.dox index b8eac8d0e006b6c482a297fc6e56a2d6d76ec5fa..39f613e27a60019c340629bcf1012d87b4c6c02f 100644 --- a/doc/SparseQuickReference.dox +++ b/doc/SparseQuickReference.dox @@ -4,8 +4,8 @@ namespace Eigen {
-In this page, we give a quick summary of the main operations available for sparse matrices in the class SparseMatrix. First, it is recommended to read the introductory tutorial at \ref TutorialSparse. The important point to have in mind when working on sparse matrices is how they are stored : -i.e either row major or column major. The default is column major. Most arithmetic operations on sparse matrices will assert that they have the same storage order. +In this page, we give a quick summary of the main operations available for sparse matrices in the class SparseMatrix. First, it is recommended to read the introductory tutorial at \ref TutorialSparse. The important point to have in mind when working on sparse matrices is how they are stored : +i.e either row major or column major. The default is column major. Most arithmetic operations on sparse matrices will assert that they have the same storage order. \section SparseMatrixInit Sparse Matrix Initialization @@ -13,29 +13,29 @@ i.e either row major or column major. The default is column major. Most arithmet - - + - @@ -43,9 +43,9 @@ i.e either row major or column major. The default is column major. Most arithmet - + - + - - - - - - - - - -
Constructor \code - SparseMatrix sm1(1000,1000); + SparseMatrix sm1(1000,1000); SparseMatrix,RowMajor> sm2; \endcode Default is ColMajor
Resize/Reserve + \code sm1.resize(m,n); // Change sm1 to a m x n matrix. - sm1.reserve(nnz); // Allocate room for nnz nonzeros elements. - \endcode + sm1.reserve(nnz); // Allocate room for nnz nonzeros elements. + \endcode Note that when calling reserve(), it is not required that nnz is the exact number of nonzero elements in the final matrix. However, an exact estimation will avoid multiple reallocations during the insertion phase.
Assignment -\code + +\code SparseMatrix sm1; // Initialize sm2 with sm1. - SparseMatrix sm2(sm1), sm3; + SparseMatrix sm2(sm1), sm3; // Assignment and evaluations modify the storage order. - sm3 = sm1; + sm3 = sm1; \endcode The copy constructor can be used to convert from a storage order to another
Element-wise Insertion -\code -// Insert a new element; - sm1.insert(i, j) = v_ij; +\code +// Insert a new element; + sm1.insert(i, j) = v_ij; // Update the value v_ij sm1.coeffRef(i,j) = v_ij; @@ -55,7 +55,7 @@ i.e either row major or column major. The default is column major. Most arithmet insert() assumes that the element does not already exist; otherwise, use coeffRef()
Batch insertion \code @@ -67,7 +67,7 @@ i.e either row major or column major. The default is column major. Most arithmet A complete example is available at \link TutorialSparseFilling Triplet Insertion \endlink.
Constant or Random Insertion \code @@ -80,13 +80,13 @@ sm1.setZero(); \section SparseBasicInfos Matrix properties -Beyond the basic functions rows() and cols(), there are some useful functions that are available to easily get some information from the matrix. +Beyond the basic functions rows() and cols(), there are some useful functions that are available to easily get some information from the matrix. - + - + - + @@ -146,18 +146,18 @@ It is easy to perform arithmetic operations on sparse matrices provided that the - + - - @@ -165,7 +165,7 @@ sm2 = perm * sm1; // Permute the columns - - - - - diff --git a/doc/StlContainers.dox b/doc/StlContainers.dox index 0342573d0b88c39f92071a608b2f7a7d14b8b39a..b2faa68d1db71b0ee72d93ccb5bc2b799a16ab0c 100644 --- a/doc/StlContainers.dox +++ b/doc/StlContainers.dox @@ -27,7 +27,7 @@ std::map \endcode you need to use \code -std::map, +std::map, Eigen::aligned_allocator > > \endcode Note that the third parameter `std::less` is just the default value, but we have to include it because we want to specify the fourth parameter, which is the allocator type. @@ -53,7 +53,7 @@ In order to avoid that, the only solution we saw was to specialize `std::vector` \subsection vector_spec An alternative - specializing std::vector for Eigen types -As an alternative to the recommended approach described above, you have the option to specialize std::vector for Eigen types requiring alignment. +As an alternative to the recommended approach described above, you have the option to specialize std::vector for Eigen types requiring alignment. The advantage is that you won't need to declare std::vector all over with Eigen::aligned_allocator. One drawback on the other hand side is that the specialization needs to be defined before all code pieces in which e.g. `std::vector` is used. Otherwise, without knowing the specialization the compiler will compile that particular instance with the default `std::allocator` and you program is most likely to crash. diff --git a/doc/StorageOrders.dox b/doc/StorageOrders.dox index 61645313ee8586bd4ada5b8bffc2eb69ac8d4ce5..53a918e9fd404175c7953bc892d06f1b41d39b25 100644 --- a/doc/StorageOrders.dox +++ b/doc/StorageOrders.dox @@ -53,7 +53,7 @@ The storage order of a matrix or a two-dimensional array can be set by specifyin parameter for Matrix or Array. As \ref TutorialMatrixClass explains, the %Matrix class template has six template parameters, of which three are compulsory (\c Scalar, \c RowsAtCompileTime and \c ColsAtCompileTime) and three are optional (\c Options, \c MaxRowsAtCompileTime and \c MaxColsAtCompileTime). If the \c Options -parameter is set to \c RowMajor, then the matrix or array is stored in row-major order; if it is set to +parameter is set to \c RowMajor, then the matrix or array is stored in row-major order; if it is set to \c ColMajor, then it is stored in column-major order. This mechanism is used in the above Eigen program to specify the storage order. diff --git a/doc/TemplateKeyword.dox b/doc/TemplateKeyword.dox index fbf2c708165b76830bc06c0974f60943fdb6ae10..837d7c90795c48aa03a2df71ab1f485a19a7bfc8 100644 --- a/doc/TemplateKeyword.dox +++ b/doc/TemplateKeyword.dox @@ -50,7 +50,7 @@ matrices with double-precision numbers. Second, if you use an expression such as mat.topLeftCorner(3,3) as the parameter \c src, then this is copied into a temporary variable of type MatrixXf; this copy can be avoided. -As explained in \ref TopicFunctionTakingEigenTypes, both issues can be resolved by making +As explained in \ref TopicFunctionTakingEigenTypes, both issues can be resolved by making \c copyUpperTriangularPart() accept any object of type MatrixBase. This leads to the following code:
\code sm1.rows(); // Number of rows - sm1.cols(); // Number of columns - sm1.nonZeros(); // Number of non zero values + sm1.cols(); // Number of columns + sm1.nonZeros(); // Number of non zero values sm1.outerSize(); // Number of columns (resp. rows) for a column major (resp. row major ) sm1.innerSize(); // Number of rows (resp. columns) for a row major (resp. column major) sm1.norm(); // Euclidean norm of the matrix @@ -105,21 +105,21 @@ It is easy to perform arithmetic operations on sparse matrices provided that the
Operations Code Notes
add subtract add subtract \code - sm3 = sm1 + sm2; + sm3 = sm1 + sm2; sm3 = sm1 - sm2; - sm2 += sm1; + sm2 += sm1; sm2 -= sm1; \endcode + sm1 and sm2 should have the same storage order -
scalar product\code - sm3 = sm1 * s1; sm3 *= s1; + sm3 = sm1 * s1; sm3 *= s1; sm3 = s1 * sm1 + s2 * sm2; sm3 /= s1;\endcode @@ -135,7 +135,7 @@ It is easy to perform arithmetic operations on sparse matrices provided that the \endcode
transposition, adjoint Note that the transposition change the storage order. There is no support for transposeInPlace().
Permutation -\code + +\code perm.indices(); // Reference to the vector of indices sm1.twistedBy(perm); // Permute rows and columns sm2 = sm1 * perm; // Permute the rows sm2 = perm * sm1; // Permute the columns -\endcode +\endcode +
Component-wise ops \code + \code sm1.cwiseProduct(sm2); sm1.cwiseQuotient(sm2); sm1.cwiseMin(sm2); @@ -185,11 +185,11 @@ sm2 = perm * sm1; // Permute the columns
Code Notes
Sub-matrices
-\code - sm1.block(startRow, startCol, rows, cols); - sm1.block(startRow, startCol); - sm1.topLeftCorner(rows, cols); + +\code + sm1.block(startRow, startCol, rows, cols); + sm1.block(startRow, startCol); + sm1.topLeftCorner(rows, cols); sm1.topRightCorner(rows, cols); sm1.bottomLeftCorner( rows, cols); sm1.bottomRightCorner( rows, cols); @@ -201,8 +201,8 @@ See \ref TutorialSparse_SubMatrices and below for read-write sub-matrices.
Range
-\code + +\code sm1.innerVector(outer); // RW sm1.innerVectors(start, size); // RW sm1.leftCols(size); // RW @@ -219,24 +219,24 @@ As stated earlier, for a read-write sub-matrix (RW), the evaluation can be done
Triangular and selfadjoint views
+ \code sm2 = sm1.triangularview(); sm2 = sm1.selfadjointview(); \endcode Several combination between triangular views and blocks views are possible -\code +\code \endcode
Triangular solve
-\code + +\code dv2 = sm1.triangularView().solve(dv1); dv2 = sm1.topLeftCorner(size, size) .triangularView().solve(dv1); -\endcode +\endcode For general sparse solve, Use any suitable module described at \ref TopicSparseSystems
@@ -86,7 +86,7 @@ The precise rules are rather complicated, but ignoring some subtleties we can su example, \c dst is a dependent name because it is of type MatrixBase<Derived1> which depends on the template parameter \c Derived1. - If the code contains either one of the constructs xxx.yyy or xxx->yyy and \c xxx is a - dependent name and \c yyy refers to a member template, then the \c template keyword must be used before + dependent name and \c yyy refers to a member template, then the \c template keyword must be used before \c yyy, leading to xxx.template yyy or xxx->template yyy. - If the code contains the construct xxx::yyy and \c xxx is a dependent name and \c yyy refers to a member typedef, then the \c typename keyword must be used before the whole construct, leading to diff --git a/doc/TopicAliasing.dox b/doc/TopicAliasing.dox index a8f1644284e82af3cdc653548a4e74259bbc81a4..00a712996939334aa07f1d74f76df566732ed7ad 100644 --- a/doc/TopicAliasing.dox +++ b/doc/TopicAliasing.dox @@ -32,7 +32,7 @@ This assignment exhibits aliasing: the coefficient \c mat(1,1) appears both in t mat.bottomRightCorner(2,2) on the left-hand side of the assignment and the block mat.topLeftCorner(2,2) on the right-hand side. After the assignment, the (2,2) entry in the bottom right corner should have the value of \c mat(1,1) before the assignment, which is 5. However, the output shows -that \c mat(2,2) is actually 1. The problem is that %Eigen uses lazy evaluation (see +that \c mat(2,2) is actually 1. The problem is that %Eigen uses lazy evaluation (see \ref TopicEigenExpressionTemplates) for mat.topLeftCorner(2,2). The result is similar to \code mat(1,1) = mat(0,0); @@ -64,9 +64,9 @@ Again, the output shows the aliasing issue. However, by default %Eigen uses a ru and exits with a message like \verbatim -void Eigen::DenseBase::checkTransposeAliasing(const OtherDerived&) const -[with OtherDerived = Eigen::Transpose >, Derived = Eigen::Matrix]: -Assertion `(!internal::check_transpose_aliasing_selector::IsTransposed,OtherDerived>::run(internal::extract_data(derived()), other)) +void Eigen::DenseBase::checkTransposeAliasing(const OtherDerived&) const +[with OtherDerived = Eigen::Transpose >, Derived = Eigen::Matrix]: +Assertion `(!internal::check_transpose_aliasing_selector::IsTransposed,OtherDerived>::run(internal::extract_data(derived()), other)) && "aliasing detected during transposition, use transposeInPlace() or evaluate the rhs into a temporary using .eval()"' failed. \endverbatim @@ -94,10 +94,10 @@ For example, here is the corrected version of the first example above: Now, \c mat(2,2) equals 5 after the assignment, as it should be. -The same solution also works for the second example, with the transpose: simply replace the line +The same solution also works for the second example, with the transpose: simply replace the line a = a.transpose(); with a = a.transpose().eval();. However, in this common case there is a -better solution. %Eigen provides the special-purpose function -\link DenseBase::transposeInPlace() transposeInPlace() \endlink which replaces a matrix by its transpose. +better solution. %Eigen provides the special-purpose function +\link DenseBase::transposeInPlace() transposeInPlace() \endlink which replaces a matrix by its transpose. This is shown below:
@@ -111,7 +111,7 @@ This is shown below: If an xxxInPlace() function is available, then it is best to use it, because it indicates more clearly what you are doing. This may also allow %Eigen to optimize more aggressively. These are some of the xxxInPlace() -functions provided: +functions provided:
@@ -132,7 +132,7 @@ you can use \link PlainObjectBase::conservativeResize() conservativeResize() \en As explained above, it may be dangerous if the same matrix or array occurs on both the left-hand side and the right-hand side of an assignment operator, and it is then often necessary to evaluate the right-hand side explicitly. However, applying component-wise operations (such as matrix addition, scalar multiplication and -array multiplication) is safe. +array multiplication) is safe. The following example has only component-wise operations. Thus, there is no need for \link DenseBase::eval() eval() \endlink even though the same matrix appears on both sides of the assignments. diff --git a/doc/TopicMultithreading.dox b/doc/TopicMultithreading.dox index 7a8ff301f02f961e28d8168389ea0982d59c23b2..7b1e44b8f0e530117221fe041abcb756c50048a4 100644 --- a/doc/TopicMultithreading.dox +++ b/doc/TopicMultithreading.dox @@ -49,7 +49,7 @@ In the case your own application is multithreaded, and multiple threads make cal int main(int argc, char** argv) { Eigen::initParallel(); - + ... } \endcode diff --git a/doc/TutorialAdvancedInitialization.dox b/doc/TutorialAdvancedInitialization.dox index 50374d0d0b4b3bdb9664f9ce8b0e95771b897ead..d27730db67b57d9b7cc748327290715862be4f55 100644 --- a/doc/TutorialAdvancedInitialization.dox +++ b/doc/TutorialAdvancedInitialization.dox @@ -100,7 +100,7 @@ with angles in degrees, the corresponding angle in radians, and their sine and c
Original functionIn-place function
This example shows that objects like the ones returned by LinSpaced() can be assigned to variables (and -expressions). Eigen defines utility functions like \link DenseBase::setZero() setZero()\endlink, +expressions). Eigen defines utility functions like \link DenseBase::setZero() setZero()\endlink, \link MatrixBase::setIdentity() \endlink and \link DenseBase::setLinSpaced() \endlink to do this conveniently. The following example contrasts three ways to construct the matrix \f$ J = \bigl[ \begin{smallmatrix} O & I \\ I & O \end{smallmatrix} \bigr] \f$: using static methods and @@ -141,7 +141,7 @@ The expression m + MatrixXf::Constant(3,3,1.2) constructs the 3-by-3 ma equal to 1.2 plus the corresponding coefficient of \a m. The comma-initializer, too, can also be used to construct temporary objects. The following example constructs a random -matrix of size 2-by-3, and then multiplies this matrix on the left with +matrix of size 2-by-3, and then multiplies this matrix on the left with \f$ \bigl[ \begin{smallmatrix} 0 & 1 \\ 1 & 0 \end{smallmatrix} \bigr] \f$. diff --git a/doc/TutorialArrayClass.dox b/doc/TutorialArrayClass.dox index f6f351091a472deeaf606eeae2d8d48ece8e0eef..7e09dcf1d168dfd69df350e26486fce55cc92cbf 100644 --- a/doc/TutorialArrayClass.dox +++ b/doc/TutorialArrayClass.dox @@ -6,7 +6,7 @@ This page aims to provide an overview and explanations on how to use Eigen's Array class. \eigenAutoToc - + \section TutorialArrayClassIntro What is the Array class? The Array class provides general-purpose arrays, as opposed to the Matrix class which @@ -93,7 +93,7 @@ This provides a functionality that is not directly available for Matrix objects. First of all, of course you can multiply an array by a scalar, this works in the same way as matrices. Where arrays are fundamentally different from matrices, is when you multiply two together. Matrices interpret -multiplication as matrix product and arrays interpret multiplication as coefficient-wise product. Thus, two +multiplication as matrix product and arrays interpret multiplication as coefficient-wise product. Thus, two arrays can be multiplied if and only if they have the same dimensions.
@@ -141,21 +141,21 @@ access to all operations regardless of the choice of declaring objects as arrays can be applied easily. Conversely, \link ArrayBase array expressions \endlink have a \link ArrayBase::matrix() .matrix() \endlink method. As with all Eigen expression abstractions, this doesn't have any runtime cost (provided that you let your compiler optimize). -Both \link MatrixBase::array() .array() \endlink and \link ArrayBase::matrix() .matrix() \endlink +Both \link MatrixBase::array() .array() \endlink and \link ArrayBase::matrix() .matrix() \endlink can be used as rvalues and as lvalues. Mixing matrices and arrays in an expression is forbidden with Eigen. For instance, you cannot add a matrix and array directly; the operands of a \c + operator should either both be matrices or both be arrays. However, -it is easy to convert from one to the other with \link MatrixBase::array() .array() \endlink and +it is easy to convert from one to the other with \link MatrixBase::array() .array() \endlink and \link ArrayBase::matrix() .matrix()\endlink. The exception to this rule is the assignment operator: it is allowed to assign a matrix expression to an array variable, or to assign an array expression to a matrix variable. -The following example shows how to use array operations on a Matrix object by employing the -\link MatrixBase::array() .array() \endlink method. For example, the statement +The following example shows how to use array operations on a Matrix object by employing the +\link MatrixBase::array() .array() \endlink method. For example, the statement result = m.array() * n.array() takes two matrices \c m and \c n, converts them both to an array, uses * to multiply them coefficient-wise and assigns the result to the matrix variable \c result (this is legal -because Eigen allows assigning array expressions to matrix variables). +because Eigen allows assigning array expressions to matrix variables). As a matter of fact, this usage case is so common that Eigen provides a \link MatrixBase::cwiseProduct const .cwiseProduct(.) \endlink method for matrices to compute the coefficient-wise product. This is also shown in diff --git a/doc/TutorialBlockOperations.dox b/doc/TutorialBlockOperations.dox index df277482c897e23675520e21e0fb07b50ff0cce5..d99daf409edef545be36031749ea49a40e2af39c 100644 --- a/doc/TutorialBlockOperations.dox +++ b/doc/TutorialBlockOperations.dox @@ -21,7 +21,7 @@ There are two versions, whose syntax is as follows: -
%Block of size (p,q), starting at (i,j) \code matrix.block(i,j,p,q);\endcode \code + \code matrix.block(i,j);\endcode
@@ -115,70 +115,70 @@ The different possibilities are summarized in the following table:
Top-left p by q block \link DenseBase::topLeftCorner() * \endlink \code matrix.topLeftCorner(p,q);\endcode \code + \code matrix.topLeftCorner();\endcode
Bottom-left p by q block \link DenseBase::bottomLeftCorner() * \endlink \code matrix.bottomLeftCorner(p,q);\endcode \code + \code matrix.bottomLeftCorner();\endcode
Top-right p by q block \link DenseBase::topRightCorner() * \endlink \code matrix.topRightCorner(p,q);\endcode \code + \code matrix.topRightCorner();\endcode
Bottom-right p by q block \link DenseBase::bottomRightCorner() * \endlink \code matrix.bottomRightCorner(p,q);\endcode \code + \code matrix.bottomRightCorner();\endcode
%Block containing the first q rows \link DenseBase::topRows() * \endlink \code matrix.topRows(q);\endcode \code + \code matrix.topRows();\endcode
%Block containing the last q rows \link DenseBase::bottomRows() * \endlink \code matrix.bottomRows(q);\endcode \code + \code matrix.bottomRows();\endcode
%Block containing the first p columns \link DenseBase::leftCols() * \endlink \code matrix.leftCols(p);\endcode \code + \code matrix.leftCols

();\endcode

%Block containing the last q columns \link DenseBase::rightCols() * \endlink \code matrix.rightCols(q);\endcode \code + \code matrix.rightCols();\endcode
%Block containing the q columns starting from i \link DenseBase::middleCols() * \endlink \code matrix.middleCols(i,q);\endcode \code + \code matrix.middleCols(i);\endcode
%Block containing the q rows starting from i \link DenseBase::middleRows() * \endlink \code matrix.middleRows(i,q);\endcode \code + \code matrix.middleRows(i);\endcode
@@ -203,25 +203,25 @@ Eigen also provides a set of block operations designed specifically for the spec %Block operation Version constructing a \n dynamic-size block expression Version constructing a \n fixed-size block expression -%Block containing the first \p n elements +%Block containing the first \p n elements \link DenseBase::head() * \endlink \code vector.head(n);\endcode - \code + \code vector.head();\endcode %Block containing the last \p n elements \link DenseBase::tail() * \endlink \code vector.tail(n);\endcode - \code + \code vector.tail();\endcode %Block containing \p n elements, starting at position \p i \link DenseBase::segment() * \endlink \code vector.segment(i,n);\endcode - \code + \code vector.segment(i);\endcode diff --git a/doc/TutorialLinearAlgebra.dox b/doc/TutorialLinearAlgebra.dox index 8042fcad333788acc479a97d1b39809d3bcefd0a..8e38944cb40fc0e44b1f20323c3433df22444f36 100644 --- a/doc/TutorialLinearAlgebra.dox +++ b/doc/TutorialLinearAlgebra.dox @@ -128,7 +128,7 @@ depending on your matrix, the problem you are trying to solve, and the trade-off To get an overview of the true relative speed of the different decompositions, check this \link DenseDecompositionBenchmark benchmark \endlink. -All of these decompositions offer a solve() method that works as in the above example. +All of these decompositions offer a solve() method that works as in the above example. If you know more about the properties of your matrix, you can use the above table to select the best method. For example, a good choice for solving linear systems with a non-symmetric matrix of full rank is PartialPivLU. @@ -156,7 +156,7 @@ in the least squares sense, is the SVD decomposition. Eigen provides two impleme The recommended one is the BDCSVD class, which scales well for large problems and automatically falls back to the JacobiSVD class for smaller problems. For both classes, their solve() method solved the linear system in the least-squares -sense. +sense. Here is an example: @@ -167,7 +167,7 @@ Here is an example:
-An alternative to the SVD, which is usually faster and about as accurate, is CompleteOrthogonalDecomposition. +An alternative to the SVD, which is usually faster and about as accurate, is CompleteOrthogonalDecomposition. Again, if you know more about the problem, the table above contains methods that are potentially faster. If your matrix is full rank, HouseHolderQR is the method of choice. If your matrix is full rank and well conditioned, diff --git a/doc/TutorialMapClass.dox b/doc/TutorialMapClass.dox index caa2539d81e04bbf113e2197b18d8c2c5b0355be..3a45f2f76f39622be09fb5cec79a69851ba4396f 100644 --- a/doc/TutorialMapClass.dox +++ b/doc/TutorialMapClass.dox @@ -17,7 +17,7 @@ A Map object has a type defined by its %Eigen equivalent: \code Map > \endcode -Note that, in this default case, a Map requires just a single template parameter. +Note that, in this default case, a Map requires just a single template parameter. To construct a Map variable, you need two other pieces of information: a pointer to the region of memory defining the array of coefficients, and the desired shape of the matrix or vector. For example, to define a matrix of \c float with sizes determined at compile time, you might do the following: \code diff --git a/doc/TutorialMatrixClass.dox b/doc/TutorialMatrixClass.dox index 6b0c6f6c4b2790dc3347204a43ad1d8fac6cae07..0bb58305dd8913ca3a5203319c0fd4e73115b65f 100644 --- a/doc/TutorialMatrixClass.dox +++ b/doc/TutorialMatrixClass.dox @@ -23,7 +23,7 @@ Matrix See \ref TopicScalarTypes "Scalar types" for a list of all supported scalar types and for how to extend support to new types. \li \c RowsAtCompileTime and \c ColsAtCompileTime are the number of rows - and columns of the matrix as known at compile time (see + and columns of the matrix as known at compile time (see \ref TutorialMatrixDynamic "below" for what to do if the number is not known at compile time). @@ -151,7 +151,7 @@ The numbering starts at 0. This example is self-explanatory: \verbinclude tut_matrix_coefficient_accessors.out -Note that the syntax `m(index)` +Note that the syntax `m(index)` is not restricted to vectors, it is also available for general matrices, meaning index-based access in the array of coefficients. This however depends on the matrix's storage order. All Eigen matrices default to column-major storage order, but this can be changed to row-major, see \ref TopicStorageOrders "Storage orders". diff --git a/doc/TutorialReductionsVisitorsBroadcasting.dox b/doc/TutorialReductionsVisitorsBroadcasting.dox index f5322b4a6f0f5d92fc432c543790b8e5fe71688b..97d0da84e5a3f7a34cb608c20158ef06d2326124 100644 --- a/doc/TutorialReductionsVisitorsBroadcasting.dox +++ b/doc/TutorialReductionsVisitorsBroadcasting.dox @@ -81,11 +81,11 @@ TODO In the meantime you can have a look at the DenseBase::redux() function. \section TutorialReductionsVisitorsBroadcastingVisitors Visitors -Visitors are useful when one wants to obtain the location of a coefficient inside -a Matrix or Array. The simplest examples are -\link MatrixBase::maxCoeff() maxCoeff(&x,&y) \endlink and +Visitors are useful when one wants to obtain the location of a coefficient inside +a Matrix or Array. The simplest examples are +\link MatrixBase::maxCoeff() maxCoeff(&x,&y) \endlink and \link MatrixBase::minCoeff() minCoeff(&x,&y)\endlink, which can be used to find -the location of the greatest or smallest coefficient in a Matrix or +the location of the greatest or smallest coefficient in a Matrix or Array. The arguments passed to a visitor are pointers to the variables where the @@ -104,12 +104,12 @@ row and column position are to be stored. These variables should be of type Both functions also return the value of the minimum or maximum coefficient. \section TutorialReductionsVisitorsBroadcastingPartialReductions Partial reductions -Partial reductions are reductions that can operate column- or row-wise on a Matrix or -Array, applying the reduction operation on each column or row and -returning a column or row vector with the corresponding values. Partial reductions are applied +Partial reductions are reductions that can operate column- or row-wise on a Matrix or +Array, applying the reduction operation on each column or row and +returning a column or row vector with the corresponding values. Partial reductions are applied with \link DenseBase::colwise() colwise() \endlink or \link DenseBase::rowwise() rowwise() \endlink. -A simple example is obtaining the maximum of the elements +A simple example is obtaining the maximum of the elements in each column in a given matrix, storing the result in a row vector: @@ -164,17 +164,17 @@ then \mbox{m.colwise().sum()} = \begin{bmatrix} 4 & 3 & 13 & 11 \end{bmatrix} \f] -The \link DenseBase::maxCoeff() maxCoeff() \endlink reduction is finally applied -to obtain the column index where the maximum sum is found, +The \link DenseBase::maxCoeff() maxCoeff() \endlink reduction is finally applied +to obtain the column index where the maximum sum is found, which is the column index 2 (third column) in this case. \section TutorialReductionsVisitorsBroadcastingBroadcasting Broadcasting -The concept behind broadcasting is similar to partial reductions, with the difference that broadcasting -constructs an expression where a vector (column or row) is interpreted as a matrix by replicating it in +The concept behind broadcasting is similar to partial reductions, with the difference that broadcasting +constructs an expression where a vector (column or row) is interpreted as a matrix by replicating it in one direction. -A simple example is to add a certain column vector to each column in a matrix. +A simple example is to add a certain column vector to each column in a matrix. This can be accomplished with:
@@ -194,10 +194,10 @@ form a four-by-two matrix which is then added to \c mat: + \begin{bmatrix} 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 2 & 6 & 9 \\ 4 & 2 & 8 & 3 \end{bmatrix}. \f] -The operators -=, + and - can also be used column-wise and row-wise. On arrays, we -can also use the operators *=, /=, * and / to perform coefficient-wise +The operators -=, + and - can also be used column-wise and row-wise. On arrays, we +can also use the operators *=, /=, * and / to perform coefficient-wise multiplication and division column-wise or row-wise. These operators are not available on matrices because it -is not clear what they would do. If you want multiply column 0 of a matrix \c mat with \c v(0), column 1 with +is not clear what they would do. If you want multiply column 0 of a matrix \c mat with \c v(0), column 1 with \c v(1), and so on, then use mat = mat * v.asDiagonal(). It is important to point out that the vector to be added column-wise or row-wise must be of type Vector, @@ -218,7 +218,7 @@ To perform the same operation row-wise we can do:
\subsection TutorialReductionsVisitorsBroadcastingBroadcastingCombined Combining broadcasting with other operations -Broadcasting can also be combined with other operations, such as Matrix or Array operations, +Broadcasting can also be combined with other operations, such as Matrix or Array operations, reductions and partial reductions. Now that broadcasting, reductions and partial reductions have been introduced, we can dive into a more advanced example that finds @@ -234,7 +234,7 @@ computing the squared Euclidean distance with the partial reduction named \link \verbinclude Tutorial_ReductionsVisitorsBroadcasting_broadcast_1nn.out -The line that does the job is +The line that does the job is \code (m.colwise() - v).colwise().squaredNorm().minCoeff(&index); \endcode @@ -243,7 +243,7 @@ We will go step by step to understand what is happening: - m.colwise() - v is a broadcasting operation, subtracting v from each column in m. The result of this operation is a new matrix whose size is the same as matrix m: \f[ - \mbox{m.colwise() - v} = + \mbox{m.colwise() - v} = \begin{bmatrix} -1 & 21 & 4 & 7 \\ 0 & 8 & 4 & -1 diff --git a/doc/TutorialSTL.dox b/doc/TutorialSTL.dox index 9a825bc4885a2d0db802db59cd885a206ce77fb5..6329d55f3c2dcc78fd597691179c90fc211c539e 100644 --- a/doc/TutorialSTL.dox +++ b/doc/TutorialSTL.dox @@ -7,7 +7,7 @@ As demonstrated below, this makes them naturally compatible with range-for-loops \eigenAutoToc -\section TutorialSTLVectors Iterating over 1D arrays and vectors +\section TutorialSTLVectors Iterating over 1D arrays and vectors Any dense 1D expressions exposes the pair of `begin()/end()` methods to iterate over them. diff --git a/doc/UsingNVCC.dox b/doc/UsingNVCC.dox index 36beb2ddda68abdf1cc5980ed843be09f402a3d5..c0f34ca76c9abe9a9e7861d99eb2520679036219 100644 --- a/doc/UsingNVCC.dox +++ b/doc/UsingNVCC.dox @@ -12,7 +12,7 @@ It is thus \b strongly \b recommended to properly move all costly host computati Known issues: - \c nvcc with MS Visual Studio does not work (patch welcome) - + - \c nvcc 5.5 with gcc-4.7 (or greater) has issues with the standard \c \ header file. To workaround this, you can add the following before including any other files: \code // workaround issue between gcc >= 4.7 and cuda 5.5 @@ -21,7 +21,7 @@ Known issues: #undef _GLIBCXX_USE_INT128 #endif \endcode - + - On 64bits system Eigen uses \c long \c int as the default type for indexes and sizes. On CUDA device, it would make sense to default to 32 bits \c int. However, to keep host and CUDA code compatible, this cannot be done automatically by %Eigen, and the user is thus required to define \c EIGEN_DEFAULT_DENSE_INDEX_TYPE to \c int throughout his code (or only for CUDA code if there is no interaction between host and CUDA code through %Eigen's object). diff --git a/doc/eigendoxy.css b/doc/eigendoxy.css index c746194e6c627c118991880f2fe423d1b1049b46..c554726eb5f6537f186acca128c7289d6fd908a0 100644 --- a/doc/eigendoxy.css +++ b/doc/eigendoxy.css @@ -23,7 +23,7 @@ p, dl.warning, dl.attention, dl.note li { max-width:55em; - text-align:justify; + text-align:justify; } img { @@ -52,7 +52,7 @@ table.example, table.manual, table.manual-vl, table.manual-hl { border-width: 1px; border-color: #cccccc; font-size: 1em; - + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); @@ -64,7 +64,7 @@ table.example th, table.manual th, table.manual-vl th, table.manual-hl th { padding-right: 1em; color: #555555; background-color: #F4F4E5; - + background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.3,#FFFFFF), color-stop(0.30,#FFFFFF), color-stop(0.98,#F4F4E5), to(#ECECDE)); background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 30%, #F4F4E5 98%, #ECECDE); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#F4F4E5'); @@ -203,7 +203,7 @@ table.tutorial_code td { } -/* Whenever doxygen meets a '\n' or a '
', it will put +/* Whenever doxygen meets a '\n' or a '
', it will put * the text containing the character into a

. * This little hack together with table.tutorial_code td.note * aims at fixing this issue. */ @@ -218,7 +218,7 @@ div.eimainmenu { } /* center version number on main page */ -h3.version { +h3.version { text-align: center; } diff --git a/doc/snippets/MatrixBase_cwiseArg.cpp b/doc/snippets/MatrixBase_cwiseArg.cpp index e0857cf97e11c7b2f2cc56a76005538ada587fc0..1bf7e628442ecc4df57f144cc6b8b06ea7842f32 100644 --- a/doc/snippets/MatrixBase_cwiseArg.cpp +++ b/doc/snippets/MatrixBase_cwiseArg.cpp @@ -1,3 +1,3 @@ MatrixXcf v = MatrixXcf::Random(2, 3); cout << v << endl << endl; -cout << v.cwiseArg() << endl; \ No newline at end of file +cout << v.cwiseArg() << endl; diff --git a/lapack/CMakeLists.txt b/lapack/CMakeLists.txt index b0b5570e24504c92ea235d7c199ea7ee87c6ae38..75384db77ac5de656f4fa156d798c3eae07aaa32 100644 --- a/lapack/CMakeLists.txt +++ b/lapack/CMakeLists.txt @@ -48,7 +48,7 @@ if(EIGEN_ENABLE_LAPACK_TESTS) if(NOT EXISTS ${eigen_full_path_to_reference_lapack}) # Download lapack and install sources and testing at the right place message(STATUS "Download lapack_addons_3.4.1.tgz...") - + file(DOWNLOAD "http://downloads.tuxfamily.org/eigen/lapack_addons_3.4.1.tgz" "${CMAKE_CURRENT_SOURCE_DIR}/lapack_addons_3.4.1.tgz" INACTIVITY_TIMEOUT 15 @@ -56,7 +56,7 @@ if(EIGEN_ENABLE_LAPACK_TESTS) STATUS download_status EXPECTED_MD5 ab5742640617e3221a873aba44bbdc93 SHOW_PROGRESS) - + message(STATUS ${download_status}) list(GET download_status 0 download_status_num) set(download_status_num 0) @@ -67,9 +67,9 @@ if(EIGEN_ENABLE_LAPACK_TESTS) message(STATUS "Download of lapack_addons_3.4.1.tgz failed, LAPACK unit tests won't be enabled") set(EIGEN_ENABLE_LAPACK_TESTS false) endif() - + endif() - + get_filename_component(eigen_full_path_to_reference_lapack "./reference/" ABSOLUTE) if(EXISTS ${eigen_full_path_to_reference_lapack}) set(EigenLapack_funcfilenames @@ -78,7 +78,7 @@ if(EIGEN_ENABLE_LAPACK_TESTS) spotrs.f dpotrs.f cpotrs.f zpotrs.f sgetrf.f dgetrf.f cgetrf.f zgetrf.f sgetrs.f dgetrs.f cgetrs.f zgetrs.f) - + file(GLOB ReferenceLapack_SRCS0 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "reference/*.f") foreach(filename1 IN LISTS ReferenceLapack_SRCS0) string(REPLACE "reference/" "" filename ${filename1}) @@ -89,8 +89,8 @@ if(EIGEN_ENABLE_LAPACK_TESTS) endif() endforeach() endif() - - + + endif() endif() @@ -121,7 +121,7 @@ endforeach() get_filename_component(eigen_full_path_to_testing_lapack "./testing/" ABSOLUTE) if(EXISTS ${eigen_full_path_to_testing_lapack}) - + # The following comes from lapack/TESTING/CMakeLists.txt # Get Python find_package(PythonInterp) @@ -136,7 +136,7 @@ if(EXISTS ${eigen_full_path_to_testing_lapack}) set(BUILD_DOUBLE true) set(BUILD_COMPLEX true) set(BUILD_COMPLEX16E true) - + if(MSVC_VERSION) # string(REPLACE "/STACK:10000000" "/STACK:900000000000000000" # CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") @@ -157,8 +157,8 @@ if(EXISTS ${eigen_full_path_to_testing_lapack}) add_test(NAME LAPACK-${testName} COMMAND "${CMAKE_COMMAND}" -DTEST=$ - -DINPUT=${TEST_INPUT} - -DOUTPUT=${TEST_OUTPUT} + -DINPUT=${TEST_INPUT} + -DOUTPUT=${TEST_OUTPUT} -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/testing/runtest.cmake") endif() diff --git a/lapack/svd.inc b/lapack/svd.inc index 262c5c6966f1461faa07a15f95ad750ef27ebe62..b08a5621f917c7f2d96b40d63ecbe93225138a2c 100644 --- a/lapack/svd.inc +++ b/lapack/svd.inc @@ -147,4 +147,4 @@ EIGEN_LAPACK_FUNC(gesvd) } } -#undef EIGEN_LAPACK_ARG_IF_COMPLEX \ No newline at end of file +#undef EIGEN_LAPACK_ARG_IF_COMPLEX diff --git a/scripts/buildtests.in b/scripts/buildtests.in index ab9c18fb1d54c52ecb3f5ee61fffad8767721c83..cbc6a8c611ec6b0867640b4f772e420f26c69aa1 100755 --- a/scripts/buildtests.in +++ b/scripts/buildtests.in @@ -19,4 +19,3 @@ else @CMAKE_MAKE_PROGRAM@ $targets_to_make @EIGEN_TEST_BUILD_FLAGS@ fi exit $? - diff --git a/scripts/cdashtesting.cmake.in b/scripts/cdashtesting.cmake.in index 0bf0fac2a2e179cd6ce7b4df436ead091cfd0161..2327bf3be825e3b25541ef59b8bf55a5ca9fd5b3 100644 --- a/scripts/cdashtesting.cmake.in +++ b/scripts/cdashtesting.cmake.in @@ -26,7 +26,7 @@ include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake") foreach(subproject ${CTEST_PROJECT_SUBPROJECTS}) message("") message("Process ${subproject}") - + set_property(GLOBAL PROPERTY SubProject ${subproject}) set_property(GLOBAL PROPERTY Label ${subproject}) @@ -41,9 +41,9 @@ foreach(subproject ${CTEST_PROJECT_SUBPROJECTS}) ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}" ) # runs only tests that have a LABELS property matching "${subproject}" - + ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}" LABELS "${subproject}" ) - + ctest_submit(PARTS Test) - + endforeach() diff --git a/scripts/ci_cmake_msvc.ps1 b/scripts/ci_cmake_msvc.ps1 index c08b9ae58d4ee31efe95a4f24cc56de9a1f0d59b..61c9f72914e92838e570ad2b874452fdde6c8616 100644 --- a/scripts/ci_cmake_msvc.ps1 +++ b/scripts/ci_cmake_msvc.ps1 @@ -12,7 +12,7 @@ param ($EIGEN_CI_ROOTDIR, ) function Get-ScriptDirectory { Split-Path $MyInvocation.ScriptName } - + # Set defaults if not already set. IF (!$EIGEN_CI_ROOTDIR) { $EIGEN_CI_ROOTDIR = Join-Path (Get-ScriptDirectory) '..' } IF (!$EIGEN_CI_BUILDDIR) { $EIGEN_CI_BUILDDIR = ".build" } @@ -62,4 +62,3 @@ IF ($EIGEN_CI_BUILD_TARGET) { # building the rest, then try to build again with a single thread. cmake --build . --target $EIGEN_CI_BUILD_TARGET -- -k0 || cmake --build . --target $EIGEN_CI_BUILD_TARGET -- -k0 -j1 } - diff --git a/scripts/eigen_gen_docs b/scripts/eigen_gen_docs old mode 100644 new mode 100755 index 787dcb325faf1e052fc80e0da18f4c213871d3bb..9a3956761a650d08ca975c2787841b8af7801b67 --- a/scripts/eigen_gen_docs +++ b/scripts/eigen_gen_docs @@ -21,4 +21,3 @@ rsync -az --no-p --delete build/doc/html/ $USER@ssh.tuxfamily.org:eigen/eigen.tu ssh $USER@ssh.tuxfamily.org "chmod -R g+w /home/eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR" || { echo "perm failed"; exit 1; } echo "Uploaded successfully" - diff --git a/scripts/eigen_gen_split_test_help.cmake b/scripts/eigen_gen_split_test_help.cmake old mode 100644 new mode 100755 index e43f5aabec38103cf449219b26f0f0c07d4cb461..d30edfec01d7354281eaade473a2d354d830ce98 --- a/scripts/eigen_gen_split_test_help.cmake +++ b/scripts/eigen_gen_split_test_help.cmake @@ -8,4 +8,4 @@ foreach(i RANGE 1 999) "#define CALL_SUBTEST_${i}(FUNC)\n" "#endif\n\n" ) -endforeach() \ No newline at end of file +endforeach() diff --git a/scripts/msvc_setup.ps1 b/scripts/msvc_setup.ps1 index e2d06422e19f0db1d75c6258cd0e8b0a226ccb73..aaee308978e503c53d34e813985bb81b392eaa29 100644 --- a/scripts/msvc_setup.ps1 +++ b/scripts/msvc_setup.ps1 @@ -5,7 +5,7 @@ param ($EIGEN_CI_MSVC_ARCH, $EIGEN_CI_MSVC_VER) Set-PSDebug -Trace 1 function Get-ScriptDirectory { Split-Path $MyInvocation.ScriptName } - + # Set defaults if not already set. IF (!$EIGEN_CI_MSVC_ARCH) { $EIGEN_CI_MSVC_ARCH = "x64" } IF (!$EIGEN_CI_MSVC_VER) { $EIGEN_CI_MSVC_VER = "14.29" } @@ -18,4 +18,4 @@ $global:EIGEN_CI_MSVC_VER = $EIGEN_CI_MSVC_VER $global:VS_INSTALL_DIR = &"${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath # Run VCVarsAll.bat incitialization script and extract environment variables. # http://allen-mack.blogspot.com/2008/03/replace-visual-studio-command-prompt.html -cmd.exe /c "`"${VS_INSTALL_DIR}\VC\Auxiliary\Build\vcvarsall.bat`" $EIGEN_CI_MSVC_ARCH -vcvars_ver=$EIGEN_CI_MSVC_VER & set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } \ No newline at end of file +cmd.exe /c "`"${VS_INSTALL_DIR}\VC\Auxiliary\Build\vcvarsall.bat`" $EIGEN_CI_MSVC_ARCH -vcvars_ver=$EIGEN_CI_MSVC_VER & set" | foreach { if ($_ -match "=") { $v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])" } } diff --git a/test/SafeScalar.h b/test/SafeScalar.h index 33a54c5af36d0ebb74d1b989d67717d8bb788397..aa88906fbc1fe42ee9b0266e2a5181510477f92c 100644 --- a/test/SafeScalar.h +++ b/test/SafeScalar.h @@ -30,4 +30,4 @@ template struct NumTraits> : GenericNumTraits { enum { RequireInitialization = 1 }; }; -} // namespace Eigen \ No newline at end of file +} // namespace Eigen diff --git a/test/dense_storage.cpp b/test/dense_storage.cpp index d394a94f91308b568bd544a1c3e63e6b109b8188..63bdca53fb5ef3a0d3e6fb6e96b938c7d266ef49 100644 --- a/test/dense_storage.cpp +++ b/test/dense_storage.cpp @@ -282,4 +282,4 @@ EIGEN_DECLARE_TEST(dense_storage) { } } -#undef EIGEN_TESTING_PLAINOBJECT_CTOR \ No newline at end of file +#undef EIGEN_TESTING_PLAINOBJECT_CTOR diff --git a/test/gpu_test_helper.h b/test/gpu_test_helper.h index bc8c8d410dbb132cf9f292cda6fadf53d17808ec..f022d206948300889c2b973d37d38a7a173b9509 100644 --- a/test/gpu_test_helper.h +++ b/test/gpu_test_helper.h @@ -104,9 +104,9 @@ struct void_helper { // Restores the original return type, Void -> void, T otherwise. template - static EIGEN_ALWAYS_INLINE EIGEN_DEVICE_FUNC - std::enable_if_t::type, Void>::value, T> - restore(T&& val) { + static EIGEN_ALWAYS_INLINE + EIGEN_DEVICE_FUNC std::enable_if_t::type, Void>::value, T> + restore(T&& val) { return val; } diff --git a/test/main.h b/test/main.h index db4d484fba56189218068b42e7a72e371404a846..5c0001020c6221ca90553e271b0935218fc9a836 100644 --- a/test/main.h +++ b/test/main.h @@ -157,7 +157,9 @@ inline void on_temporary_creation(long int size, int) { } #define EIGEN_DENSE_STORAGE_CTOR_PLUGIN \ - { on_temporary_creation(size, Size); } + { \ + on_temporary_creation(size, Size); \ + } #define VERIFY_EVALUATION_COUNT(XPR, N) \ { \ @@ -337,7 +339,8 @@ static std::vector eigen_assert_list; #else // EIGEN_NO_ASSERTION_CHECKING #define VERIFY_RAISES_ASSERT(a) \ - {} + { \ + } #endif // EIGEN_NO_ASSERTION_CHECKING diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h index 97e7da3bdfb6f0e2c634cc0fd03b5d7b1e50189f..79a01b964061e96695a0cfe06105d3be74df2eb9 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContraction.h @@ -691,8 +691,8 @@ struct TensorContractionEvaluatorBase { #if !defined(EIGEN_HIPCC) EIGEN_DEVICE_FUNC #endif - void - evalGemv(Scalar* buffer) const { + void + evalGemv(Scalar* buffer) const { const Index rows = m_i_size; const Index cols = m_k_size; @@ -735,8 +735,8 @@ struct TensorContractionEvaluatorBase { #if !defined(EIGEN_HIPCC) EIGEN_DEVICE_FUNC #endif - void - evalGemm(Scalar* buffer) const { + void + evalGemm(Scalar* buffer) const { // columns in left side, rows in right side const Index k = this->m_k_size; this->template evalGemmPartial - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - std::enable_if_t::size == packet_size, PacketT> - load(Index i, Index j) const { + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE std::enable_if_t::size == packet_size, PacketT> + load(Index i, Index j) const { // whole method makes column major assumption // don't need to add offsets for now (because operator handles that) @@ -292,9 +292,9 @@ class BaseTensorContractionMapper } template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - std::enable_if_t::size != packet_size, PacketT> - load(Index i, Index j) const { + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE std::enable_if_t::size != packet_size, PacketT> + load(Index i, Index j) const { const Index requested_packet_size = internal::unpacket_traits::size; EIGEN_ALIGN_MAX Scalar data[requested_packet_size]; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h index ea210a1f8673cc66e752d02efcc6c04afbaac8f5..11f637552f28b67ed6258e3e890453d682d1d7c3 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionSycl.h @@ -245,9 +245,9 @@ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::enable_if_t

static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - typename std::enable_if_t::size != 1 && dt == data_source::global_mem, - void> - write(PacketType &packet_data, DataScalar *ptr) { +typename std::enable_if_t::size != 1 && dt == data_source::global_mem, + void> +write(PacketType &packet_data, DataScalar *ptr) { ::Eigen::internal::pstoreu(ptr, packet_data); } @@ -266,9 +266,9 @@ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE */ template static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - typename std::enable_if_t::size == 1 && dt == data_source::global_mem, - void> - write(PacketType &packet_data, DataScalar *ptr) { +typename std::enable_if_t::size == 1 && dt == data_source::global_mem, + void> +write(PacketType &packet_data, DataScalar *ptr) { *ptr = packet_data; } diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index 99e7304d80a3a9ee9e7749e6e40f2cf39e3c3be7..59b798f00e16645927160bab5358ba8822f543f0 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -932,9 +932,7 @@ struct TensorEvaluator 1) { Index mid = (start + end) / 2; - device_.enqueue([this, mid, end, k, rhs]() { - enqueue_packing_helper(mid, end, k, rhs); - }); + device_.enqueue([this, mid, end, k, rhs]() { enqueue_packing_helper(mid, end, k, rhs); }); end = mid; } @@ -1000,9 +996,7 @@ struct TensorEvaluator 0 || std::this_thread::get_id() == created_by_thread_id_); if (pack_async) { - device_.enqueue([this, start, end, k, rhs]() { - enqueue_packing_helper(start, end, k, rhs); - }); + device_.enqueue([this, start, end, k, rhs]() { enqueue_packing_helper(start, end, k, rhs); }); } else { enqueue_packing_helper(start, end, k, rhs); } @@ -1283,9 +1277,7 @@ struct TensorEvaluator 1) { Index mid_block_idx = (start_block_idx + end_block_idx) / 2; evaluator->m_device.enqueue( - [this, mid_block_idx, end_block_idx]() { - evalAsync(mid_block_idx, end_block_idx); - }); + [this, mid_block_idx, end_block_idx]() { evalAsync(mid_block_idx, end_block_idx); }); end_block_idx = mid_block_idx; } diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h index e20052c9208e52632c9fc15909bf75746fbbc502..d495b0f2780e865cf49b1d29aeb5b3cfaa429c23 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h @@ -28,9 +28,7 @@ struct fixed_size_tensor_index_linearization_helper { template EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE Index run(array const& indices, const Dimensions& dimensions) { - return array_get < RowMajor ? n - 1 - : (NumIndices - n) > (indices) + dget < RowMajor ? n - 1 - : (NumIndices - n), + return array_get(indices) + dget < RowMajor ? n - 1 : (NumIndices - n), Dimensions > ::value * fixed_size_tensor_index_linearization_helper::run( indices, dimensions); } @@ -133,12 +131,9 @@ template const& indices, array const& dimensions) { - return array_get < RowMajor ? n - : (NumIndices - n - 1) > (indices) + array_get < RowMajor - ? n - : (NumIndices - n - 1) > - (dimensions)*tensor_index_linearization_helper::run( - indices, dimensions); + return array_get(indices) + + array_get(dimensions) * + tensor_index_linearization_helper::run(indices, dimensions); } }; @@ -146,7 +141,7 @@ template struct tensor_index_linearization_helper { static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array const& indices, array const&) { - return array_get < RowMajor ? 0 : NumIndices - 1 > (indices); + return array_get(indices); } }; } // end namespace internal @@ -259,12 +254,9 @@ template const& indices, std::vector const& dimensions) { - return array_get < RowMajor ? n - : (NumIndices - n - 1) > (indices) + array_get < RowMajor - ? n - : (NumIndices - n - 1) > - (dimensions)*tensor_vsize_index_linearization_helper::run( - indices, dimensions); + return array_get(indices) + + array_get(dimensions) * + tensor_vsize_index_linearization_helper::run(indices, dimensions); } }; @@ -272,7 +264,7 @@ template struct tensor_vsize_index_linearization_helper { static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array const& indices, std::vector const&) { - return array_get < RowMajor ? 0 : NumIndices - 1 > (indices); + return array_get(indices); } }; } // end namespace internal diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h b/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h index 9bc0eac9842b861c0381de15404c2765bbdcbce8..ce73738c0284192d424198dda4e2b729111fddbc 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorEvalTo.h @@ -134,7 +134,7 @@ struct TensorEvaluator, Device> { EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalScalar(Index i) const { m_buffer[i] = m_impl.coeff(i); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void evalPacket(Index i) const { internal::pstoret( - m_buffer + i, m_impl.template packet < TensorEvaluator::IsAligned ? Aligned : Unaligned > (i)); + m_buffer + i, m_impl.template packet::IsAligned ? Aligned : Unaligned>(i)); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const { diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h b/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h index 5544953e250e6ea4d39a9e1edefca1bd223c7806..c6a47e2f3438e5ffd30e89a74dd00fd435134c40 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h @@ -107,8 +107,8 @@ struct TensorEvaluator { // Function has been templatized to enable Sfinae. template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - std::enable_if_t::masked_load_available, PacketReturnTypeT> - partialPacket(Index index, typename internal::unpacket_traits::mask_t umask) const { + std::enable_if_t::masked_load_available, PacketReturnTypeT> + partialPacket(Index index, typename internal::unpacket_traits::mask_t umask) const { return internal::ploadu(m_data + index, umask); } @@ -269,8 +269,8 @@ struct TensorEvaluator { // Function has been templatized to enable Sfinae. template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - std::enable_if_t::masked_load_available, PacketReturnTypeT> - partialPacket(Index index, typename internal::unpacket_traits::mask_t umask) const { + std::enable_if_t::masked_load_available, PacketReturnTypeT> + partialPacket(Index index, typename internal::unpacket_traits::mask_t umask) const { return internal::ploadu(m_data + index, umask); } diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h b/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h index b9d6f376ba735023a35115d1f8d4fbe140db0e9a..bfacc57fe855eb39f8c7795b636bb6d84efca93b 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h @@ -57,7 +57,7 @@ struct PartOf { namespace internal { template -struct traits > : public traits { +struct traits> : public traits { typedef traits XprTraits; typedef typename XprTraits::Scalar Scalar; typedef typename NumTraits::Real RealScalar; @@ -81,7 +81,7 @@ struct eval, Eigen::Dense template struct nested, 1, - typename eval >::type> { + typename eval>::type> { typedef TensorFFTOp type; }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 9bbf945f71b26fc39fd679b35198d1edec6d1694..4a50415739f833aee1bef8579d8707e5469b5133 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -386,7 +386,7 @@ struct FullReducer { Barrier barrier(internal::convert_index(numblocks)); MaxSizeVector shards(numblocks, reducer.initialize()); for (Index i = 0; i < numblocks; ++i) { - auto run_shard = [i, blocksize, &self, &barrier, &shards, &reducer](){ + auto run_shard = [i, blocksize, &self, &barrier, &shards, &reducer]() { shards[i] = InnerMostDimReducer::reduce(self, i * blocksize, blocksize, reducer); barrier.Notify(); }; diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h index 62686ce69bfb98b1048862119319ec41a8e1d697..91cd27a4e0da8a7b0c6be85999bbeb360b6d0eea 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h @@ -67,22 +67,24 @@ class TensorStorage, Options_> { EIGEN_DEVICE_FUNC TensorStorage() : m_data(0), m_dimensions() { if (NumIndices_ == 0) { - m_data = internal::conditional_aligned_new_auto(1); + m_data = internal::conditional_aligned_new_auto < T, (Options_ & DontAlign) == 0 > (1); } } EIGEN_DEVICE_FUNC TensorStorage(Index size, const array& dimensions) - : m_data(internal::conditional_aligned_new_auto(size)), m_dimensions(dimensions) { + : m_data(internal::conditional_aligned_new_auto < T, (Options_ & DontAlign) == 0 > (size)), + m_dimensions(dimensions) { EIGEN_INTERNAL_TENSOR_STORAGE_CTOR_PLUGIN } template EIGEN_DEVICE_FUNC TensorStorage(DenseIndex... indices) : m_dimensions(indices...) { - m_data = internal::conditional_aligned_new_auto(internal::array_prod(m_dimensions)); + m_data = internal::conditional_aligned_new_auto < T, + (Options_ & DontAlign) == 0 > (internal::array_prod(m_dimensions)); } EIGEN_DEVICE_FUNC TensorStorage(const Self& other) - : m_data(internal::conditional_aligned_new_auto( - internal::array_prod(other.m_dimensions))), + : m_data(internal::conditional_aligned_new_auto < T, + (Options_ & DontAlign) == 0 > (internal::array_prod(other.m_dimensions))), m_dimensions(other.m_dimensions) { internal::smart_copy(other.m_data, other.m_data + internal::array_prod(other.m_dimensions), m_data); } @@ -118,9 +120,9 @@ class TensorStorage, Options_> { if (size != currentSz) { internal::conditional_aligned_delete_auto(m_data, currentSz); if (size) - m_data = internal::conditional_aligned_new_auto(size); + m_data = internal::conditional_aligned_new_auto < T, (Options_ & DontAlign) == 0 > (size); else if (NumIndices_ == 0) { - m_data = internal::conditional_aligned_new_auto(1); + m_data = internal::conditional_aligned_new_auto < T, (Options_ & DontAlign) == 0 > (1); } else m_data = 0; EIGEN_INTERNAL_DENSE_STORAGE_CTOR_PLUGIN({}) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h b/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h index cf69fef6e31ef43839cdb041e410a52b3639fbfd..742e492c7506abde05dc341493653c26eeb5689d 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorVolumePatch.h @@ -449,8 +449,7 @@ struct TensorEvaluator, D // Find the offset of the element wrt the location of the first element. Index first_entry = (indices[0] - patchIndex * m_patchStride) / m_fastOutputDepth; - Index second_entry = PacketSize == 1 ? first_entry : - (indices[1] - patchIndex * m_patchStride) / m_fastOutputDepth; + Index second_entry = PacketSize == 1 ? first_entry : (indices[1] - patchIndex * m_patchStride) / m_fastOutputDepth; const Index patchOffsets[2] = {first_entry, second_entry}; diff --git a/unsupported/Eigen/IterativeSolvers b/unsupported/Eigen/IterativeSolvers index 4ae0975d547672c46278b40c93518ee51430da5c..cdc5b0661a8b6d1039a808cf304ca5ff665ea04f 100644 --- a/unsupported/Eigen/IterativeSolvers +++ b/unsupported/Eigen/IterativeSolvers @@ -27,7 +27,7 @@ * * Choosing the best solver for solving \c A \c x = \c b depends a lot on the preconditioner chosen as well as the *properties of \c A. The following flowchart might help you. - * \dot width=50% + * \dot width=50% * digraph g { * node [ fontname=Arial, fontsize=11]; * edge [ fontname=Helvetica, fontsize=10 ]; diff --git a/unsupported/Eigen/MPRealSupport b/unsupported/Eigen/MPRealSupport index 322ff45fb1ad0815b53781d2d540b6ac14dac83b..bbdf0b41838f243fc6440808021f9abdb79b4815 100644 --- a/unsupported/Eigen/MPRealSupport +++ b/unsupported/Eigen/MPRealSupport @@ -95,7 +95,7 @@ struct NumTraits : GenericNumTraits { return std::numeric_limits::digits10(Precision); } static inline int digits10(const Real& x) { return std::numeric_limits::digits10(x); } - + static inline int max_digits10(long Precision = mpfr::mpreal::get_default_prec()) { return std::numeric_limits::max_digits10(Precision); } diff --git a/unsupported/Eigen/src/LevenbergMarquardt/CopyrightMINPACK.txt b/unsupported/Eigen/src/LevenbergMarquardt/CopyrightMINPACK.txt index ae7984daec98f7311b0a4e288583e24c9cd6a7bc..132cc3f33fa7fd4169a92b05241db59c8428a7ab 100644 --- a/unsupported/Eigen/src/LevenbergMarquardt/CopyrightMINPACK.txt +++ b/unsupported/Eigen/src/LevenbergMarquardt/CopyrightMINPACK.txt @@ -49,4 +49,3 @@ SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES. - diff --git a/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h b/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h index 6e8be8490d5b1c8cb18c695547c728668916e192..5d3a562b306387c189964919bc6854188972cbdb 100644 --- a/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h +++ b/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h @@ -436,8 +436,8 @@ class BlockSparseMatrix // Insert the value m_values[idxVal] = it_spmat.value(); } // end of this column - } // end of this block - } // end of this outer block + } // end of this block + } // end of this outer block return *this; } diff --git a/unsupported/README.txt b/unsupported/README.txt index 70793bf13ce3214d95d2edfdc6e8a3cae3456884..27c56c751537f64045c45f748cda6719a1197526 100644 --- a/unsupported/README.txt +++ b/unsupported/README.txt @@ -47,4 +47,3 @@ unsupported/test/.cpp <- unit test files The documentation is generated at the same time than the main Eigen documentation. The .html files are generated in: build_dir/doc/html/unsupported/ - diff --git a/unsupported/doc/Overview.dox b/unsupported/doc/Overview.dox index b3cfa964e6397bdc51be7e372688fa1d206318ec..b0f10385fdf7e02070b2bec5e9ecf969547c02d8 100644 --- a/unsupported/doc/Overview.dox +++ b/unsupported/doc/Overview.dox @@ -28,4 +28,3 @@ subject to be included in %Eigen in the future. /// \internal \brief Namespace containing low-level routines from the %Eigen library. namespace internal {} } - diff --git a/unsupported/doc/SYCL.dox b/unsupported/doc/SYCL.dox index 2295adf21fec0a778366ae1a38c759ec33147071..5c81f2eb597301aaeddec4d8b1f0eada9b6a0f50 100644 --- a/unsupported/doc/SYCL.dox +++ b/unsupported/doc/SYCL.dox @@ -2,8 +2,8 @@ Useful information for Eigen SYCL Backend: -- Getting Started with Eigen +- Getting Started with Eigen -- Options for Building Eigen SYCL +- Options for Building Eigen SYCL */ diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index 5efa7e8221e2298c0d861a8e731a40184c906316..d11dfff3d91b3a088a964b2d22591a8ccac17b10 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -272,7 +272,7 @@ if(CUDA_FOUND AND EIGEN_TEST_CUDA) set(CUDA_NVCC_FLAGS "--expt-relaxed-constexpr -Xcudafe \"--display_error_number\" ${NVCC_ARCH_FLAGS} ${CUDA_NVCC_FLAGS} ${EIGEN_CUDA_CXX_FLAGS}") cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include") endif() - + set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu") ei_add_test(cxx11_tensor_complex_gpu)