From 836978e927e4a0835595929a910011f6e36bb51f Mon Sep 17 00:00:00 2001 From: Simon Praetorius Date: Fri, 14 Oct 2016 17:15:23 +0200 Subject: [PATCH] removed all trailing whitespaces in all git files --- AMDiS/HOWTO_cmake.html | 6 +- AMDiS/cmake/CompilerTest.cmake | 24 +- AMDiS/cmake/postrm.in | 2 +- AMDiS/cmake3/amdis_parallel.cmake | 40 +- AMDiS/cmake3/muparser.cmake | 4 +- AMDiS/cmake3/test_compile_features.cmake | 2 +- AMDiS/doc/Doxyfile | 124 +- AMDiS/lib/mtl4/CMakeLists.txt | 4 +- AMDiS/lib/mtl4/Doxyfile | 1308 +- AMDiS/lib/mtl4/INSTALL | 4 +- AMDiS/lib/mtl4/README | 2 +- AMDiS/lib/mtl4/SConstruct | 46 +- .../numeric/itl/iteration/basic_iteration.hpp | 20 +- .../itl/iteration/cyclic_iteration.hpp | 20 +- .../numeric/itl/iteration/noisy_iteration.hpp | 8 +- AMDiS/lib/mtl4/boost/numeric/itl/itl.hpp | 6 +- AMDiS/lib/mtl4/boost/numeric/itl/itl_fwd.hpp | 32 +- .../mtl4/boost/numeric/itl/krylov/bicg.hpp | 18 +- .../boost/numeric/itl/krylov/bicgstab.hpp | 28 +- .../boost/numeric/itl/krylov/bicgstab_2.hpp | 34 +- .../boost/numeric/itl/krylov/bicgstab_ell.hpp | 38 +- .../lib/mtl4/boost/numeric/itl/krylov/cg.hpp | 42 +- .../lib/mtl4/boost/numeric/itl/krylov/cgs.hpp | 18 +- .../lib/mtl4/boost/numeric/itl/krylov/fsm.hpp | 12 +- .../mtl4/boost/numeric/itl/krylov/gmres.hpp | 32 +- .../mtl4/boost/numeric/itl/krylov/idr_s.hpp | 34 +- .../lib/mtl4/boost/numeric/itl/krylov/qmr.hpp | 16 +- .../numeric/itl/krylov/repeating_solver.hpp | 10 +- .../mtl4/boost/numeric/itl/krylov/tfqmr.hpp | 10 +- .../numeric/itl/minimization/quasi_newton.hpp | 26 +- .../mtl4/boost/numeric/itl/pc/binary_heap.hpp | 6 +- .../mtl4/boost/numeric/itl/pc/comparators.hpp | 6 +- .../lib/mtl4/boost/numeric/itl/pc/concat.hpp | 10 +- .../mtl4/boost/numeric/itl/pc/diagonal.hpp | 10 +- AMDiS/lib/mtl4/boost/numeric/itl/pc/ic_0.hpp | 36 +- .../mtl4/boost/numeric/itl/pc/identity.hpp | 8 +- AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu.hpp | 24 +- AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu_0.hpp | 24 +- AMDiS/lib/mtl4/boost/numeric/itl/pc/ilut.hpp | 30 +- .../boost/numeric/itl/pc/imf_algorithms.hpp | 70 +- .../numeric/itl/pc/imf_preconditioner.hpp | 20 +- .../mtl4/boost/numeric/itl/pc/is_identity.hpp | 12 +- .../numeric/itl/pc/matrix_algorithms.hpp | 20 +- .../lib/mtl4/boost/numeric/itl/pc/solver.hpp | 24 +- .../lib/mtl4/boost/numeric/itl/pc/sorting.hpp | 6 +- .../boost/numeric/itl/pc/sub_matrix_pc.hpp | 50 +- .../numeric/itl/smoother/gauss_seidel.hpp | 40 +- .../boost/numeric/itl/smoother/jacobi.hpp | 42 +- .../mtl4/boost/numeric/itl/smoother/jor.hpp | 42 +- .../itl/smoother/relaxation_parameter.hpp | 2 +- .../boost/numeric/itl/smoother/repeated.hpp | 12 +- .../mtl4/boost/numeric/itl/smoother/sor.hpp | 44 +- .../mtl4/boost/numeric/itl/stepper/armijo.hpp | 18 +- .../mtl4/boost/numeric/itl/stepper/wolf.hpp | 22 +- .../mtl4/boost/numeric/itl/updater/bfgs.hpp | 14 +- .../boost/numeric/itl/updater/broyden.hpp | 12 +- .../mtl4/boost/numeric/itl/updater/dfp.hpp | 12 +- .../mtl4/boost/numeric/itl/updater/psb.hpp | 2 +- .../mtl4/boost/numeric/itl/updater/sr1.hpp | 12 +- .../boost/numeric/itl/utility/exception.hpp | 10 +- .../numeric/linear_algebra/accumulate.hpp | 14 +- .../linear_algebra/algebraic_concepts.hpp | 64 +- .../numeric/linear_algebra/concept_maps.hpp | 2 +- .../boost/numeric/linear_algebra/concepts.hpp | 106 +- .../numeric/linear_algebra/ets_concepts.hpp | 14 +- .../boost/numeric/linear_algebra/identity.hpp | 48 +- .../linear_algebra/intrinsic_concept_maps.hpp | 22 +- .../boost/numeric/linear_algebra/inverse.hpp | 22 +- .../numeric/linear_algebra/is_invertible.hpp | 12 +- .../linear_algebra/linear_operator.hpp | 32 +- .../numeric/linear_algebra/new_concepts.hpp | 104 +- .../numeric/linear_algebra/old_concepts.hpp | 224 +- .../numeric/linear_algebra/operators.hpp | 18 +- .../boost/numeric/linear_algebra/power.hpp | 56 +- .../numeric/linear_algebra/pseudo_concept.hpp | 6 +- .../linear_algebra/vector_concepts.hpp | 96 +- .../lib/mtl4/boost/numeric/meta_math/abs.hpp | 6 +- .../boost/numeric/meta_math/is_power_of_2.hpp | 6 +- .../mtl4/boost/numeric/meta_math/is_prime.hpp | 8 +- .../meta_math/least_significant_one_bit.hpp | 6 +- .../mtl4/boost/numeric/meta_math/log_2.hpp | 6 +- .../lib/mtl4/boost/numeric/meta_math/loop.hpp | 6 +- .../mtl4/boost/numeric/meta_math/loop1.hpp | 6 +- .../mtl4/boost/numeric/meta_math/loop2.hpp | 6 +- .../mtl4/boost/numeric/meta_math/loop3.hpp | 12 +- .../lib/mtl4/boost/numeric/meta_math/max.hpp | 6 +- .../lib/mtl4/boost/numeric/meta_math/min.hpp | 6 +- .../boost/numeric/meta_math/power_of_2.hpp | 6 +- .../lib/mtl4/boost/numeric/meta_math/sqrt.hpp | 12 +- .../boost/numeric/mtl/concept/collection.hpp | 46 +- .../boost/numeric/mtl/concept/magnitude.hpp | 8 +- .../mtl4/boost/numeric/mtl/concept/matrix.hpp | 94 +- .../numeric/mtl/concept/static_functor.hpp | 6 +- .../boost/numeric/mtl/concept/std_concept.hpp | 48 +- .../mtl4/boost/numeric/mtl/concept/vector.hpp | 30 +- AMDiS/lib/mtl4/boost/numeric/mtl/config.hpp | 16 +- .../boost/numeric/mtl/detail/base_cursor.hpp | 94 +- .../mtl/detail/contiguous_memory_block.hpp | 80 +- .../boost/numeric/mtl/detail/dilated_int.hpp | 26 +- .../numeric/mtl/detail/dilation_table.hpp | 78 +- .../mtl4/boost/numeric/mtl/detail/index.hpp | 28 +- .../mtl/detail/masked_dilation_tables.hpp | 58 +- .../numeric/mtl/detail/range_generator.hpp | 30 +- .../mtl/detail/strided_base_cursor.hpp | 66 +- .../numeric/mtl/detail/trivial_inserter.hpp | 16 +- .../boost/numeric/mtl/interface/arprec.hpp | 14 +- .../mtl4/boost/numeric/mtl/interface/blas.hpp | 18 +- .../boost/numeric/mtl/interface/lapack.hpp | 6 +- .../numeric/mtl/interface/umfpack_solve.hpp | 56 +- .../mtl4/boost/numeric/mtl/interface/vpt.cpp | 10 +- .../mtl4/boost/numeric/mtl/interface/vpt.hpp | 40 +- .../lib/mtl4/boost/numeric/mtl/interfaces.hpp | 10 +- .../boost/numeric/mtl/io/functor_symbol.hpp | 44 +- .../mtl4/boost/numeric/mtl/io/matrix_file.hpp | 10 +- .../boost/numeric/mtl/io/matrix_market.hpp | 74 +- AMDiS/lib/mtl4/boost/numeric/mtl/io/path.hpp | 10 +- .../boost/numeric/mtl/io/read_el_matrix.hpp | 40 +- .../mtl4/boost/numeric/mtl/io/read_filter.hpp | 12 +- .../boost/numeric/mtl/io/test_ostream.hpp | 16 +- .../mtl4/boost/numeric/mtl/io/write_ast.hpp | 10 +- .../numeric/mtl/io/write_ast_dispatch.hpp | 56 +- AMDiS/lib/mtl4/boost/numeric/mtl/matrices.hpp | 34 +- .../boost/numeric/mtl/matrix/all_mat_expr.hpp | 6 +- .../boost/numeric/mtl/matrix/banded_view.hpp | 82 +- .../mtl4/boost/numeric/mtl/matrix/bands.hpp | 8 +- .../boost/numeric/mtl/matrix/base_matrix.hpp | 60 +- .../numeric/mtl/matrix/base_sub_matrix.hpp | 74 +- .../numeric/mtl/matrix/block_diagonal2D.hpp | 46 +- .../boost/numeric/mtl/matrix/compressed2D.hpp | 206 +- .../boost/numeric/mtl/matrix/coordinate2D.hpp | 90 +- .../numeric/mtl/matrix/crtp_base_matrix.hpp | 120 +- .../mtl4/boost/numeric/mtl/matrix/dense2D.hpp | 210 +- .../numeric/mtl/matrix/diagonal_setup.hpp | 10 +- .../boost/numeric/mtl/matrix/dimension.hpp | 40 +- .../mtl4/boost/numeric/mtl/matrix/element.hpp | 60 +- .../numeric/mtl/matrix/element_array.hpp | 8 +- .../numeric/mtl/matrix/element_matrix.hpp | 10 +- .../numeric/mtl/matrix/element_structure.hpp | 20 +- .../boost/numeric/mtl/matrix/ell_matrix.hpp | 22 +- .../numeric/mtl/matrix/hermitian_view.hpp | 48 +- .../numeric/mtl/matrix/hessian_setup.hpp | 22 +- .../boost/numeric/mtl/matrix/identity.hpp | 10 +- .../boost/numeric/mtl/matrix/identity2D.hpp | 18 +- .../numeric/mtl/matrix/implicit_dense.hpp | 44 +- .../boost/numeric/mtl/matrix/indirect.hpp | 14 +- .../boost/numeric/mtl/matrix/inserter.hpp | 8 +- .../numeric/mtl/matrix/laplacian_setup.hpp | 6 +- .../mtl4/boost/numeric/mtl/matrix/lower.hpp | 8 +- .../matrix/make_fast_multi_vector_expr.hpp | 12 +- .../boost/numeric/mtl/matrix/map_view.hpp | 134 +- .../numeric/mtl/matrix/mapped_inserter.hpp | 24 +- .../boost/numeric/mtl/matrix/mat_expr.hpp | 6 +- .../numeric/mtl/matrix/mat_mat_asgn_expr.hpp | 10 +- .../mtl/matrix/mat_mat_ele_times_expr.hpp | 16 +- .../numeric/mtl/matrix/mat_mat_minus_expr.hpp | 10 +- .../numeric/mtl/matrix/mat_mat_op_expr.hpp | 24 +- .../numeric/mtl/matrix/mat_mat_plus_expr.hpp | 14 +- .../numeric/mtl/matrix/mat_mat_times_expr.hpp | 24 +- .../numeric/mtl/matrix/mat_negate_expr.hpp | 6 +- .../boost/numeric/mtl/matrix/morton_dense.hpp | 158 +- .../boost/numeric/mtl/matrix/multi_vector.hpp | 32 +- .../numeric/mtl/matrix/multi_vector_range.hpp | 12 +- .../boost/numeric/mtl/matrix/operators.hpp | 14 +- .../boost/numeric/mtl/matrix/parameter.hpp | 10 +- .../boost/numeric/mtl/matrix/permutation.hpp | 8 +- .../mtl/matrix/poisson2D_dirichlet.hpp | 40 +- .../mtl4/boost/numeric/mtl/matrix/reorder.hpp | 10 +- .../mtl/matrix/reorder_matrix_rows.hpp | 26 +- .../boost/numeric/mtl/matrix/reorder_ref.hpp | 12 +- .../numeric/mtl/matrix/shifted_inserter.hpp | 22 +- .../numeric/mtl/matrix/sparse_banded.hpp | 36 +- .../boost/numeric/mtl/matrix/strict_lower.hpp | 10 +- .../boost/numeric/mtl/matrix/strict_upper.hpp | 10 +- .../numeric/mtl/matrix/transposed_view.hpp | 76 +- .../mtl4/boost/numeric/mtl/matrix/upper.hpp | 8 +- .../boost/numeric/mtl/matrix/view_ref.hpp | 10 +- AMDiS/lib/mtl4/boost/numeric/mtl/mtl.hpp | 6 +- AMDiS/lib/mtl4/boost/numeric/mtl/mtl_fwd.hpp | 46 +- .../boost/numeric/mtl/operation/adjoint.hpp | 8 +- .../numeric/mtl/operation/adjust_cursor.hpp | 10 +- .../mtl/operation/assign_each_nonzero.hpp | 16 +- .../numeric/mtl/operation/assign_mode.hpp | 10 +- .../numeric/mtl/operation/bin_op_expr.hpp | 6 +- .../boost/numeric/mtl/operation/cholesky.hpp | 166 +- .../boost/numeric/mtl/operation/clone.hpp | 28 +- .../mtl/operation/column_in_matrix.hpp | 24 +- .../numeric/mtl/operation/compute_factors.hpp | 20 +- .../numeric/mtl/operation/compute_summand.hpp | 16 +- .../mtl4/boost/numeric/mtl/operation/conj.hpp | 16 +- .../mtl4/boost/numeric/mtl/operation/copy.hpp | 76 +- .../boost/numeric/mtl/operation/copysign.hpp | 12 +- .../mtl4/boost/numeric/mtl/operation/crop.hpp | 8 +- .../boost/numeric/mtl/operation/cross.hpp | 16 +- .../boost/numeric/mtl/operation/cuppen.hpp | 20 +- .../mtl/operation/cursor_pseudo_dot.hpp | 18 +- .../boost/numeric/mtl/operation/diagonal.hpp | 14 +- .../numeric/mtl/operation/div_result.hpp | 6 +- .../boost/numeric/mtl/operation/divide_by.hpp | 28 +- .../mtl/operation/divide_by_inplace.hpp | 10 +- .../numeric/mtl/operation/dmat_dmat_mult.hpp | 224 +- .../mtl4/boost/numeric/mtl/operation/dot.hpp | 46 +- .../numeric/mtl/operation/eigenvalue.hpp | 106 +- .../mtl/operation/eigenvalue_symmetric.hpp | 18 +- .../element_structure_algorithms.hpp | 4 +- .../boost/numeric/mtl/operation/entry1D.hpp | 16 +- .../numeric/mtl/operation/entry_similar.hpp | 24 +- .../numeric/mtl/operation/evaluate_lazy.hpp | 10 +- .../mtl/operation/extended_complex.hpp | 22 +- .../mtl4/boost/numeric/mtl/operation/fill.hpp | 6 +- .../numeric/mtl/operation/frobenius_norm.hpp | 12 +- .../mtl4/boost/numeric/mtl/operation/fuse.hpp | 10 +- .../numeric/mtl/operation/fused_expr.hpp | 52 +- .../mtl/operation/fused_index_evaluator.hpp | 14 +- .../boost/numeric/mtl/operation/givens.hpp | 6 +- .../boost/numeric/mtl/operation/hermitian.hpp | 12 +- .../numeric/mtl/operation/hessenberg.hpp | 4 +- .../numeric/mtl/operation/householder.hpp | 12 +- .../mtl4/boost/numeric/mtl/operation/imag.hpp | 14 +- .../numeric/mtl/operation/index_evaluator.hpp | 16 +- .../numeric/mtl/operation/infinity_norm.hpp | 16 +- .../mtl4/boost/numeric/mtl/operation/inv.hpp | 16 +- .../numeric/mtl/operation/invert_diagonal.hpp | 18 +- .../mtl4/boost/numeric/mtl/operation/iota.hpp | 12 +- .../numeric/mtl/operation/is_negative.hpp | 10 +- .../mtl4/boost/numeric/mtl/operation/lazy.hpp | 20 +- .../numeric/mtl/operation/lazy_assign.hpp | 14 +- .../mtl/operation/left_scale_inplace.hpp | 16 +- .../mtl/operation/look_at_each_nonzero.hpp | 36 +- .../numeric/mtl/operation/lower_trisolve.hpp | 60 +- .../mtl4/boost/numeric/mtl/operation/lu.hpp | 22 +- .../numeric/mtl/operation/make_sparse.hpp | 14 +- .../numeric/mtl/operation/make_tag_vector.hpp | 10 +- .../mtl/operation/mat_cvec_times_expr.hpp | 10 +- .../numeric/mtl/operation/mat_vec_mult.hpp | 94 +- .../numeric/mtl/operation/matrix_bracket.hpp | 16 +- .../mtl4/boost/numeric/mtl/operation/max.hpp | 10 +- .../numeric/mtl/operation/max_abs_pos.hpp | 16 +- .../numeric/mtl/operation/max_of_sums.hpp | 10 +- .../boost/numeric/mtl/operation/max_pos.hpp | 22 +- .../mtl/operation/merge_complex_matrix.hpp | 10 +- .../mtl/operation/merge_complex_vector.hpp | 10 +- .../mtl4/boost/numeric/mtl/operation/min.hpp | 12 +- .../boost/numeric/mtl/operation/min_pos.hpp | 14 +- .../mtl/operation/minimal_increase.hpp | 14 +- .../mtl4/boost/numeric/mtl/operation/mult.hpp | 42 +- .../mtl/operation/mult_assign_mode.hpp | 40 +- .../numeric/mtl/operation/mult_result.hpp | 48 +- .../numeric/mtl/operation/mult_specialize.hpp | 6 +- .../mtl/operation/multi_action_block.hpp | 12 +- .../boost/numeric/mtl/operation/no_op.hpp | 6 +- .../boost/numeric/mtl/operation/norms.hpp | 6 +- .../boost/numeric/mtl/operation/num_cols.hpp | 16 +- .../boost/numeric/mtl/operation/num_rows.hpp | 16 +- .../boost/numeric/mtl/operation/one_norm.hpp | 20 +- .../mtl4/boost/numeric/mtl/operation/ones.hpp | 10 +- .../boost/numeric/mtl/operation/operators.hpp | 22 +- .../mtl/operation/opteron/matrix_mult.hpp | 40 +- .../mtl4/boost/numeric/mtl/operation/orth.hpp | 16 +- .../boost/numeric/mtl/operation/print.hpp | 20 +- .../numeric/mtl/operation/print_matrix.hpp | 10 +- .../numeric/mtl/operation/print_size.hpp | 22 +- .../numeric/mtl/operation/print_vector.hpp | 16 +- .../boost/numeric/mtl/operation/product.hpp | 12 +- .../mtl4/boost/numeric/mtl/operation/qr.hpp | 12 +- .../boost/numeric/mtl/operation/qr_givens.hpp | 72 +- .../boost/numeric/mtl/operation/random.hpp | 26 +- .../numeric/mtl/operation/rank_one_update.hpp | 14 +- .../numeric/mtl/operation/rank_two_update.hpp | 6 +- .../boost/numeric/mtl/operation/raw_copy.hpp | 8 +- .../mtl4/boost/numeric/mtl/operation/real.hpp | 18 +- .../boost/numeric/mtl/operation/resource.hpp | 10 +- .../mtl/operation/right_scale_inplace.hpp | 8 +- .../numeric/mtl/operation/row_in_matrix.hpp | 26 +- .../boost/numeric/mtl/operation/rscale.hpp | 32 +- .../numeric/mtl/operation/rvec_mat_mult.hpp | 50 +- .../boost/numeric/mtl/operation/scale.hpp | 26 +- .../boost/numeric/mtl/operation/secular.hpp | 26 +- .../numeric/mtl/operation/set_to_zero.hpp | 34 +- .../boost/numeric/mtl/operation/sfunctor.hpp | 56 +- .../numeric/mtl/operation/shift_block.hpp | 8 +- .../mtl/operation/shift_block_detail.hpp | 14 +- .../boost/numeric/mtl/operation/signum.hpp | 10 +- .../mtl4/boost/numeric/mtl/operation/size.hpp | 18 +- .../boost/numeric/mtl/operation/size1D.hpp | 12 +- .../numeric/mtl/operation/smat_dmat_mult.hpp | 104 +- .../numeric/mtl/operation/smat_smat_mult.hpp | 102 +- .../boost/numeric/mtl/operation/solve.hpp | 10 +- .../mtl4/boost/numeric/mtl/operation/sort.hpp | 192 +- .../mtl/operation/split_complex_matrix.hpp | 14 +- .../mtl/operation/split_complex_vector.hpp | 10 +- .../numeric/mtl/operation/squared_abs.hpp | 14 +- .../numeric/mtl/operation/static_num_cols.hpp | 46 +- .../numeric/mtl/operation/static_num_rows.hpp | 46 +- .../numeric/mtl/operation/static_size.hpp | 10 +- .../mtl/operation/std_output_operator.hpp | 10 +- .../numeric/mtl/operation/sub_matrix.hpp | 38 +- .../mtl4/boost/numeric/mtl/operation/sum.hpp | 10 +- .../mtl4/boost/numeric/mtl/operation/svd.hpp | 14 +- .../boost/numeric/mtl/operation/swap_row.hpp | 14 +- .../boost/numeric/mtl/operation/tfunctor.hpp | 6 +- .../numeric/mtl/operation/tfunctor_mixed.hpp | 66 +- .../boost/numeric/mtl/operation/trace.hpp | 8 +- .../boost/numeric/mtl/operation/trans.hpp | 14 +- .../boost/numeric/mtl/operation/two_norm.hpp | 14 +- .../boost/numeric/mtl/operation/unary_dot.hpp | 12 +- .../boost/numeric/mtl/operation/unroll.hpp | 16 +- .../boost/numeric/mtl/operation/update.hpp | 42 +- .../numeric/mtl/operation/upper_trisolve.hpp | 32 +- .../lib/mtl4/boost/numeric/mtl/operations.hpp | 6 +- .../numeric/mtl/recursion/base_case_cast.hpp | 6 +- .../mtl/recursion/base_case_matrix.hpp | 6 +- .../numeric/mtl/recursion/base_case_test.hpp | 16 +- .../numeric/mtl/recursion/bit_masking.hpp | 14 +- .../numeric/mtl/recursion/dim_splitter.hpp | 22 +- .../boost/numeric/mtl/recursion/for_each.hpp | 6 +- .../mtl/recursion/matrix_recursator.hpp | 66 +- .../mtl/recursion/predefined_masks.hpp | 8 +- .../recursion/simplify_base_case_matrix.hpp | 28 +- .../boost/numeric/mtl/recursion/utility.hpp | 8 +- AMDiS/lib/mtl4/boost/numeric/mtl/types.hpp | 6 +- .../boost/numeric/mtl/utility/add_const.hpp | 12 +- .../mtl/utility/algebraic_category.hpp | 12 +- .../mtl4/boost/numeric/mtl/utility/ashape.hpp | 48 +- .../boost/numeric/mtl/utility/category.hpp | 72 +- .../numeric/mtl/utility/common_include.hpp | 6 +- .../boost/numeric/mtl/utility/complexity.hpp | 92 +- .../numeric/mtl/utility/compose_view.hpp | 10 +- .../copy_expression_const_ref_container.hpp | 14 +- .../numeric/mtl/utility/dense_el_cursor.hpp | 12 +- .../mtl/utility/different_non_complex.hpp | 12 +- .../mtl4/boost/numeric/mtl/utility/domain.hpp | 10 +- .../boost/numeric/mtl/utility/enable_if.hpp | 10 +- .../mtl4/boost/numeric/mtl/utility/eval.hpp | 38 +- .../boost/numeric/mtl/utility/eval_dense.hpp | 34 +- .../boost/numeric/mtl/utility/exception.hpp | 10 +- .../numeric/mtl/utility/extended_complex.hpp | 14 +- .../mtl/utility/fast_multi_vector_expr.hpp | 24 +- .../boost/numeric/mtl/utility/flatcat.hpp | 16 +- .../boost/numeric/mtl/utility/glas_tag.hpp | 6 +- .../boost/numeric/mtl/utility/gradient.hpp | 14 +- .../numeric/mtl/utility/index_evaluatable.hpp | 26 +- .../numeric/mtl/utility/index_evaluator.hpp | 14 +- .../mtl4/boost/numeric/mtl/utility/irange.hpp | 22 +- .../mtl/utility/is_composable_vector.hpp | 12 +- .../numeric/mtl/utility/is_distributed.hpp | 18 +- .../boost/numeric/mtl/utility/is_lazy.hpp | 14 +- .../mtl/utility/is_multi_vector_expr.hpp | 34 +- .../numeric/mtl/utility/is_row_major.hpp | 12 +- .../boost/numeric/mtl/utility/is_static.hpp | 10 +- .../mtl/utility/is_vector_reduction.hpp | 10 +- .../boost/numeric/mtl/utility/is_what.hpp | 38 +- .../mtl4/boost/numeric/mtl/utility/iset.hpp | 24 +- .../numeric/mtl/utility/iterator_adaptor.hpp | 10 +- .../mtl/utility/iterator_adaptor_1D.hpp | 8 +- .../mtl/utility/iterator_adaptor_detail.hpp | 20 +- .../numeric/mtl/utility/linear_operator.hpp | 14 +- .../numeric/mtl/utility/lu_matrix_type.hpp | 12 +- .../mtl/utility/make_copy_or_reference.hpp | 10 +- .../mtl4/boost/numeric/mtl/utility/maybe.hpp | 32 +- .../boost/numeric/mtl/utility/multi_tmp.hpp | 20 +- .../numeric/mtl/utility/omp_size_type.hpp | 12 +- .../mtl4/boost/numeric/mtl/utility/papi.hpp | 34 +- .../boost/numeric/mtl/utility/parameters.hpp | 16 +- .../boost/numeric/mtl/utility/pos_type.hpp | 10 +- .../numeric/mtl/utility/property_map.hpp | 50 +- .../numeric/mtl/utility/property_map_impl.hpp | 104 +- .../mtl/utility/push_back_comma_inserter.hpp | 10 +- .../numeric/mtl/utility/range_generator.hpp | 48 +- .../numeric/mtl/utility/range_wrapper.hpp | 32 +- .../mtl4/boost/numeric/mtl/utility/root.hpp | 22 +- .../numeric/mtl/utility/shrink_stl_vector.hpp | 10 +- .../numeric/mtl/utility/sometimes_data.hpp | 10 +- .../mtl4/boost/numeric/mtl/utility/srange.hpp | 16 +- .../numeric/mtl/utility/static_assert.hpp | 10 +- .../mtl/utility/strided_dense_el_cursor.hpp | 12 +- .../mtl/utility/strided_dense_el_iterator.hpp | 14 +- .../numeric/mtl/utility/string_to_enum.hpp | 8 +- .../mtl4/boost/numeric/mtl/utility/tag.hpp | 46 +- .../mtl/utility/transposed_matrix_type.hpp | 10 +- .../mtl/utility/transposed_orientation.hpp | 18 +- .../boost/numeric/mtl/utility/true_copy.hpp | 10 +- .../numeric/mtl/utility/unroll_size1.hpp | 10 +- .../mtl/utility/updater_to_assigner.hpp | 12 +- .../boost/numeric/mtl/utility/view_code.hpp | 14 +- .../numeric/mtl/utility/viewed_collection.hpp | 10 +- .../numeric/mtl/utility/with_unroll1.hpp | 10 +- .../numeric/mtl/utility/wrapped_object.hpp | 10 +- .../boost/numeric/mtl/utility/zipped_sort.hpp | 34 +- .../boost/numeric/mtl/vector/all_vec_expr.hpp | 6 +- .../numeric/mtl/vector/assign_expression.hpp | 16 +- .../boost/numeric/mtl/vector/assigner.hpp | 10 +- .../numeric/mtl/vector/crtp_base_vector.hpp | 60 +- .../boost/numeric/mtl/vector/decrementer.hpp | 10 +- .../boost/numeric/mtl/vector/dense_vector.hpp | 60 +- .../boost/numeric/mtl/vector/dimension.hpp | 8 +- .../mtl/vector/dot_index_evaluator.hpp | 30 +- .../boost/numeric/mtl/vector/extracter.hpp | 32 +- .../boost/numeric/mtl/vector/incrementer.hpp | 10 +- .../boost/numeric/mtl/vector/inserter.hpp | 16 +- .../numeric/mtl/vector/lazy_reduction.hpp | 14 +- .../boost/numeric/mtl/vector/map_view.hpp | 76 +- .../numeric/mtl/vector/mapped_inserter.hpp | 16 +- .../mtl/vector/mat_cvec_multiplier.hpp | 14 +- .../boost/numeric/mtl/vector/parameter.hpp | 10 +- .../boost/numeric/mtl/vector/reduction.hpp | 34 +- .../numeric/mtl/vector/reduction_functors.hpp | 24 +- .../mtl/vector/reduction_index_evaluator.hpp | 26 +- .../vector/row_mat_cvec_index_evaluator.hpp | 16 +- .../mtl/vector/rvec_mat_times_expr.hpp | 10 +- .../numeric/mtl/vector/sparse_vector.hpp | 32 +- .../numeric/mtl/vector/strided_vector_ref.hpp | 30 +- .../boost/numeric/mtl/vector/unit_vector.hpp | 12 +- .../boost/numeric/mtl/vector/unrolled1.hpp | 12 +- .../numeric/mtl/vector/vec_const_ref_expr.hpp | 6 +- .../boost/numeric/mtl/vector/vec_expr.hpp | 6 +- .../numeric/mtl/vector/vec_negate_expr.hpp | 6 +- .../numeric/mtl/vector/vec_scal_aop_expr.hpp | 24 +- .../numeric/mtl/vector/vec_scal_asgn_expr.hpp | 8 +- .../mtl/vector/vec_scal_div_asgn_expr.hpp | 6 +- .../mtl/vector/vec_scal_minus_asgn_expr.hpp | 12 +- .../mtl/vector/vec_scal_mixed_expr.hpp | 10 +- .../mtl/vector/vec_scal_plus_asgn_expr.hpp | 12 +- .../mtl/vector/vec_scal_times_asgn_expr.hpp | 8 +- .../numeric/mtl/vector/vec_vec_aop_expr.hpp | 28 +- .../numeric/mtl/vector/vec_vec_asgn_expr.hpp | 8 +- .../mtl/vector/vec_vec_div_asgn_expr.hpp | 8 +- .../mtl/vector/vec_vec_ele_prod_expr.hpp | 12 +- .../mtl/vector/vec_vec_ele_quot_expr.hpp | 12 +- .../mtl/vector/vec_vec_minus_asgn_expr.hpp | 8 +- .../numeric/mtl/vector/vec_vec_minus_expr.hpp | 8 +- .../numeric/mtl/vector/vec_vec_op_expr.hpp | 16 +- .../mtl/vector/vec_vec_plus_asgn_expr.hpp | 8 +- .../numeric/mtl/vector/vec_vec_plus_expr.hpp | 8 +- .../numeric/mtl/vector/vec_vec_pmop_expr.hpp | 14 +- .../mtl/vector/vec_vec_times_asgn_expr.hpp | 8 +- AMDiS/lib/mtl4/boost/numeric/mtl/vectors.hpp | 6 +- .../lib/mtl4/tools/cmake/C++11Features.cmake | 2 +- AMDiS/lib/mtl4/tools/cmake/INITLIST_CHECK.cpp | 4 +- AMDiS/lib/mtl4/tools/cmake/MTLCommon.cmake | 4 +- AMDiS/lib/mtl4/tools/cmake/Vampir.cmake | 4 +- .../lib/mtl4/tools/license/insert_license.py | 4 +- AMDiS/lib/mtl4/tools/license/license.mtl.txt | 56 +- .../lib/mtl4/tools/license/license.short.txt | 4 +- .../mtl4/tools/vampir/make_vampir_groups.py | 2 +- AMDiS/lib/muparser_v134/Changes.txt | 84 +- AMDiS/lib/muparser_v134/Credits.txt | 20 +- AMDiS/lib/muparser_v134/Install.txt | 12 +- AMDiS/lib/muparser_v134/License.txt | 26 +- AMDiS/lib/muparser_v134/Makefile.in | 30 +- .../muparser_v134/build/autoconf/aclocal.m4 | 2 +- .../build/autoconf/bakefile-presets.m4 | 2 +- .../muparser_v134/build/bakefiles/howto.txt | 6 +- AMDiS/lib/muparser_v134/build/makefile.bcc | 32 +- AMDiS/lib/muparser_v134/build/makefile.mingw | 40 +- AMDiS/lib/muparser_v134/build/makefile.vc | 48 +- AMDiS/lib/muparser_v134/build/makefile.wat | 38 +- .../build/msvc2003/muparser_example1.vcproj | 4 +- .../build/msvc2003/muparser_example2.vcproj | 4 +- .../build/msvc2003/muparser_muParser.vcproj | 4 +- .../build/msvc2005/muparser_example1.vcproj | 6 +- .../build/msvc2005/muparser_example2.vcproj | 6 +- .../build/msvc2005/muparser_muParser.vcproj | 6 +- .../build/msvc2008/muparser_example2.vcproj | 6 +- AMDiS/lib/muparser_v134/docs/Doxyfile | 1308 +- AMDiS/lib/muparser_v134/docs/html/index.html | 92 +- .../lib/muparser_v134/docs/html/misc/calc.cpp | 20 +- .../muparser_v134/docs/html/mup_features.html | 74 +- .../docs/html/mup_interface.html | 344 +- .../muparser_v134/docs/html/mup_intro.html | 92 +- .../muparser_v134/docs/html/mup_licence.html | 38 +- .../muparser_v134/docs/html/mup_links.html | 42 +- .../muparser_v134/docs/html/mup_locale.html | 44 +- .../muparser_v134/docs/html/mup_usage.html | 58 +- .../muparser_v134/docs/html/mup_version.html | 100 +- .../docs/html/script/functions.js | 4 +- .../docs/html/sources/mup_features.html | 36 +- .../docs/html/sources/mup_interface.html | 306 +- .../docs/html/sources/mup_intro.html | 54 +- .../docs/html/sources/mup_links.html | 4 +- .../docs/html/sources/mup_locale.html | 6 +- .../docs/html/sources/mup_usage.html | 20 +- .../docs/html/sources/mup_version.html | 62 +- .../docs/html/sources/navigation.html | 38 +- .../muparser_v134/docs/html/style/formate.css | 20 +- AMDiS/lib/muparser_v134/include/muParser.h | 48 +- .../lib/muparser_v134/include/muParserBase.h | 100 +- .../muparser_v134/include/muParserBytecode.h | 46 +- .../muparser_v134/include/muParserCallback.h | 42 +- .../muparser_v134/include/muParserComplex.h | 32 +- AMDiS/lib/muparser_v134/include/muParserDLL.h | 80 +- AMDiS/lib/muparser_v134/include/muParserDef.h | 60 +- .../lib/muparser_v134/include/muParserError.h | 50 +- .../lib/muparser_v134/include/muParserFixes.h | 24 +- AMDiS/lib/muparser_v134/include/muParserInt.h | 30 +- .../lib/muparser_v134/include/muParserStack.h | 66 +- .../lib/muparser_v134/include/muParserTest.h | 64 +- .../lib/muparser_v134/include/muParserToken.h | 94 +- .../include/muParserTokenReader.h | 46 +- .../samples/example1/Example1.cpp | 54 +- .../muparser_v134/samples/example2/Readme.txt | 2 +- .../muparser_v134/samples/example2/example2.c | 50 +- AMDiS/lib/muparser_v134/src/muParser.cpp | 94 +- AMDiS/lib/muparser_v134/src/muParserBase.cpp | 326 +- .../muparser_v134/src/muParserBytecode.cpp | 118 +- .../muparser_v134/src/muParserCallback.cpp | 84 +- .../lib/muparser_v134/src/muParserComplex.cpp | 66 +- AMDiS/lib/muparser_v134/src/muParserDLL.cpp | 120 +- AMDiS/lib/muparser_v134/src/muParserError.cpp | 56 +- AMDiS/lib/muparser_v134/src/muParserInt.cpp | 68 +- AMDiS/lib/muparser_v134/src/muParserTest.cpp | 180 +- .../muparser_v134/src/muParserTokenReader.cpp | 162 +- AMDiS/other/include/Makefile_AMDiS.mk | 16 +- AMDiS/other/macro/macro.stand.1d | 8 +- AMDiS/other/macro/macro.stand.2d | 24 +- AMDiS/other/macro/macro.stand.3d | 4 +- AMDiS/other/scripts/changeToRevision/README | 4 +- .../changeToRevision/applyChanges4Rev1210 | 4 +- .../changeToRevision/applyChanges4Rev1231 | 10 +- .../changeToRevision/applyChangesToRelease0.9 | 8 +- .../changeToRevision/updateGET_PARAMETER.gawk | 32 +- AMDiS/other/scripts/schedule | 2 +- AMDiS/src/AMDiS.cc | 36 +- AMDiS/src/AMDiS_fwd.h | 42 +- AMDiS/src/AbstractFunction.h | 110 +- AMDiS/src/AdaptBase.cc | 4 +- AMDiS/src/AdaptBase.h | 34 +- AMDiS/src/AdaptInfo.cc | 32 +- AMDiS/src/AdaptInfo.h | 456 +- AMDiS/src/AdaptInstationary.cc | 88 +- AMDiS/src/AdaptInstationary.h | 44 +- AMDiS/src/AdaptStationary.cc | 18 +- AMDiS/src/AdaptStationary.h | 8 +- AMDiS/src/Assembler.cc | 120 +- AMDiS/src/Assembler.h | 78 +- AMDiS/src/BallProject.h | 12 +- AMDiS/src/BasisFunction.cc | 16 +- AMDiS/src/BasisFunction.h | 180 +- AMDiS/src/BasisFunction.hh | 12 +- AMDiS/src/Boundary.cc | 4 +- AMDiS/src/Boundary.h | 8 +- AMDiS/src/BoundaryCondition.h | 52 +- AMDiS/src/BoundaryManager.cc | 36 +- AMDiS/src/BoundaryManager.h | 20 +- AMDiS/src/BoundaryObject.cc | 40 +- AMDiS/src/BoundaryObject.h | 28 +- AMDiS/src/Bubble.cc | 338 +- AMDiS/src/Bubble.h | 158 +- AMDiS/src/CoarseningManager.cc | 14 +- AMDiS/src/CoarseningManager.h | 34 +- AMDiS/src/CoarseningManager1d.cc | 16 +- AMDiS/src/CoarseningManager1d.h | 18 +- AMDiS/src/CoarseningManager2d.cc | 46 +- AMDiS/src/CoarseningManager2d.h | 16 +- AMDiS/src/CoarseningManager3d.cc | 116 +- AMDiS/src/CoarseningManager3d.h | 32 +- AMDiS/src/Collection.h | 4 +- AMDiS/src/ComponentTraverseInfo.cc | 30 +- AMDiS/src/ComponentTraverseInfo.h | 66 +- AMDiS/src/Config.h | 22 +- AMDiS/src/Containers.h | 4 +- AMDiS/src/CouplingIterationInterface.cc | 12 +- AMDiS/src/CouplingIterationInterface.h | 4 +- AMDiS/src/CouplingProblemStat.h | 92 +- AMDiS/src/CouplingTimeInterface.h | 18 +- AMDiS/src/CreatorInterface.h | 34 +- AMDiS/src/CreatorMap.cc | 36 +- AMDiS/src/CreatorMap.h | 20 +- AMDiS/src/CreatorMap.hh | 6 +- AMDiS/src/CylinderProject.h | 10 +- AMDiS/src/DOFAdmin.cc | 106 +- AMDiS/src/DOFAdmin.h | 108 +- AMDiS/src/DOFContainer.h | 4 +- AMDiS/src/DOFIndexed.cc | 30 +- AMDiS/src/DOFIndexed.h | 60 +- AMDiS/src/DOFIterator.h | 192 +- AMDiS/src/DOFMatrix.cc | 132 +- AMDiS/src/DOFMatrix.h | 166 +- AMDiS/src/Debug.cc | 300 +- AMDiS/src/Debug.h | 76 +- AMDiS/src/DirichletBC.cc | 24 +- AMDiS/src/DirichletBC.h | 70 +- AMDiS/src/DualTraverse.cc | 24 +- AMDiS/src/DualTraverse.h | 48 +- AMDiS/src/ElInfo.cc | 40 +- AMDiS/src/ElInfo.h | 274 +- AMDiS/src/ElInfo1d.cc | 46 +- AMDiS/src/ElInfo1d.h | 14 +- AMDiS/src/ElInfo2d.cc | 182 +- AMDiS/src/ElInfo2d.h | 4 +- AMDiS/src/ElInfo3d.cc | 128 +- AMDiS/src/ElInfo3d.h | 24 +- AMDiS/src/ElInfoStack.cc | 14 +- AMDiS/src/ElInfoStack.h | 10 +- AMDiS/src/Element.cc | 136 +- AMDiS/src/Element.h | 178 +- AMDiS/src/Element.hh | 6 +- AMDiS/src/ElementData.cc | 22 +- AMDiS/src/ElementData.h | 36 +- AMDiS/src/ElementDofIterator.cc | 12 +- AMDiS/src/ElementDofIterator.h | 24 +- AMDiS/src/ElementFunction.h | 44 +- AMDiS/src/ElementInfo.h | 20 +- AMDiS/src/ElementRegion_ED.cc | 28 +- AMDiS/src/ElementRegion_ED.h | 38 +- AMDiS/src/EmptyElementData.h | 34 +- AMDiS/src/Error.h | 42 +- AMDiS/src/Expressions.h | 114 +- AMDiS/src/Expressions.hh | 96 +- AMDiS/src/FiniteElemSpace.cc | 32 +- AMDiS/src/FiniteElemSpace.h | 36 +- AMDiS/src/FirstOrderAssembler.cc | 76 +- AMDiS/src/FirstOrderAssembler.h | 32 +- AMDiS/src/FirstOrderTerm.cc | 328 +- AMDiS/src/FirstOrderTerm.h | 152 +- AMDiS/src/FixVec.cc | 8 +- AMDiS/src/FixVec.h | 156 +- AMDiS/src/FixVec.hh | 20 +- AMDiS/src/FixVecConvert.h | 6 +- AMDiS/src/Flag.h | 116 +- AMDiS/src/Functors.h | 20 +- AMDiS/src/GenericOperatorTerm.h | 4 +- AMDiS/src/Global.cc | 66 +- AMDiS/src/GlobalDOFNumbering.cc | 4 +- AMDiS/src/GlobalDOFNumbering.h | 6 +- AMDiS/src/GlobalElementNumbering.cc | 4 +- AMDiS/src/GlobalElementNumbering.h | 6 +- AMDiS/src/Initfile.cc | 48 +- AMDiS/src/Initfile.h | 178 +- AMDiS/src/Lagrange.cc | 1528 +- AMDiS/src/Lagrange.h | 382 +- AMDiS/src/LeafData.cc | 110 +- AMDiS/src/LeafData.h | 182 +- AMDiS/src/Line.cc | 8 +- AMDiS/src/Line.h | 70 +- AMDiS/src/LinearAlgebra.h | 98 +- AMDiS/src/MTL4Types.h | 6 +- AMDiS/src/MacroElement.cc | 30 +- AMDiS/src/MacroElement.h | 84 +- AMDiS/src/Marker.cc | 106 +- AMDiS/src/Marker.h | 70 +- AMDiS/src/MatrixVector.cc | 4 +- AMDiS/src/MatrixVector.h | 98 +- AMDiS/src/MatrixVectorOperations.h | 128 +- AMDiS/src/Mesh.cc | 274 +- AMDiS/src/Mesh.h | 380 +- AMDiS/src/MeshStructure.cc | 94 +- AMDiS/src/MeshStructure.h | 58 +- AMDiS/src/MeshStructure_ED.h | 20 +- AMDiS/src/OpenMP.h | 6 +- AMDiS/src/Operator.cc | 48 +- AMDiS/src/Operator.h | 128 +- AMDiS/src/Operator.hh | 4 +- AMDiS/src/OperatorTerm.cc | 6 +- AMDiS/src/OperatorTerm.h | 52 +- AMDiS/src/OperatorTerm.hh | 14 +- AMDiS/src/Parametric.cc | 22 +- AMDiS/src/Parametric.h | 22 +- AMDiS/src/PeriodicBC.cc | 58 +- AMDiS/src/PeriodicBC.h | 10 +- AMDiS/src/PeriodicConnection.h | 18 +- AMDiS/src/PeriodicInfo.h | 8 +- AMDiS/src/ProblemInstat.cc | 40 +- AMDiS/src/ProblemInstat.h | 52 +- AMDiS/src/ProblemInterpol.cc | 28 +- AMDiS/src/ProblemInterpol.h | 4 +- AMDiS/src/ProblemIterationInterface.h | 12 +- AMDiS/src/ProblemStat.cc | 492 +- AMDiS/src/ProblemStat.h | 238 +- AMDiS/src/ProblemStatBase.h | 28 +- AMDiS/src/ProblemStatDbg.cc | 74 +- AMDiS/src/ProblemStatDbg.h | 6 +- AMDiS/src/ProblemTimeInterface.h | 12 +- AMDiS/src/Projection.cc | 4 +- AMDiS/src/Projection.h | 22 +- AMDiS/src/QPInfo.cc | 44 +- AMDiS/src/QPInfo.h | 22 +- AMDiS/src/QPsiPhi.cc | 180 +- AMDiS/src/QPsiPhi.h | 248 +- AMDiS/src/Quadrature.cc | 100 +- AMDiS/src/Quadrature.h | 194 +- AMDiS/src/Quadrature.hh | 12 +- AMDiS/src/RCNeighbourList.cc | 84 +- AMDiS/src/RCNeighbourList.h | 94 +- AMDiS/src/Recovery.cc | 126 +- AMDiS/src/Recovery.h | 114 +- AMDiS/src/RefinementManager.cc | 44 +- AMDiS/src/RefinementManager.h | 42 +- AMDiS/src/RefinementManager1d.cc | 32 +- AMDiS/src/RefinementManager1d.h | 6 +- AMDiS/src/RefinementManager2d.cc | 74 +- AMDiS/src/RefinementManager2d.h | 12 +- AMDiS/src/RefinementManager3d.cc | 208 +- AMDiS/src/RefinementManager3d.h | 26 +- AMDiS/src/RobinBC.cc | 66 +- AMDiS/src/RobinBC.h | 12 +- AMDiS/src/ScalableQuadrature.cc | 12 +- AMDiS/src/ScalableQuadrature.h | 32 +- AMDiS/src/SecondOrderAssembler.cc | 54 +- AMDiS/src/SecondOrderAssembler.h | 28 +- AMDiS/src/SecondOrderTerm.cc | 406 +- AMDiS/src/SecondOrderTerm.h | 192 +- AMDiS/src/Serializable.h | 10 +- AMDiS/src/Serializer.cc | 4 +- AMDiS/src/Serializer.h | 34 +- AMDiS/src/StandardProblemIteration.cc | 12 +- AMDiS/src/StandardProblemIteration.h | 8 +- AMDiS/src/SubAssembler.cc | 26 +- AMDiS/src/SubAssembler.h | 72 +- AMDiS/src/SubAssembler.hh | 32 +- AMDiS/src/SubElInfo.cc | 16 +- AMDiS/src/SubElInfo.h | 42 +- AMDiS/src/SubQuadrature.cc | 4 +- AMDiS/src/SubQuadrature.h | 14 +- AMDiS/src/SurfaceAssembler.h | 28 +- AMDiS/src/SurfaceOperator.h | 38 +- AMDiS/src/SurfaceQuadrature.cc | 8 +- AMDiS/src/SurfaceQuadrature.h | 6 +- AMDiS/src/SurfaceRegion_ED.cc | 32 +- AMDiS/src/SurfaceRegion_ED.h | 48 +- AMDiS/src/SystemVector.cc | 8 +- AMDiS/src/SystemVector.h | 102 +- AMDiS/src/Tetrahedron.cc | 82 +- AMDiS/src/Tetrahedron.h | 100 +- AMDiS/src/TimedObject.h | 20 +- AMDiS/src/Timer.cc | 10 +- AMDiS/src/Timer.h | 6 +- AMDiS/src/Traits.h | 80 +- AMDiS/src/TransformDOF.h | 66 +- AMDiS/src/Traverse.cc | 180 +- AMDiS/src/Traverse.h | 52 +- AMDiS/src/Triangle.cc | 52 +- AMDiS/src/Triangle.h | 64 +- AMDiS/src/VertexInfo.h | 18 +- AMDiS/src/VertexVector.cc | 16 +- AMDiS/src/VertexVector.h | 22 +- AMDiS/src/ZeroOrderAssembler.cc | 58 +- AMDiS/src/ZeroOrderAssembler.h | 24 +- AMDiS/src/ZeroOrderTerm.cc | 372 +- AMDiS/src/ZeroOrderTerm.h | 206 +- AMDiS/src/compositeFEM/CFE_Integration.cc | 56 +- AMDiS/src/compositeFEM/CFE_Integration.h | 14 +- .../src/compositeFEM/CFE_NormAndErrorFcts.cc | 276 +- AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.h | 52 +- AMDiS/src/compositeFEM/CompositeFEMMethods.cc | 14 +- AMDiS/src/compositeFEM/CompositeFEMMethods.h | 6 +- .../src/compositeFEM/CompositeFEMOperator.cc | 104 +- AMDiS/src/compositeFEM/CompositeFEMOperator.h | 38 +- AMDiS/src/compositeFEM/ElementLevelSet.cc | 50 +- AMDiS/src/compositeFEM/ElementLevelSet.h | 114 +- AMDiS/src/compositeFEM/LevelSetAdaptMesh.cc | 64 +- AMDiS/src/compositeFEM/LevelSetAdaptMesh.h | 18 +- AMDiS/src/compositeFEM/PenaltyOperator.cc | 58 +- AMDiS/src/compositeFEM/PenaltyOperator.h | 36 +- AMDiS/src/compositeFEM/SubElementAssembler.cc | 46 +- AMDiS/src/compositeFEM/SubElementAssembler.h | 32 +- AMDiS/src/compositeFEM/SubPolytope.cc | 96 +- AMDiS/src/compositeFEM/SubPolytope.h | 64 +- AMDiS/src/compositeFEM/TranslateLsFct.h | 10 +- AMDiS/src/compositeFEM/compositeFEM.h | 4 +- AMDiS/src/config/Config_clang.h | 4 +- AMDiS/src/config/Config_defaults.h | 4 +- AMDiS/src/config/Config_gcc.h | 4 +- AMDiS/src/config/Config_intel.h | 4 +- AMDiS/src/config/Config_msc.h | 4 +- AMDiS/src/config/Config_pgi.h | 4 +- AMDiS/src/deprecated/MathFunctions.h | 16 +- AMDiS/src/deprecated/ProblemImplicit.cc | 58 +- AMDiS/src/deprecated/ProblemImplicit.h | 26 +- AMDiS/src/est/Estimator.cc | 20 +- AMDiS/src/est/Estimator.h | 110 +- AMDiS/src/est/RecoveryEstimator.cc | 54 +- AMDiS/src/est/RecoveryEstimator.h | 10 +- AMDiS/src/est/ResidualEstimator.cc | 222 +- AMDiS/src/est/ResidualEstimator.h | 32 +- AMDiS/src/est/SimpleResidualEstimator.cc | 112 +- AMDiS/src/est/SimpleResidualEstimator.h | 34 +- AMDiS/src/expressions/LazyOperatorTerm.h | 60 +- AMDiS/src/expressions/add_expr.hpp | 52 +- AMDiS/src/expressions/cmath_expr.hpp | 248 +- AMDiS/src/expressions/coords_expr.hpp | 142 +- AMDiS/src/expressions/diff_expr.hpp | 350 +- AMDiS/src/expressions/expr_traits.hpp | 56 +- AMDiS/src/expressions/expressions.h | 4 +- AMDiS/src/expressions/functor_expr.hpp | 174 +- AMDiS/src/expressions/gradientOf.hpp | 148 +- AMDiS/src/expressions/hessianOf.hpp | 78 +- AMDiS/src/expressions/mult_expr.hpp | 54 +- AMDiS/src/expressions/simplify_expr.hpp | 806 +- AMDiS/src/expressions/value_expr.hpp | 162 +- AMDiS/src/expressions/vec_functors.hpp | 194 +- AMDiS/src/io/Arh2Reader.cc | 88 +- AMDiS/src/io/Arh2Reader.h | 72 +- AMDiS/src/io/Arh2Writer.cc | 44 +- AMDiS/src/io/Arh2Writer.h | 46 +- AMDiS/src/io/Arh3Reader.cc | 104 +- AMDiS/src/io/Arh3Reader.h | 72 +- AMDiS/src/io/Arh3Writer.cc | 44 +- AMDiS/src/io/Arh3Writer.h | 42 +- AMDiS/src/io/ArhReader.cc | 40 +- AMDiS/src/io/ArhReader.h | 64 +- AMDiS/src/io/ArhWriter.cc | 36 +- AMDiS/src/io/ArhWriter.h | 34 +- AMDiS/src/io/DataCollector.h | 22 +- AMDiS/src/io/DataCollector.hh | 120 +- AMDiS/src/io/DofWriter.cc | 36 +- AMDiS/src/io/DofWriter.h | 38 +- AMDiS/src/io/ElementFileWriter.cc | 68 +- AMDiS/src/io/ElementFileWriter.h | 22 +- AMDiS/src/io/FileCompression.h | 4 +- AMDiS/src/io/FileWriter.cc | 36 +- AMDiS/src/io/FileWriter.h | 60 +- AMDiS/src/io/FileWriter.hh | 42 +- AMDiS/src/io/FileWriterInterface.cc | 20 +- AMDiS/src/io/FileWriterInterface.h | 36 +- AMDiS/src/io/GNUPlotWriter.cc | 22 +- AMDiS/src/io/GNUPlotWriter.h | 50 +- AMDiS/src/io/GridWriter.h | 18 +- AMDiS/src/io/GridWriter.hh | 80 +- AMDiS/src/io/MacroInfo.cc | 90 +- AMDiS/src/io/MacroInfo.h | 20 +- AMDiS/src/io/MacroReader.cc | 436 +- AMDiS/src/io/MacroReader.h | 42 +- AMDiS/src/io/MacroWriter.cc | 46 +- AMDiS/src/io/MacroWriter.h | 8 +- AMDiS/src/io/PngReader.cc | 12 +- AMDiS/src/io/PngReader.h | 18 +- AMDiS/src/io/PngWriter.cc | 34 +- AMDiS/src/io/PngWriter.h | 12 +- AMDiS/src/io/PovrayWriter.cc | 96 +- AMDiS/src/io/PovrayWriter.h | 12 +- AMDiS/src/io/Reader.h | 38 +- AMDiS/src/io/Spreadsheet.cc | 12 +- AMDiS/src/io/Spreadsheet.h | 12 +- AMDiS/src/io/ValueReader.cc | 8 +- AMDiS/src/io/ValueReader.h | 16 +- AMDiS/src/io/ValueWriter.cc | 14 +- AMDiS/src/io/ValueWriter.h | 4 +- AMDiS/src/io/VtkReader.h | 54 +- AMDiS/src/io/VtkReader.hh | 78 +- AMDiS/src/io/VtkVectorWriter.cc | 12 +- AMDiS/src/io/VtkVectorWriter.h | 28 +- AMDiS/src/io/VtkWriter.cc | 58 +- AMDiS/src/io/VtkWriter.h | 60 +- AMDiS/src/io/Writer.h | 40 +- AMDiS/src/io/XYZReader.cc | 18 +- AMDiS/src/io/XYZReader.h | 14 +- AMDiS/src/io/detail/Arh2Reader.cc | 156 +- AMDiS/src/io/detail/Arh2Reader.h | 46 +- AMDiS/src/io/detail/Arh2Writer.cc | 130 +- AMDiS/src/io/detail/Arh2Writer.h | 28 +- AMDiS/src/io/detail/Arh3Reader.cc | 244 +- AMDiS/src/io/detail/Arh3Reader.h | 62 +- AMDiS/src/io/detail/Arh3Writer.cc | 280 +- AMDiS/src/io/detail/Arh3Writer.h | 72 +- AMDiS/src/io/detail/ArhReader.cc | 20 +- AMDiS/src/io/detail/ArhReader.h | 10 +- AMDiS/src/io/detail/ArhWriter.cc | 36 +- AMDiS/src/io/detail/ArhWriter.h | 18 +- AMDiS/src/io/detail/PngReader.h | 12 +- AMDiS/src/io/detail/ReaderWriter.h | 58 +- AMDiS/src/io/detail/VtkReader.h | 100 +- AMDiS/src/io/detail/VtkVectorWriter.h | 18 +- AMDiS/src/io/detail/VtkVectorWriter.hh | 78 +- AMDiS/src/io/detail/VtkWriter.cc | 90 +- AMDiS/src/io/detail/VtkWriter.h | 124 +- AMDiS/src/io/detail/VtkWriter.hh | 186 +- AMDiS/src/nonlin/Newton.h | 28 +- AMDiS/src/nonlin/NewtonArmijo.h | 30 +- AMDiS/src/nonlin/NonLinSolver.h | 42 +- AMDiS/src/nonlin/ProblemNonLin.cc | 16 +- AMDiS/src/nonlin/ProblemNonLin.h | 20 +- AMDiS/src/operations/functors.hpp | 52 +- AMDiS/src/operations/meta.hpp | 48 +- AMDiS/src/operations/norm.hpp | 86 +- AMDiS/src/operations/product.hpp | 142 +- AMDiS/src/parallel/BddcMlSolver.cc | 62 +- AMDiS/src/parallel/BddcMlSolver.h | 18 +- AMDiS/src/parallel/CheckerPartitioner.cc | 64 +- AMDiS/src/parallel/CheckerPartitioner.h | 4 +- AMDiS/src/parallel/DofComm.cc | 38 +- AMDiS/src/parallel/DofComm.h | 38 +- AMDiS/src/parallel/ElementObjectDatabase.cc | 294 +- AMDiS/src/parallel/ElementObjectDatabase.h | 82 +- AMDiS/src/parallel/InteriorBoundary.cc | 170 +- AMDiS/src/parallel/InteriorBoundary.h | 50 +- AMDiS/src/parallel/MatrixNnzStructure.cc | 112 +- AMDiS/src/parallel/MatrixNnzStructure.h | 10 +- AMDiS/src/parallel/MeshDistributor.cc | 768 +- AMDiS/src/parallel/MeshDistributor.h | 268 +- AMDiS/src/parallel/MeshLevelData.cc | 32 +- AMDiS/src/parallel/MeshLevelData.h | 28 +- AMDiS/src/parallel/MeshManipulation.cc | 112 +- AMDiS/src/parallel/MeshManipulation.h | 14 +- AMDiS/src/parallel/MeshPartitioner.cc | 36 +- AMDiS/src/parallel/MeshPartitioner.h | 24 +- AMDiS/src/parallel/MpiHelper.cc | 8 +- AMDiS/src/parallel/MpiHelper.h | 32 +- AMDiS/src/parallel/MtlFetiPrimalSolver.h | 12 +- AMDiS/src/parallel/PITL_Solver.h | 18 +- AMDiS/src/parallel/ParMetisPartitioner.h | 64 +- .../src/parallel/ParallelCoarseSpaceSolver.cc | 84 +- .../src/parallel/ParallelCoarseSpaceSolver.h | 66 +- AMDiS/src/parallel/ParallelDebug.cc | 318 +- AMDiS/src/parallel/ParallelDebug.h | 48 +- AMDiS/src/parallel/ParallelDofMapping.cc | 146 +- AMDiS/src/parallel/ParallelDofMapping.h | 152 +- AMDiS/src/parallel/ParallelMapper.h | 46 +- AMDiS/src/parallel/ParallelProblemStat.cc | 66 +- AMDiS/src/parallel/ParallelProblemStat.h | 18 +- AMDiS/src/parallel/ParallelSolver.cc | 8 +- AMDiS/src/parallel/ParallelSolver.h | 26 +- AMDiS/src/parallel/ParallelTypes.h | 28 +- AMDiS/src/parallel/PeriodicMap.cc | 84 +- AMDiS/src/parallel/PeriodicMap.h | 54 +- AMDiS/src/parallel/PetscHelper.cc | 58 +- AMDiS/src/parallel/PetscHelper.h | 28 +- AMDiS/src/parallel/PetscSolver.cc | 58 +- AMDiS/src/parallel/PetscSolver.h | 34 +- AMDiS/src/parallel/PetscSolverCahnHilliard.cc | 132 +- AMDiS/src/parallel/PetscSolverCahnHilliard.h | 22 +- .../src/parallel/PetscSolverCahnHilliard2.cc | 78 +- AMDiS/src/parallel/PetscSolverCahnHilliard2.h | 20 +- AMDiS/src/parallel/PetscSolverFeti.cc | 722 +- AMDiS/src/parallel/PetscSolverFeti.h | 52 +- AMDiS/src/parallel/PetscSolverFetiDebug.cc | 186 +- AMDiS/src/parallel/PetscSolverFetiDebug.h | 30 +- AMDiS/src/parallel/PetscSolverFetiMonitor.cc | 6 +- AMDiS/src/parallel/PetscSolverFetiMonitor.h | 6 +- .../src/parallel/PetscSolverFetiOperators.cc | 108 +- AMDiS/src/parallel/PetscSolverFetiOperators.h | 12 +- AMDiS/src/parallel/PetscSolverFetiStructs.h | 12 +- AMDiS/src/parallel/PetscSolverFetiTimings.cc | 4 +- AMDiS/src/parallel/PetscSolverFetiTimings.h | 6 +- .../parallel/PetscSolverGlobalBlockMatrix.cc | 58 +- .../parallel/PetscSolverGlobalBlockMatrix.h | 22 +- AMDiS/src/parallel/PetscSolverGlobalMatrix.cc | 182 +- AMDiS/src/parallel/PetscSolverGlobalMatrix.h | 44 +- AMDiS/src/parallel/PetscSolverNSCH.cc | 276 +- AMDiS/src/parallel/PetscSolverNSCH.h | 80 +- AMDiS/src/parallel/PetscSolverNavierStokes.cc | 88 +- AMDiS/src/parallel/PetscSolverNavierStokes.h | 54 +- AMDiS/src/parallel/PetscSolverSchur.cc | 118 +- AMDiS/src/parallel/PetscSolverSchur.h | 32 +- AMDiS/src/parallel/SimplePartitioner.h | 4 +- AMDiS/src/parallel/StdMpi.cc | 66 +- AMDiS/src/parallel/StdMpi.h | 112 +- AMDiS/src/parallel/ZoltanPartitioner.cc | 200 +- AMDiS/src/parallel/ZoltanPartitioner.h | 142 +- AMDiS/src/reinit/BoundaryElementDist.cc | 30 +- AMDiS/src/reinit/BoundaryElementDist.h | 16 +- AMDiS/src/reinit/BoundaryElementEdgeDist.cc | 26 +- AMDiS/src/reinit/BoundaryElementEdgeDist.h | 8 +- .../src/reinit/BoundaryElementLevelSetDist.cc | 12 +- .../src/reinit/BoundaryElementLevelSetDist.h | 6 +- AMDiS/src/reinit/BoundaryElementNormalDist.cc | 36 +- AMDiS/src/reinit/BoundaryElementNormalDist.h | 12 +- AMDiS/src/reinit/BoundaryElementTopDist.cc | 138 +- AMDiS/src/reinit/BoundaryElementTopDist.h | 50 +- AMDiS/src/reinit/ElementLevelSet.cc | 50 +- AMDiS/src/reinit/ElementLevelSet.h | 118 +- AMDiS/src/reinit/ElementUpdate.h | 6 +- AMDiS/src/reinit/ElementUpdate_2d.cc | 28 +- AMDiS/src/reinit/ElementUpdate_2d.h | 6 +- AMDiS/src/reinit/ElementUpdate_3d.cc | 230 +- AMDiS/src/reinit/ElementUpdate_3d.h | 12 +- AMDiS/src/reinit/HL_SignedDist.cc | 78 +- AMDiS/src/reinit/HL_SignedDist.h | 74 +- AMDiS/src/reinit/HL_SignedDistBornemann.h | 248 +- AMDiS/src/reinit/HL_SignedDistTraverse.cc | 136 +- AMDiS/src/reinit/HL_SignedDistTraverse.h | 16 +- AMDiS/src/reinit/NormEps.cc | 14 +- AMDiS/src/reinit/NormEps.h | 8 +- AMDiS/src/reinit/VelocityExt.cc | 20 +- AMDiS/src/reinit/VelocityExt.h | 58 +- .../reinit/VelocityExtFromVelocityField.cc | 10 +- .../src/reinit/VelocityExtFromVelocityField.h | 8 +- AMDiS/src/solver/BITL_Solver.h | 38 +- AMDiS/src/solver/BlockMTLMatrix.h | 60 +- AMDiS/src/solver/BlockPreconditioner.h | 62 +- AMDiS/src/solver/CombinedPreconditioner.h | 64 +- AMDiS/src/solver/HypreSolver.h | 70 +- AMDiS/src/solver/ITL_Preconditioner.h | 64 +- AMDiS/src/solver/ITL_Runner.h | 92 +- AMDiS/src/solver/ITL_Solver.h | 150 +- AMDiS/src/solver/KrylovPreconditioner.h | 62 +- AMDiS/src/solver/LinearSolver.h | 110 +- AMDiS/src/solver/LinearSolverInterface.h | 82 +- AMDiS/src/solver/Mapper.h | 106 +- AMDiS/src/solver/MatrixStreams.h | 24 +- AMDiS/src/solver/PetscSolver.cc | 10 +- AMDiS/src/solver/PetscSolver.h | 82 +- AMDiS/src/solver/PetscSolver.hh | 70 +- AMDiS/src/solver/PetscTypes.cc | 24 +- AMDiS/src/solver/PetscTypes.h | 70 +- AMDiS/src/solver/PetscTypes.hh | 110 +- AMDiS/src/solver/SolverMatrix.cc | 8 +- AMDiS/src/solver/SolverMatrix.h | 34 +- AMDiS/src/solver/TriangularPreconditioner.h | 50 +- AMDiS/src/solver/UmfPackSolver.h | 28 +- AMDiS/src/solver/details/LinearSolver.h | 36 +- AMDiS/src/solver/itl/block_diagonal.hpp | 4 +- AMDiS/src/solver/itl/details.hpp | 12 +- AMDiS/src/solver/itl/fgmres.hpp | 50 +- AMDiS/src/solver/itl/fgmres_householder.hpp | 54 +- AMDiS/src/solver/itl/gcr.hpp | 34 +- AMDiS/src/solver/itl/gmres2.hpp | 44 +- AMDiS/src/solver/itl/gmres_householder.hpp | 58 +- AMDiS/src/solver/itl/hypre.hpp | 46 +- AMDiS/src/solver/itl/masslumping.hpp | 24 +- AMDiS/src/solver/itl/minres.hpp | 10 +- AMDiS/src/solver/itl/preonly.hpp | 10 +- AMDiS/src/solver/itl/umfpack2_solve.hpp | 56 +- AMDiS/src/time/RosenbrockAdaptInstationary.cc | 96 +- AMDiS/src/time/RosenbrockAdaptInstationary.h | 28 +- AMDiS/src/time/RosenbrockMethod.cc | 78 +- AMDiS/src/time/RosenbrockMethod.h | 20 +- AMDiS/src/time/RosenbrockStationary.cc | 50 +- AMDiS/src/time/RosenbrockStationary.h | 74 +- AMDiS/src/traits/at.hpp | 86 +- AMDiS/src/traits/category.hpp | 134 +- AMDiS/src/traits/inserter.h | 10 +- AMDiS/src/traits/num_cols.hpp | 78 +- AMDiS/src/traits/num_rows.hpp | 80 +- AMDiS/src/traits/resize.hpp | 64 +- AMDiS/src/traits/scalar_types.hpp | 16 +- AMDiS/src/traits/size.hpp | 86 +- AMDiS/src/traits/tag.hpp | 10 +- AMDiS/src/traits/types.hpp | 66 +- AMDiS/src/utility/calculate_nnz.hpp | 14 +- AMDiS/src/utility/is_symmetric.hpp | 6 +- AMDiS/src/utility/to_string.hpp | 4 +- demo/init/ellipt.dat.1d | 4 +- demo/init/ellipt.dat.2d | 2 +- demo/init/periodic.per.1d | 2 +- demo/init/periodic.per.2d | 2 +- demo/init/periodic.per.3d | 2 +- demo/init/torus.dat.3d | 2 +- demo/init/vecellipt.dat.3d | 4 +- demo/init/vecheat.dat.2d | 2 +- demo/init/vecheat.dat.3d | 2 +- demo/macro/bunny.macro | 764178 +++++----- demo/macro/bunny_fixed.macro | 771302 +++++----- demo/macro/horse.macro | 1066630 +++++++------- demo/macro/kanal_square.2d | 1716 +- demo/macro/kanal_square_fin.2d | 1724 +- demo/macro/macro.25.4.2d | 260 +- demo/macro/macro.ball.3d | 6 +- demo/macro/macro.drivenCavity.2d | 26 +- demo/macro/macro.square.2d | 18 +- demo/macro/macro.stand.1d | 8 +- demo/macro/macro.stand.2d | 24 +- demo/macro/macro.stand.3d | 4 +- demo/macro/neumann.macro.2d | 4 +- demo/macro/periodic.macro.1d | 4 +- demo/macro/periodic.macro.2d | 10 +- demo/macro/periodic.macro.3d | 6 +- demo/macro/periodic.square.2d | 18 +- demo/macro/periodic.square.per | 8 +- demo/src/ball.cc | 16 +- demo/src/bunny.cc | 8 +- demo/src/ellipt.cc | 14 +- demo/src/heat.cc | 36 +- demo/src/neumann.cc | 12 +- demo/src/nonlin.cc | 16 +- demo/src/parametric.cc | 26 +- demo/src/parametric2.cc | 32 +- demo/src/periodic.cc | 8 +- demo/src/sphere.cc | 6 +- demo/src/torus.cc | 36 +- demo/src/vecellipt.cc | 10 +- demo/src/vecheat.cc | 68 +- doc/arh2_file_format.tex | 6 +- doc/book/ch1.tex | 10 +- doc/book/ch4.tex | 2 +- doc/book/ch5.tex | 20 +- doc/book/declarations.tex | 18 +- doc/book/lotdiss.cls | 128 +- doc/book/minted.sty | 10 +- doc/book/minted1.sty | 10 +- doc/book/papers.tex | 10 +- doc/book/publishing.tex | 6 +- doc/book/siam.bst | 4 +- doc/book/siam10.clo | 38 +- doc/codeStyle.tex | 68 +- doc/compiler_compatibility.json | 34 +- doc/compiler_compatibility.py | 2 +- doc/initfile.tex | 2 +- doc/operatorTerms.tex | 14 +- doc/parameters/FileWriter.inc | 6 +- doc/parameters/Mesh.inc | 2 +- doc/tutorial/ellipt.tex | 50 +- doc/tutorial/fig/macro.pdf | 18 +- doc/tutorial/heat.tex | 32 +- doc/tutorial/makefile.tex | 16 +- doc/tutorial/neumann.tex | 20 +- doc/tutorial/parameters.tex | 8 +- doc/tutorial/parametric.tex | 46 +- doc/tutorial/periodic.tex | 34 +- doc/tutorial/projections.tex | 50 +- doc/tutorial/vecellipt.tex | 22 +- doc/workshop/seminar1.tex | 22 +- doc/workshop/seminar2.tex | 4 +- doc/workshop/seminar3.tex | 8 +- doc/workshop/seminar4.tex | 36 +- doc/workshop/workshop.tex | 10 +- extensions/BackgroundMesh.cc | 16 +- extensions/BackgroundMesh.h | 16 +- extensions/BackgroundMesh.hh | 6 +- extensions/BackgroundMesh2.h | 124 +- extensions/BackgroundMesh2.hh | 8 +- extensions/BoundaryFunctions.h | 36 +- extensions/ExtendedProblemStat.h | 146 +- extensions/GenericLoops.h | 70 +- extensions/GenericLoops_cxx11.h | 70 +- extensions/GeometryTools.cc | 116 +- extensions/GeometryTools.h | 8 +- extensions/GeometryTools.hh | 2 +- extensions/GradientCalculations.h | 4 +- extensions/Helpers.cc | 64 +- extensions/Helpers.h | 118 +- extensions/MeshFunction_Level.h | 58 +- extensions/MeshIndicator.h | 4 +- extensions/MetaTools.h | 132 +- extensions/NewtonCotesQuad.h | 6 +- extensions/POperators.cc | 406 +- extensions/POperators.h | 2 +- extensions/POperators_FOT.h | 58 +- extensions/POperators_SOT.h | 22 +- extensions/POperators_ZOT.h | 130 +- extensions/PhaseFieldConvert.h | 54 +- extensions/ProblemStatMassConserve.h | 112 +- extensions/ProblemStatMassConserve2.h | 70 +- extensions/ProblemStatMassConserve_mm.h | 40 +- extensions/RefineFunctions.h | 16 +- extensions/RefineOperations.h | 14 +- extensions/Refinement.h | 172 +- extensions/RefinementExpression.h | 138 +- extensions/Refinement_DOFView.h | 182 +- extensions/Refinement_Level.h | 102 +- extensions/Refinement_MeshSize.h | 50 +- extensions/SignedDistFunctors.h | 74 +- extensions/SingularDirichletBC2.cc | 40 +- extensions/SingularDirichletBC2.h | 126 +- extensions/Tools.h | 26 +- extensions/ValueTypes.h | 6 +- extensions/VectorOperations.h | 112 +- extensions/Views.h | 152 +- extensions/base_problems/BaseProblem.h | 66 +- extensions/base_problems/BaseProblem.hh | 66 +- extensions/base_problems/BaseProblem_RB.h | 38 +- extensions/base_problems/BaseProblem_RB0.h | 28 +- extensions/base_problems/CahnHilliard.cc | 4 +- extensions/base_problems/CahnHilliard.h | 26 +- extensions/base_problems/CahnHilliard.hh | 40 +- .../base_problems/CahnHilliardNavierStokes.cc | 86 +- .../base_problems/CahnHilliardNavierStokes.h | 24 +- .../CahnHilliardNavierStokes_RB.cc | 92 +- .../CahnHilliardNavierStokes_RB.h | 52 +- .../CahnHilliardNavierStokes_TwoPhase.cc | 96 +- .../CahnHilliardNavierStokes_TwoPhase.h | 20 +- .../CahnHilliardNavierStokes_TwoPhase_RB.cc | 142 +- .../CahnHilliardNavierStokes_TwoPhase_RB.h | 24 +- extensions/base_problems/CahnHilliard_RB.cc | 50 +- extensions/base_problems/CahnHilliard_RB.h | 2 +- .../base_problems/CouplingBaseProblem.h | 56 +- .../base_problems/CouplingBaseProblem2.h | 126 +- .../CouplingBaseProblem2_cxx11.h | 114 +- .../base_problems/CouplingBaseProblem_RB.h | 40 +- extensions/base_problems/DiffuseDomainFsi.cc | 46 +- extensions/base_problems/DiffuseDomainFsi.h | 40 +- extensions/base_problems/LinearElasticity.cc | 56 +- extensions/base_problems/LinearElasticity.h | 10 +- .../base_problems/LinearElasticityPhase.cc | 44 +- .../base_problems/LinearElasticityPhase.h | 34 +- .../base_problems/NavierStokesCahnHilliard.cc | 130 +- .../base_problems/NavierStokesCahnHilliard.h | 48 +- .../NavierStokesPhase_TaylorHood.cc | 40 +- .../NavierStokesPhase_TaylorHood.h | 42 +- .../NavierStokes_TH_MultiPhase.cc | 4 +- .../NavierStokes_TH_MultiPhase.h | 52 +- .../NavierStokes_TH_MultiPhase.hh | 44 +- .../NavierStokes_TH_MultiPhase_RB.cc | 28 +- .../NavierStokes_TH_MultiPhase_RB.h | 32 +- .../base_problems/NavierStokes_TaylorHood.cc | 4 +- .../base_problems/NavierStokes_TaylorHood.h | 24 +- .../base_problems/NavierStokes_TaylorHood.hh | 84 +- .../NavierStokes_TaylorHood_RB.cc | 24 +- .../NavierStokes_TaylorHood_RB.h | 22 +- extensions/base_problems/PhaseFieldCrystal.cc | 4 +- extensions/base_problems/PhaseFieldCrystal.h | 20 +- extensions/base_problems/PhaseFieldCrystal.hh | 38 +- .../base_problems/PhaseFieldCrystal_Phase.cc | 4 +- .../base_problems/PhaseFieldCrystal_Phase.h | 16 +- .../base_problems/PhaseFieldCrystal_Phase.hh | 22 +- .../base_problems/PhaseFieldCrystal_RB.cc | 24 +- .../base_problems/PhaseFieldCrystal_RB.h | 20 +- extensions/base_problems/PolarizationField.cc | 4 +- extensions/base_problems/PolarizationField.h | 40 +- extensions/base_problems/PolarizationField.hh | 70 +- .../base_problems/PolarizationField_RB.h | 48 +- .../base_problems/PolarizationField_RB.hh | 62 +- extensions/base_problems/QuasiCrystal.cc | 4 +- extensions/base_problems/QuasiCrystal.h | 4 +- extensions/base_problems/QuasiCrystal.hh | 48 +- extensions/base_problems/QuasiCrystal_RB.cc | 62 +- extensions/base_problems/QuasiCrystal_RB.h | 4 +- extensions/base_problems/chns.h | 66 +- .../deprecated/NavierStokesPhase_Chorin.cc | 38 +- .../deprecated/NavierStokesPhase_Chorin.h | 2 +- .../deprecated/NavierStokes_Chorin.cc | 80 +- .../deprecated/NavierStokes_Chorin.h | 12 +- .../deprecated/VacancyPhaseFieldCrystal.cc | 56 +- .../deprecated/VacancyPhaseFieldCrystal.h | 8 +- .../CMakeLists.txt | 4 +- .../init/navierStokes_TaylorHood.inc.2d | 2 +- .../macro/ns_ch.macro | 8 +- .../demo/NavierStokesCahnHilliard_PC/run | 2 +- .../src/CahnHilliardNavierStokes_.h | 42 +- .../src/CahnHilliard_.cc | 22 +- .../src/CahnHilliard_.h | 2 +- .../NavierStokesCahnHilliard_PC/src/nsch.cc | 80 +- .../CMakeLists.txt | 4 +- .../init/nsch.dat.2d | 2 +- .../macro/ns_ch.macro | 8 +- .../NavierStokesCahnHilliard_PC_coupled/run | 2 +- .../src/benchmark.cc | 20 +- extensions/demo/cahn_hilliard/CMakeLists.txt | 4 +- .../cahn_hilliard/init/cahnHilliard.dat.2d | 4 +- .../cahn_hilliard/init/cahnHilliard.dat.3d | 4 +- .../demo/cahn_hilliard/macro/macro.square.2d | 18 +- .../cahn_hilliard/macro/macro.square.fine.2d | 722 +- extensions/demo/cahn_hilliard/macro/square.2d | 18 +- extensions/demo/cahn_hilliard/macro/square.3d | 54 +- .../demo/cahn_hilliard/macro/square2d.per | 8 +- .../demo/cahn_hilliard/macro/square2d.per.2d | 18 +- .../demo/cahn_hilliard/macro/square3d.per | 48 +- .../demo/cahn_hilliard/macro/square3d.per.3d | 54 +- .../src/CahnHilliardProblemStat.hpp | 56 +- .../demo/cahn_hilliard/src/CahnHilliard_DD.cc | 24 +- .../demo/cahn_hilliard/src/CahnHilliard_DD.h | 10 +- .../src/MTLMatrixShellCahnHilliard.hpp | 46 +- .../src/PetscSolverCahnHilliard_DD.cc | 78 +- .../src/PetscSolverCahnHilliard_DD.h | 20 +- .../demo/cahn_hilliard/src/cahnHilliard.cc | 76 +- .../demo/cahn_hilliard/src/cahnHilliard_dd.cc | 44 +- .../cahn_hilliard/src/cahnHilliard_shell.cc | 46 +- .../init/cahnHilliard_navierStokes.dat.2d | 12 +- .../multimesh/init/dend002.dat.2d.m.bicg.2p | 2 +- .../multimesh/init/heat.dat.2d.m_1015_1010 | 2 +- .../demo/multimesh/init/heat.dat.2d.s_16_16 | 2 +- .../demo/multimesh/macro/macro.square.2d | 18 +- .../macro/macro.square.2d.666466.tmp | 370 +- .../macro/macro.square.2d.685642.tmp | 370 +- .../demo/multimesh/macro/macro_corner_1x1.2d | 2 +- .../macro/macro_corner_1x1.2d.736102.tmp | 11330 +- .../macro/macro_corner_1x1.2d.801668.tmp | 11330 +- .../macro/macro_corner_1x1.2d.991261.tmp | 11330 +- extensions/demo/multimesh/src/Anisotropy.h | 48 +- .../demo/multimesh/src/CahnHilliard_mm.h | 28 +- .../demo/multimesh/src/CahnHilliard_mm.hh | 30 +- .../demo/multimesh/src/MyProblemInstat.cc | 50 +- .../demo/multimesh/src/MyProblemInstat.h | 30 +- extensions/demo/multimesh/src/Refinement.cc | 44 +- extensions/demo/multimesh/src/Refinement.h | 10 +- .../src/cahnHilliard_navierStokes.cc | 46 +- .../src/cahnHilliard_navierStokes_mm.cc | 46 +- extensions/demo/multimesh/src/dendrites.cc | 38 +- .../demo/multimesh/src/diffuseDomain.cc | 94 +- extensions/demo/other/CMakeLists.txt | 24 +- .../init/cahnHilliard_navierStokes.dat.2d | 12 +- extensions/demo/other/init/elliptBase.dat.2d | 2 +- .../other/init/ellipt_krylov_precon.dat.2d | 2 +- extensions/demo/other/init/fsi.dat.2d | 2 +- extensions/demo/other/init/parametric2.dat.2d | 2 +- extensions/demo/other/macro/channel.2d | 2498 +- extensions/demo/other/macro/kanal_25_4_4.3d | 1300 +- extensions/demo/other/macro/macro.25.4.2d | 260 +- extensions/demo/other/macro/macro.big.2d | 16 +- .../demo/other/macro/macro.drivenCavity.2d | 26 +- extensions/demo/other/macro/macro.square.2d | 18 +- extensions/demo/other/macro/macro.stand.2d | 24 +- extensions/demo/other/macro/macro.stand.3d | 4 +- .../demo/other/macro/obstacle_in_channel.2d | 104 +- extensions/demo/other/src/cahnHilliard.cc | 28 +- .../other/src/cahnHilliard_navierStokes.cc | 48 +- extensions/demo/other/src/drivenCavity.cc | 20 +- extensions/demo/other/src/drivenCavity_rb.cc | 18 +- .../other/src/drivenCavity_twophase_rb.cc | 18 +- .../src/fsi_explicit/ElasticityNavierStokes.h | 28 +- .../fsi_explicit/fluidStructureInteraction.cc | 64 +- .../other/src/fsi_explicit/navierStokes.h | 4 +- extensions/demo/other/src/mesh_refinement.cc | 10 +- extensions/demo/other/src/mesh_refinement2.cc | 10 +- extensions/demo/other/src/movingMesh.cc | 42 +- extensions/demo/other/src/movingMesh.h | 42 +- extensions/demo/other/src/navierStokes.cc | 28 +- extensions/demo/other/src/navierStokes.h | 8 +- .../other/src/navierStokes_diffuseDomain.cc | 60 +- .../other/src/navierStokes_diffuseDomain2.cc | 58 +- .../demo/other/src/polarizationField.cc | 22 +- .../src/polarizationField_navierStokes.cc | 64 +- extensions/demo/pfc/init/pfc_solver.inc | 2 +- extensions/demo/pfc/macro/macro.square.2d | 18 +- extensions/demo/pfc/macro/pfc_mesh.111.2d | 18 +- extensions/demo/pfc/macro/pfc_mesh.111.3d | 54 +- extensions/demo/pfc/src/maxima.hpp | 162 +- extensions/demo/pfc/src/pfc.cc | 38 +- extensions/demo/pfc/src/pfc_rb.cc | 88 +- extensions/demo/pfc/src/positions.hpp | 30 +- extensions/demo/pfc/src/vpfc.cc | 86 +- extensions/kdtree_nanoflann.h | 10 +- extensions/kdtree_nanoflann_dof.h | 50 +- extensions/kdtree_nanoflann_double.h | 12 +- extensions/kdtree_nanoflann_mesh.h | 66 +- extensions/nanoflann/CHANGELOG.txt | 24 +- .../preconditioner/MTLPreconCahnHilliard.h | 60 +- .../preconditioner/MTLPreconCahnHilliard.hh | 26 +- .../preconditioner/MTLPreconCahnHilliard2.h | 110 +- .../preconditioner/MTLPreconCahnHilliard2.hh | 40 +- .../preconditioner/MTLPreconNavierStokes.h | 112 +- .../preconditioner/MTLPreconNavierStokes.hh | 50 +- extensions/preconditioner/MTLPreconPfc.h | 58 +- extensions/preconditioner/MTLPreconPfc.hh | 38 +- extensions/preconditioner/MTLPreconPfc_diag.h | 58 +- .../preconditioner/MTLPreconPfc_diag.hh | 36 +- .../preconditioner/PetscPreconCahnHilliard.cc | 36 +- .../preconditioner/PetscPreconCahnHilliard.h | 8 +- extensions/preconditioner/PetscPreconPfc.cc | 48 +- extensions/preconditioner/PetscPreconPfc.h | 6 +- .../preconditioner/PetscPreconPfcDiag.cc | 48 +- .../preconditioner/PetscPreconPfcDiag.h | 6 +- .../PetscSolverNavierStokes2.cc | 104 +- .../preconditioner/PetscSolverNavierStokes2.h | 62 +- extensions/preconditioner/PetscSolverPfc.cc | 86 +- extensions/preconditioner/PetscSolverPfc.h | 10 +- .../preconditioner/PetscSolverPfc_diag.cc | 86 +- .../preconditioner/PetscSolverPfc_diag.h | 12 +- extensions/pugixml/src/pugiconfig.hpp | 2 +- extensions/pugixml/src/pugixml.cpp | 904 +- extensions/pugixml/src/pugixml.hpp | 96 +- .../ExtendedRosenbrockAdaptInstationary.h | 22 +- .../ExtendedRosenbrockAdaptInstationary.hh | 74 +- .../time/ExtendedRosenbrockStationary.cc | 62 +- .../time/ExtendedRosenbrockStationary.h | 82 +- extensions/tutorial.hpp | 186 +- test/mpi/init/test0001.dat.2d | 2 +- test/mpi/init/test0002.dat.2d | 4 +- test/mpi/init/test0003.dat.2d | 4 +- test/mpi/init/test0004.dat.2d | 4 +- test/mpi/init/test0005.dat.2d | 4 +- test/mpi/init/test0006.dat.2d | 4 +- test/mpi/init/test0007.dat.2d | 2 +- test/mpi/macro/macro.stand.2d | 26 +- test/mpi/macro/macro.stand.p16.2d | 50 +- test/mpi/macro/macro.stand.p16_25x25.2d | 50 +- test/mpi/macro/macro.stand.p256.2d | 578 +- test/mpi/macro/macro.stand.p4.2d | 18 +- test/mpi/macro/macro.stand.p64.2d | 162 +- test/mpi/src/test0001.cc | 10 +- test/mpi/src/test0003.cc | 6 +- test/mpi/src/test0004.cc | 8 +- test/mpi/src/test0005.cc | 10 +- test/mpi/src/test0006.cc | 12 +- test/mpi/src/test0007.cc | 4 +- test/seq/init/test0001.dat.2d | 2 +- test/seq/macro/macro.stand.2d | 26 +- test/seq/src/test0001.cc | 6 +- tools/cleanup.sh | 4 + 1368 files changed, 1356714 insertions(+), 1356710 deletions(-) create mode 100755 tools/cleanup.sh diff --git a/AMDiS/HOWTO_cmake.html b/AMDiS/HOWTO_cmake.html index d99790a9..94fbdcaf 100644 --- a/AMDiS/HOWTO_cmake.html +++ b/AMDiS/HOWTO_cmake.html @@ -8,7 +8,7 @@

Using AMDiS with cmake

With this short page, I will show you, how to use the cmake buildsystem with AMDiS. The introduction consists of two main parts: -
    +
    1. compiling and installing AMDiS with CMake
    2. using the cmake installed AMDiS in your project
    3. some frequently asked questions
    4. @@ -37,7 +37,7 @@ cd ${HOME}/work/amdis_build The simplest configuration of AMDiS, i.e. without umfpack and parallelization, only sets the install destination to the directory "${HOME}/programs/". To do this, you have to call cmake with your install destination and the AMDiS source directory as commandline arguments
       cmake -DCMAKE_INSTALL_PREFIX=${HOME}/programs/ ../amdis/AMDiS
      - + Compilation and installation is the same as with automake/autoconf:
       make && make install 
      @@ -80,7 +80,7 @@ and we have to tell cmake, that we need the library amdis and each library amdis target_link_libraries(fooProg ${AMDIS_LIBRARIES}) -If cmake does not find AMDiS, you have to set the variable AMDIS_DIR to the directory containing the file AMDiSConfig.cmake. This file resides in +If cmake does not find AMDiS, you have to set the variable AMDIS_DIR to the directory containing the file AMDiSConfig.cmake. This file resides in
         ${CMAKE_INSTALL_PREFIX}/share/amdis/
       
      diff --git a/AMDiS/cmake/CompilerTest.cmake b/AMDiS/cmake/CompilerTest.cmake index ec87e38d..02275e0a 100644 --- a/AMDiS/cmake/CompilerTest.cmake +++ b/AMDiS/cmake/CompilerTest.cmake @@ -1,6 +1,6 @@ set(COMPILER_TEST_DIR ${CMAKE_BINARY_DIR}/CMakeFiles/compilerTest) -file(WRITE ${COMPILER_TEST_DIR}/CMakeLists.txt +file(WRITE ${COMPILER_TEST_DIR}/CMakeLists.txt "project(compilerTest) cmake_minimum_required(VERSION 2.8) add_definitions(-std=c++11) @@ -28,25 +28,25 @@ file(WRITE ${COMPILER_TEST_DIR}/CMakeLists.txt # RANGE-BASED FOR LOOPS add_executable(test_range_based_for test_range_based_for.cpp) target_link_libraries(test_range_based_for)") - -file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_class.cpp + +file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_class.cpp "template struct A{}; int main(){A a;}") -file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_fct.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_variadic_templ_fct.cpp "template void foo(Ts... ts){}; int main(){foo(1, 2.0, 3.0f);}") -file(WRITE ${COMPILER_TEST_DIR}/test_alias_templates.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_alias_templates.cpp "template struct A{}; template using B=A; int main(){B b;}") -file(WRITE ${COMPILER_TEST_DIR}/test_decltype.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_decltype.cpp "int main(){decltype(1) a = 1;}") -file(WRITE ${COMPILER_TEST_DIR}/test_auto.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_auto.cpp "int main(){auto a = 1;}") -file(WRITE ${COMPILER_TEST_DIR}/test_constexpr.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_constexpr.cpp "constexpr int foo(){return 1;}; int main(){static constexpr int f = foo();}") -file(WRITE ${COMPILER_TEST_DIR}/test_delegating_constructors.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_delegating_constructors.cpp "struct A{ A(){} A(int) : A(){} }; int main(){ A a(1);}") -file(WRITE ${COMPILER_TEST_DIR}/test_range_based_for.cpp +file(WRITE ${COMPILER_TEST_DIR}/test_range_based_for.cpp "int main(){ int vec[10]; for (int& elem : vec) { elem = 1; } }") - - + + set(COMPILER_CXX11_FEATURES "") try_compile(TEST_VARIADIC_TEMPL_CLASS ${COMPILER_TEST_DIR} ${COMPILER_TEST_DIR} compilerTest test_variadic_templ_class) diff --git a/AMDiS/cmake/postrm.in b/AMDiS/cmake/postrm.in index 49a9ce70..cdc5558a 100755 --- a/AMDiS/cmake/postrm.in +++ b/AMDiS/cmake/postrm.in @@ -1,5 +1,5 @@ #!/bin/sh -if test "$1" = "upgrade" ; then +if test "$1" = "upgrade" ; then exit 0 fi NEWDIRS_SEMI="@deb_add_dirs@" diff --git a/AMDiS/cmake3/amdis_parallel.cmake b/AMDiS/cmake3/amdis_parallel.cmake index af09c7c6..c45993da 100644 --- a/AMDiS/cmake3/amdis_parallel.cmake +++ b/AMDiS/cmake3/amdis_parallel.cmake @@ -2,7 +2,7 @@ if (ENABLE_PARALLEL_DOMAIN) option(ENABLE_ZOLTAN "Add support for the Parallel Partitioning suite Zoltan" false) option(ENABLE_PARALLEL_SOLVERS "Add some problem dependent solver, e.g. Feti, Navier-Stokes and Cahn-Hilliard" true) mark_as_advanced(ENABLE_PARALLEL_SOLVERS) - + add_library(amdis_parallel INTERFACE) target_sources(amdis PRIVATE ${SOURCE_DIR}/parallel/DofComm.cc @@ -21,14 +21,14 @@ if (ENABLE_PARALLEL_DOMAIN) ${SOURCE_DIR}/parallel/ParMetisPartitioner.cc ${SOURCE_DIR}/parallel/StdMpi.cc ) - + target_sources(amdis_debug INTERFACE ${SOURCE_DIR}/parallel/ParallelDebug.cc ) - + target_compile_definitions(amdis_parallel INTERFACE HAVE_PARALLEL_DOMAIN_AMDIS=1) - + # MPI is required find_package(MPI REQUIRED) if (MPI_FOUND) @@ -37,15 +37,15 @@ if (ENABLE_PARALLEL_DOMAIN) target_compile_options(amdis_parallel INTERFACE ${MPI_COMPILE_FLAGS}) endif (MPI_FOUND) - + # PETSc library is required set(PETSC_EXECUTABLE_RUNS ON) include(find_petsc) if (PETSc_FOUND) target_include_directories(amdis_parallel INTERFACE - ${PETSC_DIR}/include + ${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include) - + # parmetis is required find_file(PARMETIS_HEADER_FILE "parmetis.h" HINTS ${PETSC_DIR}/include ) if (PARMETIS_HEADER_FILE) @@ -54,7 +54,7 @@ if (ENABLE_PARALLEL_DOMAIN) else() message(FATAL_ERROR "Could not find ParMetis header file 'parmetis.h'!") endif (PARMETIS_HEADER_FILE) - + # add support for the zoltan library if (ENABLE_ZOLTAN) find_file(ZOLTAN_HEADER_FILE "zoltan_cpp.h" HINTS ${PETSC_DIR}/include) @@ -64,18 +64,18 @@ if (ENABLE_PARALLEL_DOMAIN) else() message(FATAL_ERROR "Could not find Zoltan include file 'zoltan_cpp.h'!") endif(ZOLTAN_HEADER_FILE) - + target_compile_definitions(amdis_parallel INTERFACE HAVE_ZOLTAN=1) target_sources(amdis PRIVATE ${SOURCE_DIR}/parallel/ZoltanPartitioner.cc) endif (ENABLE_ZOLTAN) - + if (ENABLE_BDDCML) target_compile_definitions(amdis_parallel INTERFACE HAVE_BDDCML=1) target_sources(amdis PRIVATE ${SOURCE_DIR}/parallel/BddcMlSolver.cc) endif (ENABLE_BDDCML) - + # add some more source-files that need petsc target_sources(amdis PRIVATE ${SOURCE_DIR}/parallel/MatrixNnzStructure.cc @@ -86,7 +86,7 @@ if (ENABLE_PARALLEL_DOMAIN) ${SOURCE_DIR}/parallel/PetscSolverGlobalBlockMatrix.cc ${SOURCE_DIR}/solver/PetscTypes.cc ) - + if (ENABLE_PARALLEL_SOLVERS) target_sources(amdis PRIVATE ${SOURCE_DIR}/parallel/PetscSolverFeti.cc @@ -103,23 +103,23 @@ if (ENABLE_PARALLEL_DOMAIN) target_compile_definitions(amdis_parallel INTERFACE HAVE_PARALLEL_SOLVERS=1) endif (ENABLE_PARALLEL_SOLVERS) - + target_compile_definitions(amdis_parallel INTERFACE HAVE_PARALLEL_PETSC=1 PETSC_VERSION=${PETSC_VERSION}) - + target_link_libraries(amdis amdis_parallel ${PETSC_LIBRARIES} blas lapack) endif (PETSc_FOUND) - + # specify how to install this target: # ----------------------------------- - + file(GLOB AMDIS_PARALLEL_HEADERS "${SOURCE_DIR}/parallel/*.h") install(FILES ${AMDIS_PARALLEL_HEADERS} DESTINATION include/amdis/parallel/) - - install(FILES - ${BASE_DIR}/cmake3/ResolveCompilerPaths.cmake - ${BASE_DIR}/cmake3/FindPackageMultipass.cmake + + install(FILES + ${BASE_DIR}/cmake3/ResolveCompilerPaths.cmake + ${BASE_DIR}/cmake3/FindPackageMultipass.cmake ${BASE_DIR}/cmake3/find_petsc.cmake DESTINATION share/amdis/) endif (ENABLE_PARALLEL_DOMAIN) diff --git a/AMDiS/cmake3/muparser.cmake b/AMDiS/cmake3/muparser.cmake index b6751cb6..5f684247 100644 --- a/AMDiS/cmake3/muparser.cmake +++ b/AMDiS/cmake3/muparser.cmake @@ -2,7 +2,7 @@ set(MUPARSER_SOURCE_DIR ${BASE_DIR}/lib/muparser_v134/src) set(MUPARSER_INCLUDE_DIR ${BASE_DIR}/lib/muparser_v134/include) -add_library(muparser +add_library(muparser ${MUPARSER_SOURCE_DIR}/muParser.cpp ${MUPARSER_SOURCE_DIR}/muParserBase.cpp ${MUPARSER_SOURCE_DIR}/muParserBytecode.cpp @@ -13,7 +13,7 @@ add_library(muparser ${MUPARSER_SOURCE_DIR}/muParserInt.cpp ${MUPARSER_SOURCE_DIR}/muParserTest.cpp ${MUPARSER_SOURCE_DIR}/muParserTokenReader.cpp) - + target_include_directories(muparser PUBLIC ${MUPARSER_INCLUDE_DIR}) if (ENABLE_CXX11) diff --git a/AMDiS/cmake3/test_compile_features.cmake b/AMDiS/cmake3/test_compile_features.cmake index 9458b31d..c24c17bf 100644 --- a/AMDiS/cmake3/test_compile_features.cmake +++ b/AMDiS/cmake3/test_compile_features.cmake @@ -14,7 +14,7 @@ macro(test_compile_features RESULT_VAR TARGET SCOPE) # feature1 feature2 feature else () set(DUMMY_FILE ${AMDIS_DIR}/dummy.cc) endif () - + message(STATUS "Test for cxx11 features for target ${TARGET}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${_DIR}) file(WRITE ${_DIR}/CMakeLists.txt " diff --git a/AMDiS/doc/Doxyfile b/AMDiS/doc/Doxyfile index bad0952b..f218981c 100644 --- a/AMDiS/doc/Doxyfile +++ b/AMDiS/doc/Doxyfile @@ -38,20 +38,20 @@ PROJECT_NAME = AMDiS # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = +PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify an logo or icon that is included in # the documentation. The maximum height of the logo should not exceed 55 pixels # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -154,7 +154,7 @@ FULL_PATH_NAMES = NO # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -163,7 +163,7 @@ STRIP_FROM_PATH = # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -230,13 +230,13 @@ TAB_SIZE = 8 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = +ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. -TCL_SUBST = +TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -280,7 +280,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -616,7 +616,7 @@ GENERATE_DEPRECATEDLIST= YES # sections, marked by \if ... \endif and \cond # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -658,7 +658,7 @@ SHOW_NAMESPACES = YES # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -671,7 +671,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -682,7 +682,7 @@ LAYOUT_FILE = # search path. Do not use file names with spaces, bibtex cannot handle them. See # also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -741,7 +741,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -798,7 +798,7 @@ RECURSIVE = NO # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -814,7 +814,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -825,20 +825,20 @@ EXCLUDE_PATTERNS = # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands @@ -851,7 +851,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -868,7 +868,7 @@ IMAGE_PATH = # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -877,7 +877,7 @@ INPUT_FILTER = # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER ) will also be used to filter the input files that are used for @@ -892,14 +892,14 @@ FILTER_SOURCE_FILES = NO # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1011,7 +1011,7 @@ COLS_IN_ALPHA_INDEX = 5 # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output @@ -1055,7 +1055,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1065,7 +1065,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1077,7 +1077,7 @@ HTML_FOOTER = # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- # defined cascading style sheet that is included after the standard style sheets @@ -1088,7 +1088,7 @@ HTML_STYLESHEET = # see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1098,7 +1098,7 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the stylesheet and background images according to @@ -1226,7 +1226,7 @@ GENERATE_HTMLHELP = NO # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler ( hhc.exe). If non-empty @@ -1234,7 +1234,7 @@ CHM_FILE = # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated ( # YES) or that it should be included in the master .chm file ( NO). @@ -1247,7 +1247,7 @@ GENERATE_CHI = NO # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated ( # YES) or a normal table of contents ( NO) in the .chm file. @@ -1277,7 +1277,7 @@ GENERATE_QHP = NO # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace @@ -1302,7 +1302,7 @@ QHP_VIRTUAL_FOLDER = doc # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom @@ -1310,21 +1310,21 @@ QHP_CUST_FILTER_NAME = # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1457,7 +1457,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site @@ -1465,7 +1465,7 @@ MATHJAX_EXTENSIONS = # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1525,7 +1525,7 @@ EXTERNAL_SEARCH = NO # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1541,7 +1541,7 @@ SEARCHDATA_FILE = searchdata.xml # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1551,7 +1551,7 @@ EXTERNAL_SEARCH_ID = # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output @@ -1612,7 +1612,7 @@ PAPER_TYPE = a4wide # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1628,7 +1628,7 @@ EXTRA_PACKAGES = # PROJECT_NAME), or the project number (see PROJECT_NUMBER). # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1637,7 +1637,7 @@ LATEX_HEADER = # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1645,7 +1645,7 @@ LATEX_FOOTER = # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1745,14 +1745,14 @@ RTF_HYPERLINKS = NO # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # Configuration options related to the man page output @@ -1813,13 +1813,13 @@ XML_OUTPUT = xml # validating XML parser to check the syntax of the XML files. # This tag requires that the tag GENERATE_XML is set to YES. -XML_SCHEMA = +XML_SCHEMA = # The XML_DTD tag can be used to specify a XML DTD, which can be used by a # validating XML parser to check the syntax of the XML files. # This tag requires that the tag GENERATE_XML is set to YES. -XML_DTD = +XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to @@ -1896,7 +1896,7 @@ PERLMOD_PRETTY = YES # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor @@ -1937,7 +1937,7 @@ SEARCH_INCLUDES = YES # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -1945,7 +1945,7 @@ INCLUDE_PATH = # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -1968,7 +1968,7 @@ PREDEFINED = HAVE_PARALLEL_DOMAIN_AMDIS \ # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all refrences to function-like macros that are alone on a line, have an @@ -1997,13 +1997,13 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external class will be listed in the # class index. If set to NO only the inherited external classes will be listed. @@ -2051,14 +2051,14 @@ CLASS_DIAGRAMS = NO # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = # If set to YES, the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. @@ -2107,7 +2107,7 @@ DOT_FONTSIZE = 10 # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2252,19 +2252,19 @@ DOT_PATH = /solhome/vey/graphviz/graphviz-1.10/bin/ # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes diff --git a/AMDiS/lib/mtl4/CMakeLists.txt b/AMDiS/lib/mtl4/CMakeLists.txt index 0beb6696..34f05b50 100644 --- a/AMDiS/lib/mtl4/CMakeLists.txt +++ b/AMDiS/lib/mtl4/CMakeLists.txt @@ -1,4 +1,4 @@ -project (mtl4) # GPU version +project (mtl4) # GPU version cmake_minimum_required(VERSION 2.8) option(ENABLE_GCOV "enable gnu coverage flags for gnu compiler" OFF) @@ -77,4 +77,4 @@ enable_testing() include(CTest) set(MTL_IS_CONFIGURED True) # impede double double configuration in libs -add_subdirectory(libs) +add_subdirectory(libs) diff --git a/AMDiS/lib/mtl4/Doxyfile b/AMDiS/lib/mtl4/Doxyfile index fdc37d46..69153ce1 100644 --- a/AMDiS/lib/mtl4/Doxyfile +++ b/AMDiS/lib/mtl4/Doxyfile @@ -14,76 +14,76 @@ # Project related configuration options #--------------------------------------------------------------------------- -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "MTL 4" -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = "" -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = libs/numeric/mtl/doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class" \ @@ -98,203 +98,203 @@ ABBREVIATE_BRIEF = "The $name class" \ an \ the -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = /Volumes/Doxygen/ -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), # use: inc=Fortran f=C. Note that for custom extensions you also need to set # FILE_PATTERNS otherwise the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO -# If you use Microsoft's C++/CLI language, you should set this option to YES to +# If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols SYMBOL_CACHE_SIZE = 0 @@ -303,121 +303,121 @@ SYMBOL_CACHE_SIZE = 0 # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = YES -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO @@ -432,179 +432,179 @@ SORT_BRIEF_DOCS = NO SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name # of the layout file. -LAYOUT_FILE = +LAYOUT_FILE = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = . -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.c \ @@ -649,91 +649,91 @@ FILE_PATTERNS = *.c \ *.MM \ *.PY -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = libs/numeric/mtl/doc/* \ libs/numeric/mtl/doc-complete/* \ packages -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = .svn -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test -EXCLUDE_SYMBOLS = +EXCLUDE_SYMBOLS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = libs/numeric/mtl/examples \ boost/numeric/itl/krylov \ libs/numeric/mtl/experimental -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = *.*pp -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = libs/numeric/mtl/examples/images -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -742,53 +742,53 @@ FILTER_SOURCE_FILES = NO # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -797,279 +797,279 @@ VERBATIM_HEADERS = YES # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = libs/numeric/mtl/examples/doxygen_header.html -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = libs/numeric/mtl/examples/doxygen_footer.html -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. GENERATE_DOCSET = NO -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated # HTML documentation. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. -QCH_FILE = +QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see # Qt Help Project / Custom Filters. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. # Qt Help Project / Filter Attributes. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. -QHG_LOCATION = +QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, # and Class Hierarchy pages using a tree view instead of an ordered list. USE_INLINE_TREES = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript +# for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine +# (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = NO # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index +# using Javascript. Doxygen will generate the search PHP script and index # file to put on the web server. The advantage of the server # based approach is that it scales better to large projects and allows -# full text search. The disadvances is that it is more difficult to setup +# full text search. The disadvances is that it is more difficult to setup # and does not have live searching capabilities. SERVER_BASED_SEARCH = NO @@ -1078,77 +1078,77 @@ SERVER_BASED_SEARCH = NO # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = letter -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -1164,68 +1164,68 @@ LATEX_SOURCE_CODE = NO # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -1234,33 +1234,33 @@ MAN_LINKS = NO # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -1269,10 +1269,10 @@ XML_PROGRAMLISTING = YES # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -1281,97 +1281,97 @@ GENERATE_AUTOGEN_DEF = NO # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = MTL_HAS_UMFPACK MTL_HAS_VPT -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES @@ -1380,41 +1380,41 @@ SKIP_FUNCTION_MACROS = YES # Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl @@ -1423,192 +1423,192 @@ PERL_PATH = /usr/bin/perl # Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. -DOT_FONTPATH = +DOT_FONTPATH = -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = /Volumes/Doxygen/Doxygen.app/Contents/Resources/ -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 1000 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES diff --git a/AMDiS/lib/mtl4/INSTALL b/AMDiS/lib/mtl4/INSTALL index 63a39d2e..3b974253 100644 --- a/AMDiS/lib/mtl4/INSTALL +++ b/AMDiS/lib/mtl4/INSTALL @@ -2,9 +2,9 @@ Software License for MTL -Copyright (c) 2007-2008 The Trustees of Indiana University. +Copyright (c) 2007-2008 The Trustees of Indiana University. 2008 Dresden University of Technology and the Trustees of Indiana University. - 2010 SimuNova UG, www.simunova.com. + 2010 SimuNova UG, www.simunova.com. All rights reserved. Authors: Peter Gottschling and Andrew Lumsdaine diff --git a/AMDiS/lib/mtl4/README b/AMDiS/lib/mtl4/README index c59d6085..d8292b47 100644 --- a/AMDiS/lib/mtl4/README +++ b/AMDiS/lib/mtl4/README @@ -11,7 +11,7 @@ See also license.mtl.txt in the distribution. --------------------------------------------------------------- The Matrix Template Library - Version 4 + Version 4 I. Introduction =============== diff --git a/AMDiS/lib/mtl4/SConstruct b/AMDiS/lib/mtl4/SConstruct index e547d459..ede49e27 100644 --- a/AMDiS/lib/mtl4/SConstruct +++ b/AMDiS/lib/mtl4/SConstruct @@ -9,7 +9,7 @@ def macro_flag(env, flag): if sys.platform == 'win32' and conf.env['CC'] == 'cl': return '/D' + flag else: - return '-D' + flag + return '-D' + flag # add debugging flags to environment def add_debug(env): @@ -20,7 +20,7 @@ def add_debug(env): env.Append(CCFLAGS = '-g') #print macro_flag(env, 'MTL_ASSERT_FOR_THROW') env.Append(CCFLAGS = macro_flag(env, 'MTL_ASSERT_FOR_THROW')) - + def check_g5(): print "platform ", sys.platform @@ -38,7 +38,7 @@ def check_g5(): def add_platform_flags(env): if env['CC'] == 'cl': - # Turn off some warnings: 1. for problems with CRTP 2. with VC's own headers + # Turn off some warnings: 1. for problems with CRTP 2. with VC's own headers # 3. alleged ambiguos assignment # I hope we find a cleaner way to get rid of this warning wd = ' /wd4355 /wd4996 /wd4522' @@ -79,10 +79,10 @@ def add_opt(env, opt): env.Append(CCFLAGS = '-O2') # env.Append(CCFLAGS = '-pg') # for profiling # env.Append(LINKFLAGS = '-pg') # for profiling - + if env['CC'] != 'cl': env.Append(CXXFLAGS = conf.env['CCFLAGS']) - + def check_no_long_double(conf): cc = conf.env['CC'] @@ -117,7 +117,7 @@ def check_for_blas(env): if blas_path: print 'adding ' + blas_path + ' to LIBPATH.' env.Append(LIBPATH = [ blas_path, blas_path + '/lib/' ]) - + # extra linker flags for blas blas_ldflags = ARGUMENTS.get('blas_ldflags', '') if blas_ldflags: @@ -137,7 +137,7 @@ def check_for_blas(env): return myenv else: print "Autodetecting BLAS support. See config.log for details!" - + ######################## # check for acml myenv = env.Copy() @@ -151,7 +151,7 @@ def check_for_blas(env): myenv = conf.Finish() if(found_blas == 1): return myenv - + ######################## # check for goto myenv = env.Copy() @@ -161,7 +161,7 @@ def check_for_blas(env): myenv.Append(LIBS=['pthread']) # extra linker flags for libgoto # myenv.Append(_LIBFLAGS=['libs/numeric/mtl/build/xerbla.c']) - myenv.Append(_LIBFLAGS=['libs/numeric/mtl/build/xerbla.o']) # not portable !!! + myenv.Append(_LIBFLAGS=['libs/numeric/mtl/build/xerbla.o']) # not portable !!! # myenv.Library('build/xerbla', 'build/xerbla.c') # myenv.Append(LIBS=['xerbla']) # myenv.Append(LIBPATH=['build']) @@ -176,7 +176,7 @@ def check_for_blas(env): myenv = conf.Finish() if(found_blas == 1): return myenv - + ######################## # check for ATLAS myenv = env.Copy() @@ -192,9 +192,9 @@ def check_for_blas(env): return myenv return env - - + + ################################### # Add UMFPACK (extremely simplistic) ################################### @@ -236,7 +236,7 @@ def check_for_umfpack(env): env.Append(CPPPATH = [ umfpack_path + '/Include' ]) detected_umfpack(env) return env - + @@ -351,12 +351,12 @@ if int(ARGUMENTS.get('full_warnings', 0)): full_warnings = ARGUMENTS.get('full_warnings', 0) -# add user-defined CC flags +# add user-defined CC flags add_ccflag = ARGUMENTS.get('add_ccflag', '') if add_ccflag: env.Append(CCFLAGS = add_ccflag) -# add user-defined CXX flags +# add user-defined CXX flags add_cxxflag = ARGUMENTS.get('add_cxxflag', '') if add_cxxflag: env.Append(CXXFLAGS = add_cxxflag) @@ -379,12 +379,12 @@ add_debug(debug_env) opt = ARGUMENTS.get('opt', 0) # Add optimization flags and then copy C flags into C++ flags -add_opt(debug_env, 0) +add_opt(debug_env, 0) add_opt(env, int(opt)) add_opt(opt_env, 1) add_opt(high_opt_env, 2) -# add user-defined optimization flags +# add user-defined optimization flags add_optflag = ARGUMENTS.get('add_optflag', '') if add_optflag: add_user_opt(env, add_optflag) @@ -400,12 +400,12 @@ check = ARGUMENTS.get('check', 0) Export('env debug_env opt_env high_opt_env check full_warnings') -SConscript(['libs/numeric/mtl/build/SConscript', - 'libs/numeric/mtl/test/SConscript', - 'libs/numeric/mtl/test_with_optimization/SConscript', - 'libs/numeric/mtl/examples/SConscript', +SConscript(['libs/numeric/mtl/build/SConscript', + 'libs/numeric/mtl/test/SConscript', + 'libs/numeric/mtl/test_with_optimization/SConscript', + 'libs/numeric/mtl/examples/SConscript', 'libs/numeric/mtl/experimental/SConscript', - 'libs/numeric/mtl/timing/SConscript', - 'libs/numeric/linear_algebra/test/SConscript', + 'libs/numeric/mtl/timing/SConscript', + 'libs/numeric/linear_algebra/test/SConscript', 'libs/numeric/itl/test/SConscript']) diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/iteration/basic_iteration.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/iteration/basic_iteration.hpp index 369995fd..6c2d59c9 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/iteration/basic_iteration.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/iteration/basic_iteration.hpp @@ -33,27 +33,27 @@ class basic_iteration max_iter(max_iter_), rtol_(t), atol_(a), is_finished(false), my_quite(false), my_suppress(false) { } basic_iteration(Real nb, int max_iter_, Real t, Real a = Real(0)) - : error(0), i(0), norm_r0(nb), max_iter(max_iter_), rtol_(t), atol_(a), is_finished(false), + : error(0), i(0), norm_r0(nb), max_iter(max_iter_), rtol_(t), atol_(a), is_finished(false), my_quite(false), my_suppress(false) {} virtual ~basic_iteration() {} bool check_max() { - if (i >= max_iter) + if (i >= max_iter) error= 1, is_finished= true, err_msg= "Too many iterations."; return is_finished; } template - bool finished(const Vector& r) + bool finished(const Vector& r) { if (converged(two_norm(r))) return is_finished= true; return check_max(); } - bool finished(const Real& r) + bool finished(const Real& r) { if (converged(r)) return is_finished= true; @@ -61,9 +61,9 @@ class basic_iteration } template - bool finished(const std::complex& r) + bool finished(const std::complex& r) { - if (converged(std::abs(r))) + if (converged(std::abs(r))) return is_finished= true; return check_max(); } @@ -75,8 +75,8 @@ class basic_iteration bool converged(const Real& r) { resid_= r; return converged(); } - bool converged() const - { + bool converged() const + { if (norm_r0 == 0) return resid_ <= atol_; // ignore relative tolerance if |r0| is zero return resid_ <= rtol_ * norm_r0 || resid_ <= atol_; @@ -95,7 +95,7 @@ class basic_iteration bool is_converged() const { return is_finished && error == 0; } int iterations() const { return i; } - + int max_iterations() const { return max_iter; } void set_max_iterations(int m) { max_iter= m; } @@ -132,7 +132,7 @@ class basic_iteration error= that.error; err_msg= that.err_msg; is_finished= true; - } else + } else finished(resid_); } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/iteration/cyclic_iteration.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/iteration/cyclic_iteration.hpp index a488a19e..c838f68e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/iteration/cyclic_iteration.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/iteration/cyclic_iteration.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library2 -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_CYCLIC_ITERATION_INCLUDE @@ -20,7 +20,7 @@ namespace itl { /// Class for iteration control that cyclically prints residual template - class cyclic_iteration : public basic_iteration + class cyclic_iteration : public basic_iteration { typedef basic_iteration super; typedef cyclic_iteration self; @@ -29,7 +29,7 @@ namespace itl { { if (!this->my_quite && this->i % cycle == 0) if (multi_print || this->i != last_print) { // Avoid multiple print-outs in same iteration - out << "iteration " << this->i << ": resid " << this->resid() + out << "iteration " << this->i << ": resid " << this->resid() // << " / " << this->norm_r0 << " = " << this->resid() / this->norm_r0 << " (rel. error)" << std::endl; last_print= this->i; @@ -37,7 +37,7 @@ namespace itl { } public: - + template cyclic_iteration(const Vector& r0, int max_iter_, Real tol_, Real atol_ = Real(0), int cycle_ = 100, OStream& out = std::cout) @@ -48,12 +48,12 @@ namespace itl { OStream& out = std::cout) : super(r0, max_iter_, tol_, atol_), cycle(cycle_), last_print(-1), multi_print(false), out(out) {} - + bool finished() { return super::finished(); } template - bool finished(const T& r) + bool finished(const T& r) { bool ret= super::finished(r); print_resid(); @@ -61,7 +61,7 @@ namespace itl { } inline self& operator++() { ++this->i; return *this; } - + inline self& operator+=(int n) { this->i+= n; return *this; } operator int() const { return error_code(); } @@ -72,7 +72,7 @@ namespace itl { /// Set whether the residual is printed multiple times in iteration void set_multi_print(bool m) { multi_print= m; } - int error_code() const + int error_code() const { if (!this->my_suppress) out << "finished! error code = " << this->error << '\n' diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/iteration/noisy_iteration.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/iteration/noisy_iteration.hpp index 73acbdf9..1bfff486 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/iteration/noisy_iteration.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/iteration/noisy_iteration.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_NOISY_ITERATION_INCLUDE @@ -19,7 +19,7 @@ namespace itl { template - class noisy_iteration : public cyclic_iteration + class noisy_iteration : public cyclic_iteration { public: template diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/itl.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/itl.hpp index d802660d..4b28a411 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/itl.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/itl.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_ITL_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/itl_fwd.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/itl_fwd.hpp index 15ddadbd..59976671 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/itl_fwd.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/itl_fwd.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_ITL_FWD_INCLUDE @@ -27,7 +27,7 @@ namespace itl { template struct solver; template class identity; - // template Vector solve(const identity&, const Vector& x); + // template Vector solve(const identity&, const Vector& x); // template Vector adjoint_solve(const identity&, const Vector& x); template class diagonal; @@ -46,39 +46,39 @@ namespace itl { } // namespace pc - template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, + template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, typename Preconditioner, typename Iteration > - int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, + int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, const Preconditioner& M, Iteration& iter); - template < typename LinearOperator, typename Preconditioner= pc::identity, + template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class cg_solver; - template < typename LinearOperator, typename Vector, + template < typename LinearOperator, typename Vector, typename Preconditioner, typename Iteration > int bicg(const LinearOperator &A, Vector &x, const Vector &b, const Preconditioner &M, Iteration& iter); - template < class LinearOperator, class HilbertSpaceX, class HilbertSpaceB, + template < class LinearOperator, class HilbertSpaceX, class HilbertSpaceB, class Preconditioner, class Iteration > - int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, + int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, const Preconditioner& M, Iteration& iter); - template < class LinearOperator, class HilbertSpaceX, class HilbertSpaceB, + template < class LinearOperator, class HilbertSpaceX, class HilbertSpaceB, class Preconditioner, class Iteration > - int bicgstab_2(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, + int bicgstab_2(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, const Preconditioner& M, Iteration& iter); - template < typename LinearOperator, typename Vector, - typename LeftPreconditioner, typename RightPreconditioner, + template < typename LinearOperator, typename Vector, + typename LeftPreconditioner, typename RightPreconditioner, typename Iteration > int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, - const LeftPreconditioner &L, const RightPreconditioner &R, + const LeftPreconditioner &L, const RightPreconditioner &R, Iteration& iter, size_t l); - template < typename LinearOperator, typename Preconditioner= pc::identity, + template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class bicgstab_ell_solver; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicg.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicg.hpp index 9dde56bc..35ca928d 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicg.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicg.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_BICG_INCLUDE @@ -23,7 +23,7 @@ namespace itl { /// Bi-Conjugate Gradient -template < typename LinearOperator, typename Vector, +template < typename LinearOperator, typename Vector, typename Preconditioner, typename Iteration > int bicg(const LinearOperator &A, Vector &x, const Vector &b, const Preconditioner &M, Iteration& iter) @@ -46,7 +46,7 @@ int bicg(const LinearOperator &A, Vector &x, const Vector &b, p= z; p_tilde= z_tilde; } else { - beta= rho_1 / rho_2; + beta= rho_1 / rho_2; p= z + beta * p; p_tilde= z_tilde + conj(beta) * p_tilde; } @@ -65,20 +65,20 @@ int bicg(const LinearOperator &A, Vector &x, const Vector &b, } /// Solver class for BiCG method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class bicg_solver { public: /// Construct solver from a linear operator; generate (left) preconditioner from it - explicit bicg_solver(const LinearOperator& A) : A(A), L(A) + explicit bicg_solver(const LinearOperator& A) : A(A), L(A) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; } /// Construct solver from a linear operator and (left) preconditioner - bicg_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) + bicg_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; @@ -98,7 +98,7 @@ class bicg_solver itl::basic_iteration iter(x, 1, 0, 0); return bicg(A, x, b, L, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab.hpp index c61d4874..91c2a693 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_BICGSTAB_INCLUDE @@ -22,9 +22,9 @@ namespace itl { /// Bi-Conjugate Gradient Stabilized -template < class LinearOperator, class HilbertSpaceX, class HilbertSpaceB, +template < class LinearOperator, class HilbertSpaceX, class HilbertSpaceB, class Preconditioner, class Iteration > -int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, +int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, const Preconditioner& M, Iteration& iter) { typedef typename mtl::Collection::value_type Scalar; @@ -32,7 +32,7 @@ int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, mtl::vampir_trace<7004> tracer; Scalar rho_1(0), rho_2(0), alpha(0), beta(0), gamma, omega(0); - Vector p(resource(x)), phat(resource(x)), s(resource(x)), shat(resource(x)), + Vector p(resource(x)), phat(resource(x)), s(resource(x)), shat(resource(x)), t(resource(x)), v(resource(x)), r(resource(x)), rtilde(resource(x)); r = b - A * x; @@ -58,7 +58,7 @@ int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, alpha = rho_1 / gamma; s = r - alpha * v; - + if (iter.finished(s)) { x += alpha * phat; break; @@ -66,30 +66,30 @@ int bicgstab(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, shat = solve(M, s); t = A * shat; omega = dot(t, s) / dot(t, t); - + x += omega * shat + alpha * phat; r = s - omega * t; - - rho_2 = rho_1; + + rho_2 = rho_1; } return iter; } /// Solver class for BiCGStab method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class bicgstab_solver { public: /// Construct solver from a linear operator; generate (left) preconditioner from it - explicit bicgstab_solver(const LinearOperator& A) : A(A), L(A) + explicit bicgstab_solver(const LinearOperator& A) : A(A), L(A) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; } /// Construct solver from a linear operator and (left) preconditioner - bicgstab_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) + bicgstab_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; @@ -109,7 +109,7 @@ class bicgstab_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_2.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_2.hpp index 01337970..692878d0 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_2.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_2.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_BICGSTAB_2_INCLUDE @@ -30,7 +30,7 @@ namespace itl { /// Bi-Conjugate Gradient Stabilized(2) -template < typename LinearOperator, typename Vector, +template < typename LinearOperator, typename Vector, typename Preconditioner, typename Iteration > int bicgstab_2(const LinearOperator &A, Vector &x, const Vector &b, const Preconditioner &L, Iteration& iter) @@ -47,7 +47,7 @@ int bicgstab_2(const LinearOperator &A, Vector &x, const Vector &b, Vector x0(resource(x)), y(resource(x)); mtl::vector::dense_vector r_hat(l+1,Vector(resource(x))), u_hat(l+1,Vector(resource(x))); - // shift problem + // shift problem x0= zero; r_hat[0]= b; if (two_norm(x) != zero) { @@ -61,7 +61,7 @@ int bicgstab_2(const LinearOperator &A, Vector &x, const Vector &b, r_hat[0]= y; u_hat[0]= zero; - Scalar rho_0(one), rho_1(zero), alpha(zero), Gamma(zero), beta(zero), omega(one); + Scalar rho_0(one), rho_1(zero), alpha(zero), Gamma(zero), beta(zero), omega(one); mtl::matrix::dense2D tau(l+1, l+1); mtl::vector::dense_vector sigma(l+1), gamma(l+1), gamma_a(l+1), gamma_aa(l+1); @@ -70,26 +70,26 @@ int bicgstab_2(const LinearOperator &A, Vector &x, const Vector &b, rho_0= -omega * rho_0; for (Size j= 0; j < 2; ++j) { - rho_1= dot(r0_tilde, r_hat[j]); + rho_1= dot(r0_tilde, r_hat[j]); beta= alpha * rho_1/rho_0; rho_0= rho_1; for (Size i= 0; i <= j; ++i) u_hat[i]= r_hat[i] - beta * u_hat[i]; - + y= A * u_hat[j]; u_hat[j+1]= solve(L, y); - Gamma= dot(r0_tilde, u_hat[j+1]); + Gamma= dot(r0_tilde, u_hat[j+1]); alpha= rho_0 / Gamma; for (Size i= 0; i <= j; ++i) r_hat[i]-= alpha * u_hat[i+1]; - + if (iter.finished(r_hat[j])) { x+= x0; return iter; } - y= A * r_hat[j]; + y= A * r_hat[j]; r_hat[j+1]= solve(L, y); x+= alpha * u_hat[0]; } @@ -98,13 +98,13 @@ int bicgstab_2(const LinearOperator &A, Vector &x, const Vector &b, irange i1m(1, imax); mtl::vector::dense_vector r_hat_tail(r_hat[i1m]); tau[i1m][i1m]= orthogonalize_factors(r_hat_tail); - for (Size j= 1; j <= l; ++j) + for (Size j= 1; j <= l; ++j) gamma_a[j]= dot(r_hat[j], r_hat[0]) / tau[j][j]; gamma[l]= gamma_a[l]; omega= gamma[l]; if (omega == zero) return iter.fail(3, "bicg breakdown #2"); - // is this something like a tri-solve? + // is this something like a tri-solve? for (Size j= l-1; j > 0; --j) { Scalar sum= zero; for (Size i=j+1;i<=l;++i) @@ -130,20 +130,20 @@ int bicgstab_2(const LinearOperator &A, Vector &x, const Vector &b, /// Solver class for BiCGStab(2) method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class bicgstab_2_solver { public: /// Construct solver from a linear operator; generate (left) preconditioner from it - explicit bicgstab_2_solver(const LinearOperator& A) : A(A), L(A) + explicit bicgstab_2_solver(const LinearOperator& A) : A(A), L(A) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; } /// Construct solver from a linear operator and (left) preconditioner - bicgstab_2_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) + bicgstab_2_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; @@ -163,7 +163,7 @@ class bicgstab_2_solver itl::basic_iteration iter(x, 1, 0, 0); return bicgstab_2(A, x, b, L, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_ell.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_ell.hpp index 450eb5cc..21b24965 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_ell.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/bicgstab_ell.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // Written by Jan Bos @@ -31,12 +31,12 @@ namespace itl { -/// Bi-Conjugate Gradient Stabilized(ell) -template < typename LinearOperator, typename Vector, - typename LeftPreconditioner, typename RightPreconditioner, +/// Bi-Conjugate Gradient Stabilized(ell) +template < typename LinearOperator, typename Vector, + typename LeftPreconditioner, typename RightPreconditioner, typename Iteration > int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, - const LeftPreconditioner &L, const RightPreconditioner &R, + const LeftPreconditioner &L, const RightPreconditioner &R, Iteration& iter, size_t l) { mtl::vampir_trace<7006> tracer; @@ -50,7 +50,7 @@ int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, Vector x0(resource(x)), y(resource(x)); mtl::vector::dense_vector r_hat(l+1,Vector(resource(x))), u_hat(l+1,Vector(resource(x))); - // shift problem + // shift problem x0= zero; r_hat[0]= b; if (two_norm(x) != zero) { @@ -64,7 +64,7 @@ int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, r_hat[0]= y; u_hat[0]= zero; - Scalar rho_0(one), rho_1(zero), alpha(zero), Gamma(zero), beta(zero), omega(one); + Scalar rho_0(one), rho_1(zero), alpha(zero), Gamma(zero), beta(zero), omega(one); mtl::matrix::dense2D tau(l+1, l+1); mtl::vector::dense_vector sigma(l+1), gamma(l+1), gamma_a(l+1), gamma_aa(l+1); @@ -73,20 +73,20 @@ int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, rho_0= -omega * rho_0; for (Size j= 0; j < l; ++j) { - rho_1= dot(r0_tilde, r_hat[j]); + rho_1= dot(r0_tilde, r_hat[j]); beta= alpha * rho_1/rho_0; rho_0= rho_1; for (Size i= 0; i <= j; ++i) u_hat[i]= r_hat[i] - beta * u_hat[i]; - + y= A * Vector(solve(R, u_hat[j])); u_hat[j+1]= solve(L, y); - Gamma= dot(r0_tilde, u_hat[j+1]); + Gamma= dot(r0_tilde, u_hat[j+1]); alpha= rho_0 / Gamma; for (Size i= 0; i <= j; ++i) r_hat[i]-= alpha * u_hat[i+1]; - + if (iter.finished(r_hat[j])) { x= solve(R, x); x+= x0; @@ -94,7 +94,7 @@ int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, } r_hat[j+1]= solve(R, r_hat[j]); - y= A * r_hat[j+1]; + y= A * r_hat[j+1]; r_hat[j+1]= solve(L, y); x+= alpha * u_hat[0]; } @@ -103,13 +103,13 @@ int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, irange i1m(1, imax); mtl::vector::dense_vector r_hat_tail(r_hat[i1m]); tau[i1m][i1m]= orthogonalize_factors(r_hat_tail); - for (Size j= 1; j <= l; ++j) + for (Size j= 1; j <= l; ++j) gamma_a[j]= dot(r_hat[j], r_hat[0]) / tau[j][j]; gamma[l]= gamma_a[l]; omega= gamma[l]; if (omega == zero) return iter.fail(3, "bicg breakdown #2"); - // is this something like a tri-solve? + // is this something like a tri-solve? for (Size j= l-1; j > 0; --j) { Scalar sum= zero; for (Size i=j+1;i<=l;++i) @@ -134,7 +134,7 @@ int bicgstab_ell(const LinearOperator &A, Vector &x, const Vector &b, /// Solver class for BiCGStab(ell) method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner, +template < typename LinearOperator, typename Preconditioner, typename RightPreconditioner> class bicgstab_ell_solver { @@ -146,7 +146,7 @@ class bicgstab_ell_solver bicgstab_ell_solver(const LinearOperator& A, size_t l, const Preconditioner& L) : A(A), l(l), L(L), R(A) {} /// Construct solver from a linear operator and left preconditioner - bicgstab_ell_solver(const LinearOperator& A, size_t l, const Preconditioner& L, const RightPreconditioner& R) + bicgstab_ell_solver(const LinearOperator& A, size_t l, const Preconditioner& L, const RightPreconditioner& R) : A(A), l(l), L(L), R(R) {} /// Solve linear system approximately as specified by \p iter @@ -163,7 +163,7 @@ class bicgstab_ell_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; size_t l; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cg.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cg.hpp index f1f2eeed..df6d418b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cg.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cg.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_CG_INCLUDE @@ -33,9 +33,9 @@ namespace itl { /// Conjugate Gradients without preconditioning -template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, +template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, typename Iteration > -int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, +int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, Iteration& iter) { mtl::vampir_trace<7001> tracer; @@ -46,20 +46,20 @@ int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, Scalar rho(0), rho_1(0), alpha(0), alpha_1(0); Vector p(resource(x)), q(resource(x)), r(resource(x)), z(resource(x)); - + r = b - A*x; rho = dot(r, r); while (! iter.finished(Real(sqrt(abs(rho))))) { ++iter; if (iter.first()) p = r; - else - p = r + (rho / rho_1) * p; + else + p = r + (rho / rho_1) * p; // q = A * p; alpha = rho / dot(p, q); (lazy(q)= A * p) || (lazy(alpha_1)= lazy_dot(p, q)); alpha= rho / alpha_1; - + x += alpha * p; rho_1 = rho; (lazy(r) -= alpha * q) || (lazy(rho) = lazy_unary_dot(r)); @@ -69,9 +69,9 @@ int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, } /// Conjugate Gradients -template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, +template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, typename Preconditioner, typename Iteration > -int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, +int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, const Preconditioner& L, Iteration& iter) { using pc::is_identity; @@ -86,7 +86,7 @@ int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, Scalar rho(0), rho_1(0), rr, alpha(0), alpha_1; Vector p(resource(x)), q(resource(x)), r(resource(x)), z(resource(x)); - + r = b - A*x; rr = dot(r, r); while (! iter.finished(Real(sqrt(abs(rr))))) { @@ -95,12 +95,12 @@ int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, if (iter.first()) p = z; - else + else p = z + (rho / rho_1) * p; - + (lazy(q)= A * p) || (lazy(alpha_1)= lazy_dot(p, q)); alpha= rho / alpha_1; - + x += alpha * p; rho_1 = rho; (lazy(r) -= alpha * q) || (lazy(rr) = lazy_unary_dot(r)); @@ -109,29 +109,29 @@ int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, } /// Conjugate Gradients with ignored right preconditioner to unify interface -template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, +template < typename LinearOperator, typename HilbertSpaceX, typename HilbertSpaceB, typename Preconditioner, typename RightPreconditioner, typename Iteration > -int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, +int cg(const LinearOperator& A, HilbertSpaceX& x, const HilbertSpaceB& b, const Preconditioner& L, const RightPreconditioner&, Iteration& iter) { return cg(A, x, b, L, iter); } /// Solver class for CG method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner, +template < typename LinearOperator, typename Preconditioner, typename RightPreconditioner> class cg_solver { public: /// Construct solver from a linear operator; generate (left) preconditioner from it - explicit cg_solver(const LinearOperator& A) : A(A), L(A) + explicit cg_solver(const LinearOperator& A) : A(A), L(A) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; } /// Construct solver from a linear operator and (left) preconditioner - cg_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) + cg_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; @@ -151,7 +151,7 @@ class cg_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cgs.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cgs.hpp index 0fc0705b..ac41db09 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cgs.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/cgs.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_CGS_INCLUDE @@ -21,7 +21,7 @@ namespace itl { /// Conjugate Gradient Squared -template < typename LinearOperator, typename Vector, +template < typename LinearOperator, typename Vector, typename Preconditioner, typename Iteration > int cgs(const LinearOperator &A, Vector &x, const Vector &b, const Preconditioner &M, Iteration& iter) @@ -52,7 +52,7 @@ int cgs(const LinearOperator &A, Vector &x, const Vector &b, u+= q; uhat= solve(M, u); - + x+= alpha * uhat; qhat= A * uhat; r-= alpha * qhat; @@ -63,20 +63,20 @@ int cgs(const LinearOperator &A, Vector &x, const Vector &b, } /// Solver class for CGS method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class cgs_solver { public: /// Construct solver from a linear operator; generate (left) preconditioner from it - explicit cgs_solver(const LinearOperator& A) : A(A), L(A) + explicit cgs_solver(const LinearOperator& A) : A(A), L(A) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; } /// Construct solver from a linear operator and (left) preconditioner - cgs_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) + cgs_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L) { if (!pc::static_is_identity::value) std::cerr << "Right Preconditioner ignored!" << std::endl; @@ -96,7 +96,7 @@ class cgs_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/fsm.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/fsm.hpp index e398bcef..d509fa88 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/fsm.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/fsm.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_FSM_INCLUDE @@ -19,7 +19,7 @@ namespace itl { /// Folded spectrum method /** Computed and named as in http://en.wikipedia.org/wiki/Folded_spectrum_method **/ -template < typename LinearOperator, typename VectorSpace, typename EigenValue, +template < typename LinearOperator, typename VectorSpace, typename EigenValue, typename Damping, typename Iteration > int fsm(const LinearOperator& H, VectorSpace& phi, EigenValue eps, Damping alpha, Iteration& iter) { diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/gmres.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/gmres.hpp index 1a0235a1..02762b03 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/gmres.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/gmres.hpp @@ -29,7 +29,7 @@ namespace itl { /// Generalized Minimal Residual method (without restart) -/** It computes at most kmax_in iterations (or size(x) depending on what is smaller) +/** It computes at most kmax_in iterations (or size(x) depending on what is smaller) regardless on whether the termination criterion is reached or not. **/ template < typename Matrix, typename Vector, typename LeftPreconditioner, typename RightPreconditioner, typename Iteration > int gmres_full(const Matrix &A, Vector &x, const Vector &b, @@ -45,8 +45,8 @@ int gmres_full(const Matrix &A, Vector &x, const Vector &b, Scalar rho, nu, hr; Size k, kmax(std::min(size(x), Size(iter.max_iterations() - iter.iterations()))); Vector r0(b - A *x), r(solve(L,r0)), va(resource(x)), va0(resource(x)), va00(resource(x)); - mtl::matrix::multi_vector V(Vector(resource(x), zero), kmax+1); - mtl::vector::dense_vector s(kmax+1, zero), c(kmax+1, zero), g(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers + mtl::matrix::multi_vector V(Vector(resource(x), zero), kmax+1); + mtl::vector::dense_vector s(kmax+1, zero), c(kmax+1, zero), g(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers mtl::matrix::dense2D H(kmax+1, kmax); // dito H= 0; @@ -60,7 +60,7 @@ int gmres_full(const Matrix &A, Vector &x, const Vector &b, for (k= 0; k < kmax ; ++k, ++iter) { va0= A * Vector(solve(R, V.vector(k))); V.vector(k+1)= va= solve(L,va0); - // orth(V, V[k+1], false); + // orth(V, V[k+1], false); // modified Gram Schmidt method for (Size j= 0; j < k+1; j++) { H[j][k]= dot(V.vector(j), V.vector(k+1)); @@ -74,13 +74,13 @@ int gmres_full(const Matrix &A, Vector &x, const Vector &b, V.vector(k+1)-= hr * V.vector(j); } H[k+1][k]= two_norm(V.vector(k+1)); - if (H[k+1][k] != zero) // watch for breakdown + if (H[k+1][k] != zero) // watch for breakdown V.vector(k+1)*= 1. / H[k+1][k]; // k Given's rotations for(Size i= 0; i < k; i++) mtl::matrix::givens >(H, H[i][k-1], H[i+1][k-1]).trafo(i); - + nu= sqrt(H[k][k]*H[k][k]+H[k+1][k]*H[k+1][k]); if(nu != zero){ c[k]= H[k][k]/nu; @@ -91,7 +91,7 @@ int gmres_full(const Matrix &A, Vector &x, const Vector &b, } rho= abs(g[k+1]); } - + //reduce k, to get regular matrix while (k > 0 && abs(g[k-1]<= iter.atol())) k--; @@ -99,18 +99,18 @@ int gmres_full(const Matrix &A, Vector &x, const Vector &b, irange range(k); for (; !range.empty(); --range) { try { - y[range]= lu_solve(H[range][range], g[range]); + y[range]= lu_solve(H[range][range], g[range]); } catch (mtl::matrix_singular) { continue; } // if singular then try with sub-matrix break; } if (range.finish() < k) - std::cerr << "GMRES orhogonalized with " << k << " vectors but matrix singular, can only use " + std::cerr << "GMRES orhogonalized with " << k << " vectors but matrix singular, can only use " << range.finish() << " vectors!\n"; if (range.empty()) return iter.fail(2, "GMRES did not find any direction to correct x"); x+= Vector(solve(R, Vector(V.vector(range)*y[range]))); - + r= b - A*x; return iter.terminate(r); } @@ -121,7 +121,7 @@ template < typename Matrix, typename Vector, typename LeftPreconditioner, int gmres(const Matrix &A, Vector &x, const Vector &b, LeftPreconditioner &L, RightPreconditioner &R, Iteration& iter, typename mtl::Collection::size_type restart) -{ +{ do { Iteration inner(iter); inner.set_max_iterations(std::min(int(iter.iterations()+restart), iter.max_iterations())); @@ -134,21 +134,21 @@ int gmres(const Matrix &A, Vector &x, const Vector &b, } /// Solver class for GMRES; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class gmres_solver { public: /// Construct solver from a linear operator; generate (left) preconditioner from it - explicit gmres_solver(const LinearOperator& A, size_t restart= 8) + explicit gmres_solver(const LinearOperator& A, size_t restart= 8) : A(A), restart(restart), L(A), R(A) {} /// Construct solver from a linear operator and left preconditioner - gmres_solver(const LinearOperator& A, size_t restart, const Preconditioner& L) + gmres_solver(const LinearOperator& A, size_t restart, const Preconditioner& L) : A(A), restart(restart), L(L), R(A) {} /// Construct solver from a linear operator and left preconditioner - gmres_solver(const LinearOperator& A, size_t restart, const Preconditioner& L, const RightPreconditioner& R) + gmres_solver(const LinearOperator& A, size_t restart, const Preconditioner& L, const RightPreconditioner& R) : A(A), restart(restart), L(L), R(R) {} /// Solve linear system approximately as specified by \p iter @@ -165,7 +165,7 @@ class gmres_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; size_t restart; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/idr_s.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/idr_s.hpp index 9979361a..33eacb06 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/idr_s.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/idr_s.hpp @@ -1,16 +1,16 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. -// Peter Sonneveld and Martin B. van Gijzen, IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. +// Peter Sonneveld and Martin B. van Gijzen, IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. // SIAM J. Sci. Comput. Vol. 31, No. 2, pp. 1035-1062 (2008). (copyright SIAM) #ifndef ITL_IDR_S_INCLUDE @@ -29,12 +29,12 @@ namespace itl { -/// Induced Dimension Reduction on s dimensions (IDR(s)) -template < typename LinearOperator, typename Vector, - typename LeftPreconditioner, typename RightPreconditioner, +/// Induced Dimension Reduction on s dimensions (IDR(s)) +template < typename LinearOperator, typename Vector, + typename LeftPreconditioner, typename RightPreconditioner, typename Iteration > int idr_s(const LinearOperator &A, Vector &x, const Vector &b, - const LeftPreconditioner &, const RightPreconditioner &, + const LeftPreconditioner &, const RightPreconditioner &, Iteration& iter, size_t s) { mtl::vampir_trace<7010> tracer; @@ -49,10 +49,10 @@ int idr_s(const LinearOperator &A, Vector &x, const Vector &b, Scalar omega(zero); Vector x0(x), y(resource(x)), v(resource(x)), t(resource(x)), q(resource(x)), r(b - A * x); mtl::matrix::multi_vector dR(Vector(resource(x), zero), s), dX(Vector(resource(x), zero), s), P(Vector(resource(x), zero), s); - mtl::vector::dense_vector m(s), c(s), dm(s); // replicated in distributed solvers + mtl::vector::dense_vector m(s), c(s), dm(s); // replicated in distributed solvers mtl::matrix::dense2D M(s, s); // dito - random(P); + random(P); P.vector(0)= r; orth(P); @@ -61,20 +61,20 @@ int idr_s(const LinearOperator &A, Vector &x, const Vector &b, omega= dot(v, r) / dot(v, v); dX.vector(k)= omega * r; dR.vector(k)= -omega * v; - x+= dX.vector(k); + x+= dX.vector(k); r+= dR.vector(k); if ((++iter).finished(r)) return iter; - M[iall][k]= trans(P) * dR.vector(k); + M[iall][k]= trans(P) * dR.vector(k); } Size oldest= 0; m= trans(P) * r; while (! iter.finished(r)) { - + for (size_t k= 0; k < s; k++) { c= lu_solve(M, m); - q= dR * -c; + q= dR * -c; v= r + q; if (k == 0) { t= A * v; @@ -101,7 +101,7 @@ int idr_s(const LinearOperator &A, Vector &x, const Vector &b, } /// Solver class for IDR(s) method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class idr_s_solver { @@ -113,7 +113,7 @@ class idr_s_solver idr_s_solver(const LinearOperator& A, size_t s, const Preconditioner& L) : A(A), s(s), L(L), R(A) {} /// Construct solver from a linear operator and left preconditioner - idr_s_solver(const LinearOperator& A, size_t s, const Preconditioner& L, const RightPreconditioner& R) + idr_s_solver(const LinearOperator& A, size_t s, const Preconditioner& L, const RightPreconditioner& R) : A(A), s(s), L(L), R(R) {} /// Solve linear system approximately as specified by \p iter @@ -130,7 +130,7 @@ class idr_s_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; size_t s; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/qmr.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/qmr.hpp index 151c5eeb..8b1baa59 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/qmr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/qmr.hpp @@ -26,7 +26,7 @@ namespace itl { /// Quasi-Minimal Residual method template < typename Matrix, typename Vector,typename LeftPreconditioner, typename RightPreconditioner, typename Iteration > -int qmr(const Matrix& A, Vector& x, const Vector& b, LeftPreconditioner& L, +int qmr(const Matrix& A, Vector& x, const Vector& b, LeftPreconditioner& L, const RightPreconditioner& R, Iteration& iter) { mtl::vampir_trace<7008> tracer; @@ -36,7 +36,7 @@ int qmr(const Matrix& A, Vector& x, const Vector& b, LeftPreconditioner& L, const Scalar zero= math::zero(Scalar()), one= math::one(Scalar()); Scalar beta, gamma(one), gamma_1, delta, eta(-one), ep(one), rho_1, theta(zero), theta_1; - Vector r(b - A * x), v_tld(r), y(solve(L, v_tld)), w_tld(r), z(adjoint_solve(R,w_tld)), v(resource(x)), w(resource(x)), + Vector r(b - A * x), v_tld(r), y(solve(L, v_tld)), w_tld(r), z(adjoint_solve(R,w_tld)), v(resource(x)), w(resource(x)), y_tld(resource(x)), z_tld(resource(x)), p(resource(x)), q(resource(x)), p_tld(resource(x)), d(resource(x)), s(resource(x)); if (iter.finished(r)) @@ -60,7 +60,7 @@ int qmr(const Matrix& A, Vector& x, const Vector& b, LeftPreconditioner& L, return iter.fail(3, "qmr breakdown, delta=0 #3"); y_tld = solve(R,y); - z_tld = adjoint_solve(L,z); + z_tld = adjoint_solve(L,z); if (iter.first()) { p = y_tld; @@ -81,8 +81,8 @@ int qmr(const Matrix& A, Vector& x, const Vector& b, LeftPreconditioner& L, y = solve(L,v_tld); rho_1 = rho; rho = two_norm(y); - w_tld= trans(A)*q - beta*w; - z = adjoint_solve(R, w_tld); + w_tld= trans(A)*q - beta*w; + z = adjoint_solve(R, w_tld); xi = two_norm(z); gamma_1 = gamma; theta_1 = theta; @@ -107,7 +107,7 @@ int qmr(const Matrix& A, Vector& x, const Vector& b, LeftPreconditioner& L, } /// Solver class for Quasi-minimal residual method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class qmr_solver { @@ -119,7 +119,7 @@ class qmr_solver qmr_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L), R(A) {} /// Construct solver from a linear operator and left preconditioner - qmr_solver(const LinearOperator& A, const Preconditioner& L, const RightPreconditioner& R) + qmr_solver(const LinearOperator& A, const Preconditioner& L, const RightPreconditioner& R) : A(A), L(L), R(R) {} /// Solve linear system approximately as specified by \p iter @@ -136,7 +136,7 @@ class qmr_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/repeating_solver.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/repeating_solver.hpp index 9716cf26..ac905e44 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/repeating_solver.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/repeating_solver.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef ITL_REPEATING_SOLVER_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/tfqmr.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/tfqmr.hpp index eb2284bc..5370f16c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/krylov/tfqmr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/krylov/tfqmr.hpp @@ -29,7 +29,7 @@ namespace itl { /// Transposed-free Quasi-minimal residual template < typename Matrix, typename Vector, typename LeftPreconditioner, typename RightPreconditioner, typename Iteration > -int tfqmr(const Matrix &A, Vector &x, const Vector &b, const LeftPreconditioner &L, +int tfqmr(const Matrix &A, Vector &x, const Vector &b, const LeftPreconditioner &L, const RightPreconditioner &R, Iteration& iter) { mtl::vampir_trace<7009> tracer; @@ -40,7 +40,7 @@ int tfqmr(const Matrix &A, Vector &x, const Vector &b, const LeftPreconditioner const Scalar zero= math::zero(Scalar()), one= math::one(Scalar()); Scalar theta(zero), eta(zero), tau, rho, rhon, sigma, alpha, beta, c; - Vector rt(b - A*Vector(solve(R, x))) /* shift x= R*x */, r(solve(L, rt)), u1(resource(x)), u2(resource(x)), + Vector rt(b - A*Vector(solve(R, x))) /* shift x= R*x */, r(solve(L, rt)), u1(resource(x)), u2(resource(x)), y1(resource(x)), y2(resource(x)), w(resource(x)), d(resource(x), zero), v(resource(x)); if (iter.finished(rt)) @@ -94,7 +94,7 @@ int tfqmr(const Matrix &A, Vector &x, const Vector &b, const LeftPreconditioner } /// Solver class for Transposed-free quasi-minimal residual method; right preconditioner ignored (prints warning if not identity) -template < typename LinearOperator, typename Preconditioner= pc::identity, +template < typename LinearOperator, typename Preconditioner= pc::identity, typename RightPreconditioner= pc::identity > class tfqmr_solver { @@ -106,7 +106,7 @@ class tfqmr_solver tfqmr_solver(const LinearOperator& A, const Preconditioner& L) : A(A), L(L), R(A) {} /// Construct solver from a linear operator and left preconditioner - tfqmr_solver(const LinearOperator& A, const Preconditioner& L, const RightPreconditioner& R) + tfqmr_solver(const LinearOperator& A, const Preconditioner& L, const RightPreconditioner& R) : A(A), L(L), R(R) {} /// Solve linear system approximately as specified by \p iter @@ -123,7 +123,7 @@ class tfqmr_solver itl::basic_iteration iter(x, 1, 0, 0); return solve(b, x, iter); } - + private: const LinearOperator& A; Preconditioner L; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/minimization/quasi_newton.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/minimization/quasi_newton.hpp index 2136952b..2a92b363 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/minimization/quasi_newton.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/minimization/quasi_newton.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_QUASI_NEWTON_INCLUDE @@ -25,30 +25,30 @@ namespace itl { /// Quasi-Newton method -template -Vector quasi_newton(Vector& x, F f, Grad grad_f, Step step, Update update, Iter& iter) -{ +Vector quasi_newton(Vector& x, F f, Grad grad_f, Step step, Update update, Iter& iter) +{ typedef typename mtl::Collection::value_type value_type; Vector d, y, x_k, s; Matrix H(size(x), size(x)); - + H= 1; for (; !iter.finished(two_norm(grad_f(x))); ++iter) { - d= H * -grad_f(x); // std::cout << "d is " << d << '\n'; + d= H * -grad_f(x); // std::cout << "d is " << d << '\n'; value_type alpha= step(x, d, f, grad_f); assert(alpha == alpha); x_k= x + alpha * d; // std::cout << "x_k is " << x_k << '\n'; s= alpha * d; // std::cout << "alpha is " << alpha << '\n'; y= grad_f(x_k) - grad_f(x); - update(H, y, s); - x= x_k; + update(H, y, s); + x= x_k; } return x; } /// Quasi-Newton method template -Vector inline quasi_newton(Vector& x, F f, Grad grad_f, Step step, Update update, Iter& iter) +Vector inline quasi_newton(Vector& x, F f, Grad grad_f, Step step, Update update, Iter& iter) { typedef typename mtl::traits::gradient::type hessian_type; // typedef typename mtl::Collection::value_type value_type; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/binary_heap.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/binary_heap.hpp index 399ae33d..4fb6e8d7 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/binary_heap.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/binary_heap.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, rewritten by Cornelius Steinhardt diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/comparators.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/comparators.hpp index 5d660c2b..03380067 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/comparators.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/comparators.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/concat.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/concat.hpp index 6fd880b4..8a079970 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/concat.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/concat.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef ITL_PC_CONCAT_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/diagonal.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/diagonal.hpp index 12c02e04..1694adb0 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/diagonal.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/diagonal.hpp @@ -1,13 +1,13 @@ -// Software License for MTL -// +// Software License for MTL +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_DIAGONAL_INCLUDE @@ -84,7 +84,7 @@ class diagonal protected: mtl::vector::dense_vector inv_diag; -}; +}; /// Solve approximately a sparse system in terms of inverse diagonal template diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ic_0.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ic_0.hpp index d38b8b4a..bfea47a3 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ic_0.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ic_0.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_IC_0_INCLUDE @@ -99,7 +99,7 @@ class ic_0 void adjoint_solve(const VectorIn& x, VectorOut& y) const { mtl::vampir_trace<5044> tracer; - solve(x, y); + solve(x, y); } @@ -109,7 +109,7 @@ class ic_0 protected: template friend struct ic_0_evaluator; - // Dummy type to perform factorization in initializer list not in + // Dummy type to perform factorization in initializer list not in struct factorizer { factorizer(const Matrix &A, U_type& U) @@ -130,25 +130,25 @@ class ic_0 } // Factorization adapted from Saad - // Undefined (runtime) behavior if matrix is not symmetric + // Undefined (runtime) behavior if matrix is not symmetric // UF is type for the factorization - template + template void factorize(const Matrix& A, UF& U, boost::mpl::true_, boost::mpl::true_) { - using namespace mtl; using namespace mtl::tag; using mtl::traits::range_generator; + using namespace mtl; using namespace mtl::tag; using mtl::traits::range_generator; using math::reciprocal; using mtl::matrix::upper; mtl::vampir_trace<5035> tracer; // For the factorization we take still the value_type of A and later we copy it maybe to another value_type typedef typename mtl::Collection::value_type value_type; - typedef typename range_generator::type cur_type; - typedef typename range_generator::type icur_type; + typedef typename range_generator::type cur_type; + typedef typename range_generator::type icur_type; MTL_THROW_IF(num_rows(A) != num_cols(A), mtl::matrix_not_square()); U= upper(A); typename mtl::traits::col::type col(U); - typename mtl::traits::value::type value(U); + typename mtl::traits::value::type value(U); cur_type kc= begin(U), kend= end(U); for (size_type k= 0; kc != kend; ++kc, ++k) { @@ -159,7 +159,7 @@ class ic_0 // U[k][k]= 1.0 / sqrt(U[k][k]); value_type inv_dia= reciprocal(sqrt(value(*ic))); value(*ic, inv_dia); - // icur_type jbegin= + // icur_type jbegin= ++ic; for (; ic != iend; ++ic) { // U[k][i] *= U[k][k] @@ -174,8 +174,8 @@ class ic_0 icur_type jc= begin(irow), jend= end(irow); while (col(*jc) <= k) ++jc; while (col(*--jend) > i) ; - ++jend; - + ++jend; + for (; jc != jend; ++jc) { size_type j= col(*jc); U.lvalue(j, i)-= d * U[k][j]; @@ -191,7 +191,7 @@ class ic_0 L_type L; lower_solver_t lower_solver; upper_solver_t upper_solver; -}; +}; #if 0 template @@ -204,9 +204,9 @@ struct ic_0_solver template void assign_to(VectorOut& y) const - { P.solve(x, y); } + { P.solve(x, y); } - const ic_0& P; + const ic_0& P; const Vector& x; }; #endif @@ -219,7 +219,7 @@ struct ic_0_evaluator typedef typename mtl::Collection::value_type out_value_type; - ic_0_evaluator(VectorOut& y, const Solver& s) + ic_0_evaluator(VectorOut& y, const Solver& s) : y(y), s(s), U(s.P.U), y0(s.P.solve_lower(s.x, y)) { MTL_DEBUG_ARG(lr= 99999999); } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/identity.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/identity.hpp index 22d46f02..16b691dc 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/identity.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/identity.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_IDENTITY_INCLUDE @@ -58,7 +58,7 @@ class identity mtl::vampir_trace<5034> tracer; x= b; } -}; +}; template solver, Vector, false> diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu.hpp index 1be76edc..173ad421 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_ILU_INCLUDE @@ -51,13 +51,13 @@ class ilu typedef mtl::matrix::detail::upper_trisolve_t adjoint_upper_solver_t; /// Factorization adapted from Saad - explicit ilu(const Matrix& A) - : f(A, L, U), lower_solver(L), upper_solver(U), adjoint_L(adjoint(L)), adjoint_U(adjoint(U)), + explicit ilu(const Matrix& A) + : f(A, L, U), lower_solver(L), upper_solver(U), adjoint_L(adjoint(L)), adjoint_U(adjoint(U)), adjoint_lower_solver(adjoint_U), adjoint_upper_solver(adjoint_L) {} template - ilu(const Matrix& A, const FactPara& p) - : f(A, p, L, U), lower_solver(L), upper_solver(U), adjoint_L(adjoint(L)), adjoint_U(adjoint(U)), + ilu(const Matrix& A, const FactPara& p) + : f(A, p, L, U), lower_solver(L), upper_solver(U), adjoint_L(adjoint(L)), adjoint_U(adjoint(U)), adjoint_lower_solver(adjoint_U), adjoint_upper_solver(adjoint_L) {} /// Solve LU y = x --> y= U^{-1} L^{-1} x @@ -130,7 +130,7 @@ class ilu adjoint_lower_solver_t adjoint_lower_solver; adjoint_upper_solver_t adjoint_upper_solver; -}; +}; template class ilu >, Factorizer, V2> // last 2 arguments are dummies @@ -176,9 +176,9 @@ struct ilu_solver template void assign_to(VectorOut& y) const - { P.solve(x, y); } + { P.solve(x, y); } - const pc_type& P; + const pc_type& P; const Vector& x; }; #endif @@ -187,7 +187,7 @@ struct ilu_solver /// Solve LU x = b --> x= U^{-1} L^{-1} b template -// ilu_solver +// ilu_solver solver, Vector, false> inline solve(const ilu& P, const Vector& x) { @@ -197,7 +197,7 @@ inline solve(const ilu& P, const Vector& x) /// Solve (LU)^H x = b --> x= L^{-H} U^{-H} b template -// Vector +// Vector solver, Vector, true> inline adjoint_solve(const ilu& P, const Vector& b) { diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu_0.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu_0.hpp index 3e2109e8..7cc04d3e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu_0.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilu_0.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_ILU_0_INCLUDE @@ -30,7 +30,7 @@ namespace itl { namespace pc { -// Dummy type to perform factorization in initializer list not in +// Dummy type to perform factorization in initializer list not in struct ilu_0_factorizer { template @@ -44,8 +44,8 @@ struct ilu_0_factorizer template void factorize(const Matrix& A, L_type& L, U_type& U, boost::mpl::true_) { - using namespace mtl; using namespace mtl::tag; using mtl::traits::range_generator; - using math::reciprocal; + using namespace mtl; using namespace mtl::tag; using mtl::traits::range_generator; + using math::reciprocal; MTL_THROW_IF(num_rows(A) != num_cols(A), mtl::matrix_not_square()); mtl::vampir_trace<5038> tracer; @@ -55,10 +55,10 @@ struct ilu_0_factorizer typedef mtl::matrix::compressed2D LU_type; LU_type LU(A); - typedef typename range_generator::type cur_type; - typedef typename range_generator::type icur_type; + typedef typename range_generator::type cur_type; + typedef typename range_generator::type icur_type; typename mtl::traits::col::type col(LU); - typename mtl::traits::value::type value(LU); + typename mtl::traits::value::type value(LU); mtl::vector::dense_vector > inv_dia(num_rows(A)); cur_type ic= begin(LU), iend= end(LU); for (size_type i= 0; ic != iend; ++ic, ++i) { @@ -72,14 +72,14 @@ struct ilu_0_factorizer for (icur_type jc= kc + 1; jc != kend; ++jc) value(*jc, value(*jc) - aik * LU[k][col(*jc)]); - // std::cout << "LU after eliminating A[" << i << "][" << k << "] =\n" << LU; + // std::cout << "LU after eliminating A[" << i << "][" << k << "] =\n" << LU; } inv_dia[i]= reciprocal(LU[i][i]); } - invert_diagonal(LU); + invert_diagonal(LU); L= strict_lower(LU); U= upper(LU); - } + } }; template ::value_type> diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilut.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilut.hpp index 707d2f7b..5752c066 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilut.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/ilut.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_ILUT_INCLUDE @@ -48,7 +48,7 @@ struct ilut_factorizer template void factorize(const Matrix& A, const Para& p, L_type& L, U_type& U, boost::mpl::true_) - { + { mtl::vampir_trace<5049> tracer; using std::abs; using mtl::traits::range_generator; using mtl::begin; using mtl::end; using namespace mtl::tag; @@ -56,22 +56,22 @@ struct ilut_factorizer typedef typename mtl::Collection::value_type value_type; typedef typename mtl::Collection::size_type size_type; - typedef typename range_generator::type cur_type; - typedef typename range_generator::type icur_type; + typedef typename range_generator::type cur_type; + typedef typename range_generator::type icur_type; typename mtl::traits::col::type col(A); - typename mtl::traits::const_value::type value(A); + typename mtl::traits::const_value::type value(A); size_type n= num_rows(A); - L.change_dim(n, n); + L.change_dim(n, n); U.change_dim(n, n); { mtl::matrix::inserter L_ins(L, p.first); mtl::matrix::inserter U_ins(U, p.first + 1); // plus one for diagonal - + mtl::vector::sparse_vector vec(n); // corr. row in paper cur_type ic= begin(A); // , iend= end(A); for (size_type i= 0; i < n; ++i, ++ic) { - + for (icur_type kc= begin(ic), kend= end(ic); kc != kend; ++kc) // row= A[i][*] vec.insert(col(*kc), value(*kc)); // std::cerr << "vec_" << i << " = " << vec << std::endl; @@ -96,7 +96,7 @@ struct ilut_factorizer // std::cerr << "vec_" << i << " = " << vec << std::endl; vec.sort_on_data(); // std::cerr << "vec_" << i << " sorted on data = " << vec << std::endl; - + // std::cout << "vec at " << i << " is " << vec << '\n'; // mtl::vampir_trace<9904> tracer2; bool diag_found= false; @@ -111,7 +111,7 @@ struct ilut_factorizer U_ins[i][k] << v; } else // i > k if (cntl++ < p.first) - L_ins[i][k] << v; + L_ins[i][k] << v; } if (!diag_found) std::cerr << "Deleted diagonal!!!!\n"; vec.make_empty(); @@ -128,7 +128,7 @@ class ilut { typedef ilu base; public: - ilut(const Matrix& A, std::size_t p, typename mtl::Collection::value_type tau) + ilut(const Matrix& A, std::size_t p, typename mtl::Collection::value_type tau) : base(A, std::make_pair(p, tau)) {} }; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_algorithms.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_algorithms.hpp index 8bf58cc3..7905a2b3 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_algorithms.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_algorithms.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt @@ -15,7 +15,7 @@ /* * Implementation of the IMF factorization and application routines. */ - + #ifndef MTL_IMF_ALGORITHMS_INCLUDE #define MTL_IMF_ALGORITHMS_INCLUDE @@ -41,7 +41,7 @@ #include "boost/unordered_set.hpp" -namespace itl { namespace pc { +namespace itl { namespace pc { //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // @@ -183,7 +183,7 @@ struct MinConnectedNodesEstimation { std::sort( nodes.begin(), nodes.end() ); int degree = -el.nb_vars()+1; - for(unsigned int i = 1; i < nodes.size(); ++i) + for(unsigned int i = 1; i < nodes.size(); ++i) if( nodes[i-1] != nodes[i] ) if (!UseStatus || status[nodes[i]] == UNMARKED) ++degree; @@ -225,7 +225,7 @@ struct IsRemoved { */ template< typename ValType > template< class Mesh > -void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int maxlofi +void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int maxlofi ) { mtl::vampir_trace<5052> tracer; typedef typename Mesh::element_type element_type; @@ -238,10 +238,10 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m // typedef typename neigh_coll_type::const_iterator const_neigh_iterator; typedef typename element_type::index_type index_type; typedef typename element_type::matrix_type matrix_type; - + typedef typename mtl::matrix::coordinate2D coo_sparse_type_upper; typedef typename mtl::matrix::coordinate2D coo_sparse_type_lower; - + typedef std::map cmap; // typedef typename cmap::iterator cmap_iterator; @@ -274,7 +274,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m elements.push_back( *&it ); ++it; } - + // Data structures for the preconditioner. std::vector block_diagonal; @@ -344,7 +344,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m **************************************************************************/ // Make sure the set of unmarked elements is empty again. - assert( unmarked_elements.empty() ); + assert( unmarked_elements.empty() ); unmarked_elements_degr.clear(); unmarked_elements_srtd.clear(); // Construct the set of available diagonal elements along with their @@ -425,16 +425,16 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m for(unsigned int a= 0; a < size(involve_node); a++){ for(unsigned int b= 0; b < size(involve_neigh); b++){ if(involve_node[a] == involve_neigh[b]) - c++; + c++; } } upperbound+= c*(size(involve_neigh)-c); } } - + // Update permutation offsets. perm_high = perm_off; - + /*************************************************************************** * Phase 2: Compute the update matrices **************************************************************************/ @@ -476,7 +476,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m for(int i = 0; i < n1; ++i) { to_local[p(i)] = i; } - + for(int i = 0; i < n2; ++i) { to_local[q(i)] = mtl::size(p) + i; } @@ -493,7 +493,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m // Remap indices. index_type local_idx( neigh.get_indices() ); - + for(int i = 0; i < neigh.nb_vars(); ++i) { local_idx(i) = to_local[ local_idx(i) ]; } @@ -512,7 +512,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m local_idx(i) = to_local[ local_idx(i) ]; } //insert the diagonal element - { + { mtl::matrix::inserter > ins(frontal); ins << element_matrix( diag_el.get_values(), local_idx, local_idx); @@ -539,15 +539,15 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m mtl::irange n0(0,n1); diag_el.get_values() = inv(mtl::clone(frontal[n0][n0])); frontal[n0][n0] = diag_el.get_values(); - - if( (level <= maxlofi) && (n2 > 0) ) { + + if( (level <= maxlofi) && (n2 > 0) ) { //------------------------------------------------------------------------------ // ELEMENT COALESCING APPROACH //------------------------------------------------------------------------------ // The lofi is below the user-requested level. Use Algorithm 2 // in [1]. // Compute the Schur complement. - mtl::irange n1r(0,n1), n2r(n1, mtl::imax); + mtl::irange n1r(0,n1), n2r(n1, mtl::imax); frontal[n2r][n2r]-= frontal[n2r][n1r] * frontal[n1r][n1r] * frontal[n1r][n2r]; mtl::irange nz(n1,n1+n2); matrix_type Z( mtl::clone(frontal[nz][nz]) ); @@ -557,7 +557,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m elements.push_back( fill ); el_status.push_back( UNMARKED ); - + // Determine the level-2 neighbors. neigh_set_type lvl2_neighs = diag_el.get_level_neighbors( 2 ); // Remove the level-1 neighbors of the diagonal element. @@ -587,7 +587,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m // versa. neigh_neighs.push_back( fill ); fill->get_neighbors().push_back( &neigh ); - + } // Update sequence number. ++max_sequence_number; @@ -620,7 +620,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m } // Compute the Schur complement. - mtl::irange n1r(0,n1), n2r(n1, mtl::imax); + mtl::irange n1r(0,n1), n2r(n1, mtl::imax); frontal[n2r][n2r]-= frontal[n2r][n1r] * frontal[n1r][n1r] * frontal[n1r][n2r]; // Distribute the values of the (modified) update matrix // over the level-1 neighbors. @@ -659,11 +659,11 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m std::cout << "level " << level << " complete: "; std::cout << mesh.get_total_vars()-perm_high << " nodes remaining."<< "\n"; - + ++level; } while( (mesh.get_total_vars() - perm_high > 0) ); // There are still variables to cover. - - + + diagonal_offsets.push_back( mesh.get_total_vars() ); assert( mesh.get_total_vars() - perm_high == 0 ); assert( lower_matrices.size()+2 == diagonal_offsets.size() ); @@ -671,18 +671,18 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m * Phase 3: Apply permutation vector to lower and upper matrices **************************************************************************/ mtl::vampir_trace<9903> tb3; - + mtl::matrix::traits::permutation<>::type P(permutation(m_ordering)); typedef typename coo_sparse_type_lower::size_type size_type; - + for( std::size_t k = 0; k < lower_matrices.size(); ++k ) { coo_sparse_type_lower& L = *(lower_matrices[k]); coo_sparse_type_upper& U = *(upper_matrices[k]); if (nnz(L)> 0) { - std::vector &L_row(L.row_index_array()), - &L_col(L.column_index_array()), - &U_row(U.row_index_array()), + std::vector &L_row(L.row_index_array()), + &L_col(L.column_index_array()), + &U_row(U.row_index_array()), &U_col(U.column_index_array()); const int off_low = diagonal_offsets[k]; for(unsigned int i = 0; i < nnz(L); ++i) { @@ -694,7 +694,7 @@ void itl::pc::imf_preconditioner::factor(const Mesh& mesh , const int m U_col[i] = m_ordering( U_col[i] ); } } - + m_lower.push_back(mtl::matrix::compressed2D(L)); m_upper.push_back(mtl::matrix::compressed2D(U)); } @@ -771,7 +771,7 @@ Vector imf_preconditioner::imf_apply(const Vector& rhs) const assert(off_low <= off_high); // Compute dy = inv(D)*y vector_type dy(n1); - dy = zero; + dy = zero; for(int off = off_low; off < off_high; ++b_off ) { //parallel const int block_size = num_rows( m_diagonal[b_off] ); dy[mtl::irange(off-off_low, off-off_low+block_size)] = m_diagonal[b_off] * res[mtl::irange(off, off + block_size)]; @@ -786,7 +786,7 @@ Vector imf_preconditioner::imf_apply(const Vector& rhs) const // Backward elimination. { - mtl::vampir_trace<9902> tb2; + mtl::vampir_trace<9902> tb2; int b_off = m_nb_blocks-1; for(int level = m_levels-1; level >= 0; --level) { @@ -794,7 +794,7 @@ Vector imf_preconditioner::imf_apply(const Vector& rhs) const const int off_high = m_diagonal_index[level+1]; // y' = y - Fx // assert( m_upper[level] ); - + vector_type yp(m_upper[level] * res); res[mtl::irange(off_low, off_high) ] -= yp[mtl::irange(0, off_high-off_low) ]; // y = inv(D)*y' diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_preconditioner.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_preconditioner.hpp index 728a97d7..d76732f7 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_preconditioner.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/imf_preconditioner.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt @@ -88,7 +88,7 @@ public: } /// Destructor - ~imf_preconditioner() + ~imf_preconditioner() { delete[] m_diagonal_index; delete[] m_diagonal; @@ -102,7 +102,7 @@ private: /// Constructs the IMF preconditioner.Forward declaration template< class ElementStructure > - void factor(const ElementStructure&, const int); + void factor(const ElementStructure&, const int); public: @@ -115,13 +115,13 @@ public: /// Applies the preconditioner to the given matrix. template - void solve(const VectorIn& b, VectorOut& x) const + void solve(const VectorIn& b, VectorOut& x) const { VectorIn m(trans(P)*b), m_tmp(imf_apply(m)); x= P * m_tmp; - } + } -private: +private: /// Applies the preconditioner prototype template< class Vector > Vector imf_apply(const Vector&) const; @@ -140,7 +140,7 @@ private: /// The number of levels (equals the number of entries in the diagonal index array minus one). int m_levels; - + /** The index array for the matrices on the block diagonal. The i^th entry * indicates where the i^th level of block diagonal matrices starts in the * right hand side vector. */ @@ -156,7 +156,7 @@ private: upper_matrix_coll_type m_upper; }; -/// Solve +/// Solve template solver, Vector, false> inline solve(const imf_preconditioner& P, const Vector& b) diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/is_identity.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/is_identity.hpp index 5a5ce519..6074646a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/is_identity.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/is_identity.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_IS_IDENTITY_INCLUDE @@ -19,7 +19,7 @@ namespace itl { namespace pc { template -bool is_identity(const PC&) +bool is_identity(const PC&) { return false; } template diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/matrix_algorithms.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/matrix_algorithms.hpp index b0f73b75..6f815903 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/matrix_algorithms.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/matrix_algorithms.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt @@ -26,9 +26,9 @@ namespace mtl { namespace matrix { -/// Construct the sparse data structure from an elementstructure -template< typename ElementStructure, typename Matrix, typename Vector> -void assemble_compressed(const ElementStructure& es, Matrix& A, Vector& order) +/// Construct the sparse data structure from an elementstructure +template< typename ElementStructure, typename Matrix, typename Vector> +void assemble_compressed(const ElementStructure& es, Matrix& A, Vector& order) { typedef typename ElementStructure::element_type::value_type value_type; @@ -40,7 +40,7 @@ void assemble_compressed(const ElementStructure& es, Matrix& A, Vector& order) A.change_dim(es.get_total_vars(), es.get_total_vars()); set_to_zero(A); value_type zero(0); - + {//start inserterblock mtl::matrix::inserter > ins(A); for(iterator it = es.element_begin(); it != es.element_end(); ++it) { @@ -59,9 +59,9 @@ void assemble_compressed(const ElementStructure& es, Matrix& A, Vector& order) } -/// Construct the sparse data structure from an elementstructure -template< typename ElementStructure, typename Matrix> -void assemble_compressed(const ElementStructure& es, Matrix& A) +/// Construct the sparse data structure from an elementstructure +template< typename ElementStructure, typename Matrix> +void assemble_compressed(const ElementStructure& es, Matrix& A) { typedef typename ElementStructure::element_type::matrix_type::size_type size_type; mtl::dense_vector ident(es.get_total_vars()); diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/solver.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/solver.hpp index 2afcf730..7125e219 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/solver.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/solver.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_PC_SOLVER_INCLUDE @@ -32,22 +32,22 @@ struct solver /// Assign result to vector \p y, if possible without copying template void assign_to(VectorOut& y) const - { + { mtl::vampir_trace<5055> tracer; - assign_to(y, boost::mpl::bool_()); - } + assign_to(y, boost::mpl::bool_()); + } protected: template void assign_to(VectorOut& y, boost::mpl::false_) const - { P.solve(x, y); } - + { P.solve(x, y); } + template void assign_to(VectorOut& y, boost::mpl::true_) const - { P.adjoint_solve(x, y); } + { P.adjoint_solve(x, y); } - const pc_type& P; + const pc_type& P; const Vector& x; }; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/sorting.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/sorting.hpp index a118f3ec..aea9658b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/sorting.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/sorting.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/pc/sub_matrix_pc.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/pc/sub_matrix_pc.hpp index 20d48a9e..0f0b22bc 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/pc/sub_matrix_pc.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/pc/sub_matrix_pc.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef ITL_PC_SUB_MATRIX_PC_INCLUDE @@ -25,9 +25,9 @@ namespace itl { namespace pc { /// Class for applying \tparam Preconditioner only on a sub-matrix -/** Other entries are just copied. +/** Other entries are just copied. Optionally preconditioner can be referred from outside instead of storing it by setting - \tparam Store to true. + \tparam Store to true. **/ template class sub_matrix_pc @@ -37,11 +37,11 @@ class sub_matrix_pc struct matrix_container { - matrix_container() : Ap(0) {} + matrix_container() : Ap(0) {} matrix_container(const tag_type& tags, const Matrix& src) { - using std::size_t; + using std::size_t; using namespace mtl; mtl::vector::dense_vector perm(size(tags)); @@ -54,22 +54,22 @@ class sub_matrix_pc Ap= new Matrix(n, n); - typename traits::row::type row(src); - typename traits::col::type col(src); - typename traits::const_value::type value(src); + typename traits::row::type row(src); + typename traits::col::type col(src); + typename traits::const_value::type value(src); typedef typename traits::range_generator::type cursor_type; matrix::inserter ins(*Ap, Ap->nnz() / Ap->dim1()); - - for (cursor_type cursor = mtl::begin(src), cend = mtl::end(src); + + for (cursor_type cursor = mtl::begin(src), cend = mtl::end(src); cursor != cend; ++cursor) { // std::cout << dest << '\n'; - + typedef typename traits::range_generator::type icursor_type; - for (icursor_type icursor = mtl::begin(cursor), icend = mtl::end(cursor); - icursor != icend; ++icursor) + for (icursor_type icursor = mtl::begin(cursor), icend = mtl::end(cursor); + icursor != icend; ++icursor) if (tags[row(*icursor)] && tags[col(*icursor)]) - ins(perm[row(*icursor)], perm[col(*icursor)]) << value(*icursor); + ins(perm[row(*icursor)], perm[col(*icursor)]) << value(*icursor); } } @@ -82,7 +82,7 @@ class sub_matrix_pc { using mtl::size; size_t n= 0; - for (size_t i= 0; i < size(tags); ++i) + for (size_t i= 0; i < size(tags); ++i) if (tags[i]) ++n; return n; } @@ -93,7 +93,7 @@ class sub_matrix_pc : tags(tags), n(count_entries()), mc(tags, A), P(*mc.Ap) { BOOST_STATIC_ASSERT((Store)); - delete mc.Ap; + delete mc.Ap; mc.Ap= 0; } @@ -123,19 +123,19 @@ class sub_matrix_pc template void restrict(const VectorIn& x, VectorIn& x0) const { - for (size_t i= 0, j= 0; i < size(tags); ++i) - if (tags[i]) + for (size_t i= 0, j= 0; i < size(tags); ++i) + if (tags[i]) x0[j++]= x[i]; } template void prolongate(const VectorIn& x, const VectorOut& y0, VectorOut& y) const { - for (size_t i= 0, j= 0; i < size(tags); ++i) - if (tags[i]) + for (size_t i= 0, j= 0; i < size(tags); ++i) + if (tags[i]) y[i]= y0[j++]; else - y[i]= x[i]; + y[i]= x[i]; } public: diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/gauss_seidel.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/gauss_seidel.hpp index 0703b71c..a64b32b0 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/gauss_seidel.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/gauss_seidel.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_GAUSS_SEIDEL_INCLUDE @@ -27,9 +27,9 @@ namespace itl { /// Gauss-Seidel smoother /** Constructor takes references to a matrix and a right-hand side vector. - operator() is applied on a vector and changes it in place. + operator() is applied on a vector and changes it in place. Matrix must be square, stored row-major and free of zero entries in the diagonal. - Vectors b and x must have the same number of rows as A. + Vectors b and x must have the same number of rows as A. **/ template class gauss_seidel @@ -38,7 +38,7 @@ class gauss_seidel typedef typename mtl::Collection::size_type size_type; public: /// Construct with constant references to matrix and RHS vector - gauss_seidel(const Matrix& A) : A(A), dia_inv(num_rows(A)) + gauss_seidel(const Matrix& A) : A(A), dia_inv(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS assert(num_rows(A) == num_cols(A)); // Matrix must be square @@ -55,21 +55,21 @@ class gauss_seidel { mtl::vampir_trace<8551> tracer; namespace tag= mtl::tag; using namespace mtl::traits; - using mtl::begin; using mtl::end; + using mtl::begin; using mtl::end; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type a_icur_type; - typename col::type col_a(A); - typename const_value::type value_a(A); + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type a_icur_type; + typename col::type col_a(A); + typename const_value::type value_a(A); typedef typename mtl::Collection::value_type value_type; a_cur_type ac= begin(A), aend= end(A); for (unsigned i= 0; ac != aend; ++ac, ++i) { value_type tmp= b[i]; - for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) + for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) if (col_a(*aic) != i) - tmp-= value_a(*aic) * x[col_a(*aic)]; + tmp-= value_a(*aic) * x[col_a(*aic)]; x[i]= dia_inv[i] * tmp; } return x; @@ -80,7 +80,7 @@ class gauss_seidel mtl::vector::dense_vector dia_inv; }; - + template class gauss_seidel > { @@ -89,7 +89,7 @@ class gauss_seidel > typedef typename mtl::Collection::size_type size_type; public: /// Construct with constant references to matrix and RHS vector - gauss_seidel(const Matrix& A) + gauss_seidel(const Matrix& A) : A(A), dia_inv(num_rows(A)), dia_pos(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS @@ -108,7 +108,7 @@ class gauss_seidel > { mtl::vampir_trace<8551> tracer; typedef typename mtl::Collection::value_type value_type; - typedef typename mtl::Collection::size_type size_type; + typedef typename mtl::Collection::size_type size_type; const size_type nr= num_rows(A); size_type cj1= A.ref_major()[0]; for (size_type i= 0; i < nr; ++i) { @@ -119,8 +119,8 @@ class gauss_seidel > tmp-= A.data[cj0] * x[A.ref_minor()[cj0]]; for (size_type j= cjm+1; j < cj1; j++) tmp-= A.data[j] * x[A.ref_minor()[j]]; - x[i]= dia_inv[i] * tmp; - } + x[i]= dia_inv[i] * tmp; + } return x; } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jacobi.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jacobi.hpp index 55436ad0..ad547a01 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jacobi.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jacobi.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_JACOBI_INCLUDE @@ -27,9 +27,9 @@ namespace itl { /// Jacobi smoother /** Constructor takes references to a matrix and a right-hand side vector. - operator() is applied on a vector and changes it in place. + operator() is applied on a vector and changes it in place. Matrix must be square, stored row-major and free of zero entries in the diagonal. - Vectors b and x must have the same number of rows as A. + Vectors b and x must have the same number of rows as A. **/ template class jacobi @@ -38,7 +38,7 @@ class jacobi typedef typename mtl::Collection::size_type size_type; public: /// Construct with constant references to matrix and RHS vector - jacobi(const Matrix& A) : A(A), dia_inv(num_rows(A)) + jacobi(const Matrix& A) : A(A), dia_inv(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS assert(num_rows(A) == num_cols(A)); // Matrix must be square @@ -56,20 +56,20 @@ class jacobi namespace tag= mtl::tag; using namespace mtl::traits; using mtl::begin; using mtl::end; using std::swap; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type a_icur_type; - typename col::type col_a(A); - typename const_value::type value_a(A); + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type a_icur_type; + typename col::type col_a(A); + typename const_value::type value_a(A); typedef typename mtl::Collection::value_type value_type; - static Vector x0(resource(x)); + static Vector x0(resource(x)); a_cur_type ac= begin(A), aend= end(A); for (unsigned i= 0; ac != aend; ++ac, ++i) { value_type tmp= b[i]; - for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) + for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) if (col_a(*aic) != i) - tmp-= value_a(*aic) * x[col_a(*aic)]; + tmp-= value_a(*aic) * x[col_a(*aic)]; x0[i]= dia_inv[i] * tmp; } swap(x0, x); @@ -81,7 +81,7 @@ class jacobi mtl::vector::dense_vector dia_inv; }; - + template class jacobi > { @@ -90,7 +90,7 @@ class jacobi > typedef typename mtl::Collection::size_type size_type; public: /// Construct with constant references to matrix and RHS vector - jacobi(const Matrix& A) + jacobi(const Matrix& A) : A(A), dia_inv(num_rows(A)), dia_pos(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS @@ -108,9 +108,9 @@ class jacobi > Vector& operator()(Vector& x, const RHSVector& b) const { typedef typename mtl::Collection::value_type value_type; - typedef typename mtl::Collection::size_type size_type; + typedef typename mtl::Collection::size_type size_type; const size_type nr= num_rows(A); - static Vector x0(resource(x)); + static Vector x0(resource(x)); size_type cj1= A.ref_major()[0]; for (size_type i= 0; i < nr; ++i) { value_type tmp= b[i]; @@ -120,8 +120,8 @@ class jacobi > tmp-= A.data[cj0] * x[A.ref_minor()[cj0]]; for (size_type j= cjm+1; j < cj1; j++) tmp-= A.data[j] * x[A.ref_minor()[j]]; - x0[i]= dia_inv[i] * tmp; - } + x0[i]= dia_inv[i] * tmp; + } swap(x0, x); return x; } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jor.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jor.hpp index 42b7df7c..da2564f2 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jor.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/jor.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_JOR_INCLUDE @@ -28,9 +28,9 @@ namespace itl { /// Jacobi smoother with relaxation /** Constructor takes references to a matrix and a right-hand side vector. - operator() is applied on a vector and changes it in place. + operator() is applied on a vector and changes it in place. Matrix must be square, stored row-major and free of zero entries in the diagonal. - Vectors b and x must have the same number of rows as A. + Vectors b and x must have the same number of rows as A. **/ template class jor @@ -39,7 +39,7 @@ class jor typedef typename mtl::Collection::size_type size_type; public: /// Construct with constant references to matrix and RHS vector - jor(const Matrix& A) : A(A), dia_inv(num_rows(A)) + jor(const Matrix& A) : A(A), dia_inv(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS assert(num_rows(A) == num_cols(A)); // Matrix must be square @@ -57,20 +57,20 @@ class jor namespace tag= mtl::tag; using namespace mtl::traits; using mtl::begin; using mtl::end; using std::swap; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type a_icur_type; - typename col::type col_a(A); - typename const_value::type value_a(A); + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type a_icur_type; + typename col::type col_a(A); + typename const_value::type value_a(A); typedef typename mtl::Collection::value_type value_type; - static Vector x0(resource(x)); + static Vector x0(resource(x)); a_cur_type ac= begin(A), aend= end(A); for (unsigned i= 0; ac != aend; ++ac, ++i) { value_type tmp= b[i]; - for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) + for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) if (col_a(*aic) != i) - tmp-= value_a(*aic) * x[col_a(*aic)]; + tmp-= value_a(*aic) * x[col_a(*aic)]; x0[i]= Omega::value * (dia_inv[i] * tmp) + (1. - Omega::value)*x0[i]; } swap(x0, x); @@ -82,7 +82,7 @@ class jor mtl::vector::dense_vector dia_inv; }; - + template class jor , Omega> { @@ -91,7 +91,7 @@ class jor , Omega> typedef typename mtl::Collection::size_type size_type; public: /// Construct with constant references to matrix and RHS vector - jor(const Matrix& A) + jor(const Matrix& A) : A(A), dia_inv(num_rows(A)), dia_pos(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS @@ -109,9 +109,9 @@ class jor , Omega> Vector& operator()(Vector& x, const RHSVector& b) const { typedef typename mtl::Collection::value_type value_type; - typedef typename mtl::Collection::size_type size_type; + typedef typename mtl::Collection::size_type size_type; const size_type nr= num_rows(A); - static Vector x0(resource(x)); + static Vector x0(resource(x)); size_type cj1= A.ref_major()[0]; for (size_type i= 0; i < nr; ++i) { value_type tmp= b[i]; @@ -121,8 +121,8 @@ class jor , Omega> tmp-= A.data[cj0] * x[A.ref_minor()[cj0]]; for (size_type j= cjm+1; j < cj1; j++) tmp-= A.data[j] * x[A.ref_minor()[j]]; - x0[i] = Omega::value * (dia_inv[i] * tmp) + (1. - Omega::value)*x0[i]; - } + x0[i] = Omega::value * (dia_inv[i] * tmp) + (1. - Omega::value)*x0[i]; + } swap(x0, x); return x; } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/relaxation_parameter.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/relaxation_parameter.hpp index 800d194f..e19bf896 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/relaxation_parameter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/relaxation_parameter.hpp @@ -1,6 +1,6 @@ /* * Marcel Schiffel, 13.10.11 - * + * * definition of default relaxation parameter for iterative solvers */ diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/repeated.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/repeated.hpp index e569ad4d..a017d080 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/repeated.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/repeated.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_REPEATED_INCLUDE @@ -21,7 +21,7 @@ class repeated { public: - typedef Smoother smoother_type; + typedef Smoother smoother_type; /// Construct with \p smoother repeated(const Smoother& smoother) : smoother(smoother) {} diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/sor.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/sor.hpp index 902b2306..261c3b77 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/smoother/sor.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/smoother/sor.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_SOR_INCLUDE @@ -28,19 +28,19 @@ namespace itl { /// Gauss-Seidel smoother with relaxation /** Constructor takes references to a matrix and a right-hand side vector. - operator() is applied on a vector and changes it in place. + operator() is applied on a vector and changes it in place. Matrix must be square, stored row-major and free of zero entries in the diagonal. - Vectors b and x must have the same number of rows as A. + Vectors b and x must have the same number of rows as A. **/ template class sor { typedef typename mtl::Collection::value_type Scalar; typedef typename mtl::Collection::size_type size_type; - + public: /// Construct with constant references to matrix and RHS vector - sor(const Matrix& A) : A(A), dia_inv(num_rows(A)) + sor(const Matrix& A) : A(A), dia_inv(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS assert(num_rows(A) == num_cols(A)); // Matrix must be square @@ -56,21 +56,21 @@ class sor Vector& operator()(Vector& x, const RHSVector& b) const { namespace tag= mtl::tag; using namespace mtl::traits; - using mtl::begin; using mtl::end; + using mtl::begin; using mtl::end; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type a_icur_type; - typename col::type col_a(A); - typename const_value::type value_a(A); + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type a_icur_type; + typename col::type col_a(A); + typename const_value::type value_a(A); typedef typename mtl::Collection::value_type value_type; a_cur_type ac= begin(A), aend= end(A); for (unsigned i= 0; ac != aend; ++ac, ++i) { value_type tmp= b[i]; - for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) + for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) if (col_a(*aic) != i) - tmp-= value_a(*aic) * x[col_a(*aic)]; + tmp-= value_a(*aic) * x[col_a(*aic)]; x[i] = Omega::value * (dia_inv[i] * tmp) + (1. - Omega::value)*x[i]; } return x; @@ -81,17 +81,17 @@ class sor mtl::vector::dense_vector dia_inv; }; - + template class sor , Omega> { typedef mtl::matrix::compressed2D Matrix; typedef typename mtl::Collection::value_type Scalar; typedef typename mtl::Collection::size_type size_type; - + public: /// Construct with constant references to matrix and RHS vector - sor(const Matrix& A) + sor(const Matrix& A) : A(A), dia_inv(num_rows(A)), dia_pos(num_rows(A)) { BOOST_STATIC_ASSERT((mtl::traits::is_row_major::value)); // No CCS @@ -109,7 +109,7 @@ class sor , Omega> Vector& operator()(Vector& x, const RHSVector& b) const { typedef typename mtl::Collection::value_type value_type; - typedef typename mtl::Collection::size_type size_type; + typedef typename mtl::Collection::size_type size_type; const size_type nr= num_rows(A); size_type cj1= A.ref_major()[0]; for (size_type i= 0; i < nr; ++i) { @@ -120,8 +120,8 @@ class sor , Omega> tmp-= A.data[cj0] * x[A.ref_minor()[cj0]]; for (size_type j= cjm+1; j < cj1; j++) tmp-= A.data[j] * x[A.ref_minor()[j]]; - x[i]= Omega::value * (dia_inv[i] * tmp) + (1. - Omega::value)*x[i]; - } + x[i]= Omega::value * (dia_inv[i] * tmp) + (1. - Omega::value)*x[i]; + } return x; } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/stepper/armijo.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/stepper/armijo.hpp index 8f4aa41b..edcf5758 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/stepper/armijo.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/stepper/armijo.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling, Cornelius Steinhardt and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_ARMIJO_INCLUDE @@ -16,7 +16,7 @@ namespace itl { /// Step size control by Armijo -/** +/** **/ template class armijo @@ -28,16 +28,16 @@ class armijo armijo(Value delta= 0.5, Value gamma= 0.5, Value beta1= 0.25, Value beta2= 0.5) : delta(delta), gamma(gamma), beta1(beta1), beta((beta1 + beta2) / 2.0) {} - /// + /// template - typename mtl::Collection::value_type + typename mtl::Collection::value_type operator() (const Vector& x, const Vector& d, F f, Grad grad_f) const { // Star's step size typename mtl::Collection::value_type alpha= -gamma * dot(grad_f(x), d) / dot(d, d); Vector x_k(x + alpha * d); - while (f(x_k) > f(x) + (beta1 * alpha) * dot(grad_f(x), d)) { + while (f(x_k) > f(x) + (beta1 * alpha) * dot(grad_f(x), d)) { alpha*= beta; x_k= x+ alpha * d; } diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/stepper/wolf.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/stepper/wolf.hpp index fedf04f3..01b06c66 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/stepper/wolf.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/stepper/wolf.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling, Cornelius Steinhardt and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_WOLF_INCLUDE @@ -16,7 +16,7 @@ namespace itl { /// Step size control by Wolf -/** +/** **/ template class wolf @@ -28,9 +28,9 @@ class wolf wolf(Value delta= 0.5, Value gamma= 0.5, Value beta1= 0.25, Value beta2= 0.5) : delta(delta), gamma(gamma), beta1(beta1), beta2(beta2) {} - /// + /// template - typename mtl::Collection::value_type + typename mtl::Collection::value_type operator() (const Vector& x, const Vector& d, F f, Grad grad_f) const { // Star's step size @@ -38,15 +38,15 @@ class wolf Vector x_k(x + alpha * d); Value beta= (beta1 + beta2) / 2; - while (f(x_k) > f(x) + (beta1 * alpha) * dot(grad_f(x), d) - && dot(grad_f(x_k), d) < beta2 * dot(grad_f(x), d)) { + while (f(x_k) > f(x) + (beta1 * alpha) * dot(grad_f(x), d) + && dot(grad_f(x_k), d) < beta2 * dot(grad_f(x), d)) { alpha*= beta; x_k= x+ alpha * d; } return alpha; } private: - Value delta, gamma, beta1, beta2; + Value delta, gamma, beta1, beta2; }; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/updater/bfgs.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/updater/bfgs.hpp index dde51839..9c895d63 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/updater/bfgs.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/updater/bfgs.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_BFGS_INCLUDE @@ -22,7 +22,7 @@ namespace itl { /// Update of Hessian matrix for e.g. Quasi-Newton by Broyden, Fletcher, Goldfarb, and Shanno struct bfgs { - /// \f$ H_{k+1}=B_{k+1}^{-1}=(I-\frac{y_k\cdot s_k^T}{y_k^T\cdot s_k})^T\cdot H_k \cdot (I-\frac{y_k\cdot s_k^T}{y_k^T\cdot s_k}) + \frac{s_k\cdot s_k^T}{y_k^T\cdot s_k}\f$ + /// \f$ H_{k+1}=B_{k+1}^{-1}=(I-\frac{y_k\cdot s_k^T}{y_k^T\cdot s_k})^T\cdot H_k \cdot (I-\frac{y_k\cdot s_k^T}{y_k^T\cdot s_k}) + \frac{s_k\cdot s_k^T}{y_k^T\cdot s_k}\f$ template void operator() (Matrix& H, const Vector& y, const Vector& s) { @@ -35,7 +35,7 @@ struct bfgs H2(A * H * trans(A) + gamma * s * trans(s)); swap(H2, H); // faster than H= H2 } -}; +}; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/updater/broyden.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/updater/broyden.hpp index 40b34703..ea0dc083 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/updater/broyden.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/updater/broyden.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_BROYDEN_INCLUDE @@ -36,7 +36,7 @@ struct broyden H2(H + A * H); swap(H2, H); // faster than H= H2 } -}; +}; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/updater/dfp.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/updater/dfp.hpp index 87150111..7d7605b3 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/updater/dfp.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/updater/dfp.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_DFP_INCLUDE @@ -37,7 +37,7 @@ struct dfp H2(H - H * A * H + gamma * s * trans(s)); swap(H2, H); // faster than H= H2 } -}; +}; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/updater/psb.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/updater/psb.hpp index 304da779..ca680d57 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/updater/psb.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/updater/psb.hpp @@ -31,7 +31,7 @@ struct psb Vector a(s - H * y); value_type gamma= 1 / dot (y, y); MTL_THROW_IF(gamma == 0.0, unexpected_orthogonality()); - + H+= gamma * a * trans(y) + gamma * y * trans(a) - dot(a, y) * gamma * gamma * y * trans(y); } }; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/updater/sr1.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/updater/sr1.hpp index a8caaace..3d669e90 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/updater/sr1.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/updater/sr1.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_SR1_INCLUDE @@ -31,7 +31,7 @@ struct sr1 MTL_THROW_IF(dot(d, y) == 0.0, unexpected_orthogonality()); H+= 1 / dot(d, y) * d * trans(d); } -}; +}; diff --git a/AMDiS/lib/mtl4/boost/numeric/itl/utility/exception.hpp b/AMDiS/lib/mtl4/boost/numeric/itl/utility/exception.hpp index 4ce324c1..8db06f5b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/itl/utility/exception.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/itl/utility/exception.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef ITL_EXCEPTION_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/accumulate.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/accumulate.hpp index 05572bd0..ca760955 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/accumulate.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/accumulate.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. @@ -37,17 +37,17 @@ Value inline accumulate(Iter first, Iter last, Value init, Op op) template requires std::Callable2 && std::CopyAssignable::result_type> - && Commutative - && Monoid + && Commutative + && Monoid && std::Convertible::identity_result_type, Value> Value inline accumulate(Iter first, Iter last, Value init, Op op) { // std::cout << "Unrolled accumulate\n"; typedef typename std::RandomAccessIterator::difference_type difference_type; - Value t0= identity(op, init), t1= identity(op, init), + Value t0= identity(op, init), t1= identity(op, init), t2= identity(op, init), t3= init; difference_type size= last - first, bsize= size >> 2 << 2, i; - + for (i= 0; i < bsize; i+= 4) { t0= op(t0, Value(first[i])); t1= op(t1, Value(first[i+1])); diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/algebraic_concepts.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/algebraic_concepts.hpp index 6b881701..0f5e3fef 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/algebraic_concepts.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/algebraic_concepts.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef LA_ALGEBRAIC_CONCEPTS_DOC_INCLUDE @@ -15,7 +15,7 @@ #ifdef __GXX_CONCEPTS__ # include -#else +#else # include #endif @@ -33,7 +33,7 @@ namespace algebra { //! Concept Commutative /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Notation: @@ -55,15 +55,15 @@ namespace algebra {
      */ template - struct Commutative + struct Commutative {}; -#else +#else concept Commutative { axiom Commutativity(Operation op, Element x, Element y) { - op(x, y) == op(y, x); - } + op(x, y) == op(y, x); + } }; #endif @@ -72,7 +72,7 @@ namespace algebra { //! Concept Associative /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Notation: @@ -101,7 +101,7 @@ namespace algebra { { axiom Associativity(Operation op, Element x, Element y, Element z) { - op(x, op(y, z)) == op(op(x, y), z); + op(x, op(y, z)) == op(op(x, y), z); } }; #endif @@ -111,7 +111,7 @@ namespace algebra { //! Concept SemiGroup /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \note -# The algebraic concept SemiGroup only requires associativity and is identical with the concept Associative. @@ -131,7 +131,7 @@ namespace algebra { //! Concept Monoid /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - SemiGroup @@ -160,15 +160,15 @@ namespace algebra { */ template struct Monoid - : SemiGroup + : SemiGroup { /// Associated type; if not defined in concept_map automatically detected as result of identity - typedef associated_type identity_result_type; + typedef associated_type identity_result_type; identity_result_type identity(Operation, Element); ///< Identity element of Operation }; #else concept Monoid - : SemiGroup + : SemiGroup { typename identity_result_type; identity_result_type identity(Operation, Element); @@ -186,13 +186,13 @@ namespace algebra { { typename inverse_result_type; inverse_result_type inverse(Operation, Element); - + }; #else //! Concept Inversion /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Associated Types: - inverse_result_type @@ -225,7 +225,7 @@ namespace algebra { //! Concept Group /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - Monoid @@ -269,7 +269,7 @@ namespace algebra { //! Concept AbelianGroup /*! \param Operation A functor implementing a binary operation - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - Group @@ -299,7 +299,7 @@ namespace algebra { /*! \param AddOp A functor implementing a binary operation representing addition \param MultOp A functor implementing a binary operation representing multiplication - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Notation:
      @@ -327,7 +327,7 @@ namespace algebra {
      mult(add(x, y), z) == add(mult(x, z), mult(y, z))
      - */ + */ template struct Distributive {}; @@ -345,7 +345,7 @@ namespace algebra { /*! \param AddOp A functor implementing a binary operation representing addition \param MultOp A functor implementing a binary operation representing multiplication - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - AbelianGroup @@ -371,7 +371,7 @@ namespace algebra { /*! \param AddOp A functor implementing a binary operation representing addition \param MultOp A functor implementing a binary operation representing multiplication - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - Ring @@ -393,7 +393,7 @@ namespace algebra { // 0 != 1, otherwise trivial axiom ZeroIsDifferentFromOne(AddOp add, MultOp mult, Element x) { - identity(add, x) != identity(mult, x); + identity(add, x) != identity(mult, x); } // Non-zero divisibility from left and from right @@ -404,13 +404,13 @@ namespace algebra { if (x != identity(add, x)) mult(x, inverse(mult, x)) == identity(mult, x); } - }; + }; #else //! Concept DivisionRing /*! \param AddOp A functor implementing a binary operation representing addition \param MultOp A functor implementing a binary operation representing multiplication - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - RingWithIdentity @@ -453,9 +453,9 @@ namespace algebra { \note -# Zero and one can be theoretically identical in a DivisionRing. However, - this implies that there is only one element x in the Ring with x + x = x and - x * x = x (which is actually even a Field). - Because this structure has no practical value we exclude it from + this implies that there is only one element x in the Ring with x + x = x and + x * x = x (which is actually even a Field). + Because this structure has no practical value we exclude it from consideration. */ template @@ -476,7 +476,7 @@ namespace algebra { /*! \param AddOp A functor implementing a binary operation representing addition \param MultOp A functor implementing a binary operation representing multiplication - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - DivisionRing @@ -501,7 +501,7 @@ namespace algebra { /*! \param AddOp A functor implementing a binary operation representing addition \param MultOp A functor implementing a binary operation representing multiplication - \param Element The type upon the binary operation is defined + \param Element The type upon the binary operation is defined \par Refinement of: - DivisionRing diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concept_maps.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concept_maps.hpp index 30c18049..3edba19a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concept_maps.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concept_maps.hpp @@ -18,7 +18,7 @@ namespace math { requires IntrinsicSignedIntegral concept_map SignedIntegral {} #endif - + concept_map UnsignedIntegral {} concept_map AdditiveMonoid {} diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concepts.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concepts.hpp index 8fc6d529..143d9ad5 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concepts.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/concepts.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_NEW_ALGEBRAIC_CONCEPTS_INCLUDE @@ -25,8 +25,8 @@ concept Commutative { axiom Commutativity(Operation op, Element x, Element y) { - op(x, y) == op(y, x); - } + op(x, y) == op(y, x); + } }; @@ -35,17 +35,17 @@ concept SemiGroup { axiom Associativity(Operation op, Element x, Element y, Element z) { - op(x, op(y, z)) == op(op(x, y), z); + op(x, op(y, z)) == op(op(x, y), z); } }; concept Monoid - : SemiGroup + : SemiGroup { typename identity_result_type; identity_result_type identity(Operation, Element); - + axiom Neutrality(Operation op, Element x) { op( x, identity(op, x) ) == x; @@ -58,29 +58,29 @@ auto concept Inversion { typename result_type; result_type inverse(Operation, Element); - + }; concept PIMonoid - : Monoid, + : Monoid, Inversion { bool is_invertible(Operation, Element); - + requires std::Convertible::result_type, Element>; axiom Invertibility(Operation op, Element x) { // Only for invertible elements: if (is_invertible(op, x)) - op( x, inverse(op, x) ) == identity(op, x); + op( x, inverse(op, x) ) == identity(op, x); if ( is_invertible(op, x) ) - op( inverse(op, x), x ) == identity(op, x); + op( inverse(op, x), x ) == identity(op, x); } } -#if 0 +#if 0 // Alternative approach to convert the result of inversion to Element // Unfortunately, this doesn't compile template @@ -93,7 +93,7 @@ concept Group : PIMonoid { bool is_invertible(Operation, Element) { return true; } - + // Just in case somebody redefines is_invertible axiom AlwaysInvertible(Operation op, Element x) { @@ -113,7 +113,7 @@ concept Group auto concept AbelianGroup : Group, Commutative {}; - + // ======================= // Operator-based concepts @@ -123,14 +123,14 @@ auto concept AbelianGroup concept Additive : std::HasPlus { - typename plus_assign_result_type; + typename plus_assign_result_type; plus_assign_result_type operator+=(Element& x, Element y) { x= x + y; return x; } - + requires std::Convertible; - + // Do we need the opposite conversion too? // This line produces a compiler error // requires std::Convertible::result_type, @@ -143,19 +143,19 @@ concept Additive } } - + auto concept AdditiveCommutative : Additive, Commutative< add, Element > {} - + auto concept AdditiveSemiGroup : Additive, SemiGroup< add, Element > {} - + concept AdditiveMonoid : AdditiveSemiGroup, Monoid< add, Element > @@ -164,7 +164,7 @@ concept AdditiveMonoid { return identity(add(), x); } - + // If we don't use the default definition axiom IdentityConsistency (add op, Element x) { @@ -174,23 +174,23 @@ concept AdditiveMonoid #ifndef CONCEPTS_WITHOUT_OVERLOADED_REQUIREMENTS // Uncompilable due to error in compiler concept AdditivePIMonoid - : std::HasMinus, AdditiveMonoid, + : std::HasMinus, AdditiveMonoid, PIMonoid< add, Element > { - typename minus_assign_result_type; + typename minus_assign_result_type; minus_assign_result_type operator-=(Element& x, Element y) { x= x - y; return x; } - + requires std::Convertible; - - typename unary_result_type; + + typename unary_result_type; unary_result_type operator-(Element x) { return zero(x) - x; } - + axiom InverseConsistency(add op, Element x, Element y) { // consistency between additive and functor concept @@ -198,14 +198,14 @@ concept AdditivePIMonoid op(x, inverse(op, y)) == x - y; if ( is_invertible(op, y) ) op(x, y) == (x -= y, x); - + // consistency of unary inversion if ( is_invertible(op, y) ) - inverse(op, y) == -y; + inverse(op, y) == -y; // consistency between unary and binary - if ( is_invertible(op, x) ) - identity(op, x) - x == -x; + identity(op, x) - x == -x; } } @@ -227,14 +227,14 @@ auto concept AdditiveAbelianGroup concept Multiplicative : std::HasMultiply { - typename times_assign_result_type; + typename times_assign_result_type; times_assign_result_type operator*=(Element& x, Element y) { x= x * y; return x; } - + requires std::Convertible; - + // Do we need the opposite conversion too? // This line produces a compiler error // requires std::Convertible::result_type, @@ -253,7 +253,7 @@ auto concept MultiplicativeCommutative Commutative< mult, Element > {} - + auto concept MultiplicativeSemiGroup : Multiplicative, SemiGroup< mult, Element > @@ -268,7 +268,7 @@ concept MultiplicativeMonoid { return identity(mult(), x); } - + // If we don't use the default definition axiom IdentityConsistency (math::mult op, Element x) { @@ -281,14 +281,14 @@ concept MultiplicativePIMonoid : std::HasDivide, MultiplicativeMonoid, PIMonoid< mult, Element > { - typename divide_assign_result_type; + typename divide_assign_result_type; divide_assign_result_type operator/=(Element& x, Element y) { x= x / y; return x; } - + requires std::Convertible; - + axiom InverseConsistency(mult op, Element x, Element y) { // consistency between multiplicative and functor concept @@ -350,9 +350,9 @@ concept DivisionRing // 0 != 1, otherwise trivial axiom ZeroIsDifferentFromOne(AddOp add, MultOp mult, Element x) { - identity(add, x) != identity(mult, x); + identity(add, x) != identity(mult, x); } - + // Non-zero divisibility from left and from right axiom NonZeroDivisibility(AddOp add, MultOp mult, Element x) { @@ -361,7 +361,7 @@ concept DivisionRing if (x != identity(add, x)) mult(x, inverse(mult, x)) == identity(mult, x); } -} +} auto concept Field @@ -376,26 +376,26 @@ auto concept OperatorRing Ring, mult, Element> {} - + auto concept OperatorRingWithIdentity : OperatorRing, MultiplicativeMonoid, RingWithIdentity, mult, Element> {} - - + + auto concept OperatorDivisionRing : OperatorRingWithIdentity, - MultiplicativePIMonoid, + MultiplicativePIMonoid, DivisionRing, mult, Element> -{} +{} auto concept OperatorField : OperatorDivisionRing, Field, mult, Element> {} - + #endif @@ -406,12 +406,12 @@ concept IntrinsicArithmetic : IntrinsicType {} concept IntrinsicIntegral : IntrinsicArithmetic {} -concept IntrinsicSignedIntegral +concept IntrinsicSignedIntegral : std::SignedIntegralLike, IntrinsicIntegral {} -concept IntrinsicUnsignedIntegral +concept IntrinsicUnsignedIntegral : std::UnsignedIntegralLike, IntrinsicIntegral {} @@ -424,7 +424,7 @@ concept IntrinsicFloatingPoint // Intrinsic types are chategorized: -concept_map IntrinsicSignedIntegral {} +concept_map IntrinsicSignedIntegral {} concept_map IntrinsicSignedIntegral {} concept_map IntrinsicUnsignedIntegral {} concept_map IntrinsicSignedIntegral {} @@ -575,7 +575,7 @@ template concept_map Distributive, bit_or, T> {} template - requires IntrinsicIntegral + requires IntrinsicIntegral concept_map Distributive, bit_and, T> {} template diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/ets_concepts.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/ets_concepts.hpp index f71ea48c..cb997b84 100755 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/ets_concepts.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/ets_concepts.hpp @@ -19,27 +19,27 @@ namespace ets { { requires std::Assignable::unary_result_type>; //"x=-y" valid }; - + auto concept VectorSpace { // valid expression: "vector2 += scalar*vector1" typename res_type_1; res_type_1 operator+=(Vector&, math::Multiplicable::result_type); - + // valid expression: "vector2 -= scalar*vector1" typename res_type_2; res_type_2 operator-=(Vector&, math::Multiplicable::result_type); - + //valid expression: "vector *= -scalar" typename res_type_3; res_type_3 operator*=(Vector&, const math::AdditivePartiallyInvertibleMonoid::unary_result_type&); - + //valid expression: "vector3 = vector1 + scalar*vector2" - requires math::Addable::result_type>; //"vector1+scalar*vector2" valid + requires math::Addable::result_type>; //"vector1+scalar*vector2" valid requires std::Assignable::result_type>::result_type>; //"vector3 = vector1 + scalar*vector2" valid - + }; - + } //namespace ets #endif //__GXX_CONCEPTS__ diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/identity.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/identity.hpp index b1756165..40bb6b26 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/identity.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/identity.hpp @@ -1,14 +1,14 @@ // Copyright 2006. Peter Gottschling, Matthias Troyer, Rolf Bonderer // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_IDENTITY_INCLUDE @@ -35,9 +35,9 @@ struct identity_t {}; // It is strongly recommended to specialize this functor // for better efficiency. template -struct identity_t< add, Element > +struct identity_t< add, Element > : public std::binary_function, Element, Element> -{ +{ Element operator() (const add&, const Element& ref) const { Element tmp(ref); @@ -47,9 +47,9 @@ struct identity_t< add, Element > }; template <> -struct identity_t< add, std::string > +struct identity_t< add, std::string > : public std::binary_function, std::string, std::string> -{ +{ std::string operator() (const add&, const std::string&) const { return std::string(); @@ -60,9 +60,9 @@ struct identity_t< add, std::string > // Same comments as above. // In contrast to additive identity, this default more likely to be wrong (e.g. matrices with all 1s) template -struct identity_t< mult, Element > +struct identity_t< mult, Element > : public std::binary_function, Element, Element> -{ +{ Element operator() (const mult&, const Element& ref) const { Element tmp(ref); @@ -74,9 +74,9 @@ struct identity_t< mult, Element > // Identity of max is minimal representable value, for standard types defined in numeric_limits template -struct identity_t< max, Element > +struct identity_t< max, Element > : public std::binary_function, Element, Element> -{ +{ Element operator() (const max&, const Element& ) const { using std::numeric_limits; @@ -85,9 +85,9 @@ struct identity_t< max, Element > }; template <> -struct identity_t< max, float > +struct identity_t< max, float > : public std::binary_function, float, float> -{ +{ float operator() (const max&, const float& ) const { using std::numeric_limits; @@ -96,9 +96,9 @@ struct identity_t< max, float > }; template <> -struct identity_t< max, double > +struct identity_t< max, double > : public std::binary_function, double, double> -{ +{ double operator() (const max&, const double& ) const { using std::numeric_limits; @@ -108,11 +108,11 @@ struct identity_t< max, double > #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS - + template <> -struct identity_t< max, long double > +struct identity_t< max, long double > : public std::binary_function, long double, long double> -{ +{ long double operator() (const max&, const long double& ) const { using std::numeric_limits; @@ -126,9 +126,9 @@ struct identity_t< max, long double > // Identity of min is maximal representable value, for standard types defined in numeric_limits template -struct identity_t< min, Element > +struct identity_t< min, Element > : public std::binary_function, Element, Element> -{ +{ Element operator() (const min&, const Element& ) const { using std::numeric_limits; @@ -138,9 +138,9 @@ struct identity_t< min, Element > // Identity of bit-wise and template -struct identity_t< bitwise_and, Element > +struct identity_t< bitwise_and, Element > : public std::binary_function, Element, Element> -{ +{ Element operator() (const bitwise_and&, const Element&) const { return 0; @@ -149,9 +149,9 @@ struct identity_t< bitwise_and, Element > // Identity of bit-wise or template -struct identity_t< bitwise_or, Element > +struct identity_t< bitwise_or, Element > : public std::binary_function, Element, Element> -{ +{ Element operator() (const bitwise_or&, const Element&) const { return 0 - 1; diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/intrinsic_concept_maps.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/intrinsic_concept_maps.hpp index 4bd754f4..fb470f76 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/intrinsic_concept_maps.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/intrinsic_concept_maps.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_INTRINSIC_CONCEPT_MAPS_INCLUDE @@ -27,16 +27,16 @@ namespace math { // For that reason, we introduce concepts that are only used for intrinsic types. // For them we can define concept_maps regarding semantic behavior as monoids. - concept IntrinsicSignedIntegral + concept IntrinsicSignedIntegral : std::SignedIntegralLike {} - concept IntrinsicUnsignedIntegral + concept IntrinsicUnsignedIntegral : std::UnsignedIntegralLike {} concept IntrinsicFloatingPoint - : std::FloatingPointLike + : std::FloatingPointLike {} @@ -56,8 +56,8 @@ namespace math { concept_map IntrinsicFloatingPoint { } concept_map IntrinsicFloatingPoint { } - - concept Integral : std::CopyAssignable + + concept Integral : std::CopyAssignable { requires std::HasPlus && std::HasMinus && std::HasMultiply && std::HasDivide && std::HasUnaryPlus && std::HasNegate; @@ -74,14 +74,14 @@ namespace math { && std::Convertible::result_type, T> && std::Convertible::result_type, T> && std::Convertible::result_type, T>; - + T& operator*=(T&, T); T& operator/=(T&, T); T& operator+=(T&, T); T& operator-=(T&, T); - + requires std::HasComplement && std::HasModulus && std::HasBitAnd - && std::HasBitOr && std::HasBitXor && std::HasLeftShift + && std::HasBitOr && std::HasBitXor && std::HasLeftShift && std::HasRightShift; requires std::Convertible::result_type, T> diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/inverse.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/inverse.hpp index e6e252f0..93a998b8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/inverse.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/inverse.hpp @@ -1,14 +1,14 @@ // Copyright 2006. Peter Gottschling, Matthias Troyer, Rolf Bonderer // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_INVERSE_INCLUDE @@ -26,22 +26,22 @@ struct inverse_t {} ; template struct inverse_t< add, Element > : public std::binary_function, Element, Element> -{ +{ Element operator()(const add&, const Element& v) const - { - return -v; - } + { + return -v; + } }; template struct inverse_t< mult, Element > : public std::binary_function, Element, Element> -{ +{ Element operator()(const mult&, const Element& v) const - { - return one(v) / v ; - } + { + return one(v) / v ; + } }; diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/is_invertible.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/is_invertible.hpp index 727df0e4..d33290df 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/is_invertible.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/is_invertible.hpp @@ -1,14 +1,14 @@ // Copyright 2006. Peter Gottschling, Matthias Troyer, Rolf Bonderer // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_IS_INVERTIBLE_INCLUDE @@ -33,7 +33,7 @@ template struct is_invertible_t< add, Element > : public std::binary_function, Element, Element> { - bool operator() (const add&, const Element&) const + bool operator() (const add&, const Element&) const { return true; } @@ -47,7 +47,7 @@ template struct is_invertible_t< mult, Element > : public std::binary_function, Element, Element> { - bool operator() (const mult&, const Element& v) const + bool operator() (const mult&, const Element& v) const { return v != zero(v); } @@ -63,7 +63,7 @@ inline bool is_invertible(const Operation& op, const Element& v) namespace detail { - + // Helper type whose operator returns true if v is not 0 // 0 must be convertible into Element and Element must be EqualityComparable template diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/linear_operator.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/linear_operator.hpp index 43b95151..52ba8b81 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/linear_operator.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/linear_operator.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_LINEAR_OPERATOR_INCLUDE @@ -15,7 +15,7 @@ #ifdef __GXX_CONCEPTS__ # include -#else +#else # include #endif @@ -33,14 +33,14 @@ namespace math { typename result_type; result_type operator* (Operator, VectorDomain); - + typename assign_type; assign_type operator= (VectorImage, result_type); // The following two requirements are subject to discussion typename plus_assign_type; plus_assign_type operator+= (VectorImage, result_type); - + typename minus_assign_type; minus_assign_type operator-= (VectorImage, result_type); @@ -63,7 +63,7 @@ namespace math { \param Operator The type of the operator, e.g., some matrix type \param VectorDomain The the type of a vector in the domain vector space \param VectorImage The the type of a vector in the image vector space - + \par Associated Types: - result_type - assign_type @@ -117,7 +117,7 @@ namespace math { alpha * (A * x) == A * (alpha * x) - + \note -# Using matrix vector products in arbitrary expressions requires storing it in temporary objects to avoid redundant computation. @@ -146,7 +146,7 @@ namespace math { typedef associated_type plus_assign_type; /// Product must be assignable with increment plus_assign_type operator+= (VectorImage, result_type); - + // The following two requirements are subject to discussion /// Associated type: return type of decrementally assigning product to vector. /** Automatically deducted. Using expression templates it can be different from VectorImage& */ @@ -164,7 +164,7 @@ namespace math { axiom Scalability(Operator A, VectorSpace::scalar_type alpha, VectorDomain x) { A * (alpha * x) == alpha * (A * x); - } + } }; #endif @@ -176,12 +176,12 @@ namespace math { #else //! Concept SelfAdjointOperator /*! - + \param Operator The type of the operator, e.g., some matrix type \param VectorDomain The the type of a vector in the domain vector space \param VectorImage The the type of a vector in the image vector space - + \par Refinement of: - LinearOperator */ @@ -199,12 +199,12 @@ namespace math { #else //! Concept RealOperator /*! - + \param Operator The type of the operator, e.g., some matrix type \param VectorDomain The the type of a vector in the domain vector space \param VectorImage The the type of a vector in the image vector space - + \par Refinement of: - LinearOperator */ @@ -223,12 +223,12 @@ namespace math { #else //! Concept SymmetricOperator /*! - + \param Operator The type of the operator, e.g., some matrix type \param VectorDomain The the type of a vector in the domain vector space \param VectorImage The the type of a vector in the image vector space - + \par Refinement of: - SelfAdjointOperator - RealOperator diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/new_concepts.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/new_concepts.hpp index 3d955cff..03458cea 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/new_concepts.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/new_concepts.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_NEW_ALGEBRAIC_CONCEPTS_INCLUDE @@ -25,8 +25,8 @@ concept Commutative { axiom Commutativity(Operation op, Element x, Element y) { - op(x, y) == op(y, x); - } + op(x, y) == op(y, x); + } }; @@ -35,17 +35,17 @@ concept SemiGroup { axiom Associativity(Operation op, Element x, Element y, Element z) { - op(x, op(y, z)) == op(op(x, y), z); + op(x, op(y, z)) == op(op(x, y), z); } }; concept Monoid - : SemiGroup + : SemiGroup { typename identity_result_type; identity_result_type identity(Operation, Element); - + axiom Neutrality(Operation op, Element x) { op( x, identity(op, x) ) == x; @@ -58,29 +58,29 @@ auto concept Inversion { typename result_type; result_type inverse(Operation, Element); - + }; concept PIMonoid - : Monoid, + : Monoid, Inversion { bool is_invertible(Operation, Element); - + requires std::Convertible::result_type, Element>; axiom Invertibility(Operation op, Element x) { // Only for invertible elements: if (is_invertible(op, x)) - op( x, inverse(op, x) ) == identity(op, x); + op( x, inverse(op, x) ) == identity(op, x); if ( is_invertible(op, x) ) - op( inverse(op, x), x ) == identity(op, x); + op( inverse(op, x), x ) == identity(op, x); } } -#if 0 +#if 0 // Alternative approach to convert the result of inversion to Element // Unfortunately, this doesn't compile template @@ -93,7 +93,7 @@ concept Group : PIMonoid { bool is_invertible(Operation, Element) { return true; } - + // Just in case somebody redefines is_invertible axiom AlwaysInvertible(Operation op, Element x) { @@ -113,7 +113,7 @@ concept Group auto concept AbelianGroup : Group, Commutative {}; - + // ======================= // Operator-based concepts @@ -123,14 +123,14 @@ auto concept AbelianGroup concept Additive : std::HasPlus { - typename plus_assign_result_type; + typename plus_assign_result_type; plus_assign_result_type operator+=(Element& x, Element y) { x= x + y; return x; } - + requires std::Convertible; - + // Do we need the opposite conversion too? // This line produces a compiler error // requires std::Convertible::result_type, @@ -143,19 +143,19 @@ concept Additive } } - + auto concept AdditiveCommutative : Additive, Commutative< add, Element > {} - + auto concept AdditiveSemiGroup : Additive, SemiGroup< add, Element > {} - + #ifdef COMPILER_WITHOUT_OVERLOAD_ERROR // Uncompilable due to error in compiler concept AdditiveMonoid : AdditiveSemiGroup, @@ -165,7 +165,7 @@ concept AdditiveMonoid { return identity(add(), x); } - + // If we don't use the default definition axiom IdentityConsistency (add op, Element x) { @@ -174,23 +174,23 @@ concept AdditiveMonoid }; concept AdditivePIMonoid - : std::HasMinus, AdditiveMonoid, + : std::HasMinus, AdditiveMonoid, PIMonoid< add, Element > { - typename minus_assign_result_type; + typename minus_assign_result_type; minus_assign_result_type operator-=(Element& x, Element y) { x= x - y; return x; } - + requires std::Convertible; - - typename unary_result_type; + + typename unary_result_type; unary_result_type operator-(Element x) { return zero(x) - x; } - + axiom InverseConsistency(add op, Element x, Element y) { // consistency between additive and functor concept @@ -198,14 +198,14 @@ concept AdditivePIMonoid op(x, inverse(op, y)) == x - y; if ( is_invertible(op, y) ) op(x, y) == (x -= y, x); - + // consistency of unary inversion if ( is_invertible(op, y) ) - inverse(op, y) == -y; + inverse(op, y) == -y; // consistency between unary and binary - if ( is_invertible(op, x) ) - identity(op, x) - x == -x; + identity(op, x) - x == -x; } } @@ -227,14 +227,14 @@ auto concept AdditiveAbelianGroup concept Multiplicative : std::HasMultiply { - typename times_assign_result_type; + typename times_assign_result_type; times_assign_result_type operator*=(Element& x, Element y) { x= x * y; return x; } - + requires std::Convertible; - + // Do we need the opposite conversion too? // This line produces a compiler error // requires std::Convertible::result_type, @@ -253,7 +253,7 @@ auto concept MultiplicativeCommutative Commutative< mult, Element > {} - + auto concept MultiplicativeSemiGroup : Multiplicative, SemiGroup< mult, Element > @@ -269,7 +269,7 @@ concept MultiplicativeMonoid { return identity(mult(), x); } - + // If we don't use the default definition axiom IdentityConsistency (math::mult op, Element x) { @@ -281,14 +281,14 @@ concept MultiplicativePIMonoid : std::HasDivide, MultiplicativeMonoid, PIMonoid< mult, Element > { - typename divide_assign_result_type; + typename divide_assign_result_type; divide_assign_result_type operator/=(Element& x, Element y) { x= x / y; return x; } - + requires std::Convertible; - + axiom InverseConsistency(mult op, Element x, Element y) { // consistency between multiplicative and functor concept @@ -350,9 +350,9 @@ concept DivisionRing // 0 != 1, otherwise trivial axiom ZeroIsDifferentFromOne(AddOp add, MultOp mult, Element x) { - identity(add, x) != identity(mult, x); + identity(add, x) != identity(mult, x); } - + // Non-zero divisibility from left and from right axiom NonZeroDivisibility(AddOp add, MultOp mult, Element x) { @@ -361,7 +361,7 @@ concept DivisionRing if (x != identity(add, x)) mult(x, inverse(mult, x)) == identity(mult, x); } -} +} auto concept Field @@ -376,26 +376,26 @@ auto concept OperatorRing Ring, mult, Element> {} - + auto concept OperatorRingWithIdentity : OperatorRing, MultiplicativeMonoid, RingWithIdentity, mult, Element> {} - - + + auto concept OperatorDivisionRing : OperatorRingWithIdentity, - MultiplicativePIMonoid, + MultiplicativePIMonoid, DivisionRing, mult, Element> -{} +{} auto concept OperatorField : OperatorDivisionRing, Field, mult, Element> {} - + #endif @@ -406,12 +406,12 @@ concept IntrinsicArithmetic : IntrinsicType {} concept IntrinsicIntegral : IntrinsicArithmetic {} -concept IntrinsicSignedIntegral +concept IntrinsicSignedIntegral : std::SignedIntegralLike, IntrinsicIntegral {} -concept IntrinsicUnsignedIntegral +concept IntrinsicUnsignedIntegral : std::UnsignedIntegralLike, IntrinsicIntegral {} @@ -559,7 +559,7 @@ template concept_map Distributive, bit_or, T> {} template - requires IntrinsicIntegral + requires IntrinsicIntegral concept_map Distributive, bit_and, T> {} template diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/old_concepts.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/old_concepts.hpp index 128551e7..94bb5b1e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/old_concepts.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/old_concepts.hpp @@ -1,14 +1,14 @@ // Copyright 2006. Peter Gottschling, Matthias Troyer, Rolf Bonderer // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef LA_CONCEPTS_INCLUDE @@ -38,8 +38,8 @@ // More precisely, the concepts may be moved into namespace numeric and the standard functions stay in math /// Namespace for mathematical concepts -/** In contrast to the ones in algebra the concepts can require - basic implementation concepts like std::CopyAssignable */ +/** In contrast to the ones in algebra the concepts can require + basic implementation concepts like std::CopyAssignable */ namespace math { #ifdef __GXX_CONCEPTS__ @@ -53,7 +53,7 @@ namespace math { #if 0 // In addtion to std::Integral -concept Float +concept Float : std::DefaultConstructible, std::CopyConstructible, std::LessThanComparable, std::EqualityComparable { @@ -77,7 +77,7 @@ concept_map Float {} concept_map Float {} // The difference to Float is the lack of LessThanComparable -concept Complex +concept Complex : std::DefaultConstructible, std::CopyConstructible, std::EqualityComparable { @@ -92,7 +92,7 @@ concept Complex T operator/(T, T); T& operator/=(T&, T); - requires std::CopyAssignable + requires std::CopyAssignable && std::SameType::result_type, T&>; } @@ -117,7 +117,7 @@ template requires Arithmetic concept_map Arithmetic< std::complex > {} -#endif +#endif // The following concepts are used to classify intrinsic arithmetic types. // The standard concepts already define the syntactic requirements, @@ -128,22 +128,22 @@ concept_map Arithmetic< std::complex > {} // For that reason, we introduce concepts that are only used for intrinsic types. // For them we can define concept_maps regarding semantic behavior as monoids. -concept IntrinsicSignedIntegral - : std::SignedIntegralLike +concept IntrinsicSignedIntegral + : std::SignedIntegralLike {} -concept IntrinsicUnsignedIntegral - : std::UnsignedIntegralLike +concept IntrinsicUnsignedIntegral + : std::UnsignedIntegralLike {} concept IntrinsicFloatingPoint - : std::FloatingPointLike + : std::FloatingPointLike {} // Intrinsic types are chategorized: -concept_map IntrinsicSignedIntegral {} +concept_map IntrinsicSignedIntegral {} concept_map IntrinsicSignedIntegral {} concept_map IntrinsicUnsignedIntegral {} concept_map IntrinsicSignedIntegral {} @@ -208,14 +208,14 @@ auto concept Magma // As an example floating point numbers are commutative but not associative // w.r.t. addition and multiplication auto concept CommutativeMagma - : Magma, + : Magma, algebra::Commutative {}; // SemiGroup is a refinement which must be nominal auto concept SemiGroup - : Magma, + : Magma, algebra::SemiGroup {}; @@ -227,24 +227,24 @@ auto concept CommutativeSemiGroup // Adding identity -// auto +// auto concept Monoid - : SemiGroup, - algebra::Monoid + : SemiGroup, + algebra::Monoid { requires std::Convertible; }; auto concept CommutativeMonoid - : CommutativeSemiGroup, + : CommutativeSemiGroup, Monoid {}; concept PartiallyInvertibleMonoid - : Monoid, - algebra::Inversion + : Monoid, + algebra::Inversion { typename is_invertible_result_type; is_invertible_result_type is_invertible(Operation, Element); @@ -257,16 +257,16 @@ concept PartiallyInvertibleMonoid { // Only for invertible elements: if (is_invertible(op, x)) - op( x, inverse(op, x) ) == identity(op, x); + op( x, inverse(op, x) ) == identity(op, x); if ( is_invertible(op, x) ) - op( inverse(op, x), x ) == identity(op, x); + op( inverse(op, x), x ) == identity(op, x); } }; auto concept PartiallyInvertibleCommutativeMonoid - : PartiallyInvertibleMonoid, - CommutativeMonoid + : PartiallyInvertibleMonoid, + CommutativeMonoid {}; @@ -290,7 +290,7 @@ concept Group auto concept AbelianGroup - : Group, + : Group, PartiallyInvertibleCommutativeMonoid, algebra::AbelianGroup {}; @@ -304,37 +304,37 @@ auto concept AbelianGroup concept AdditiveMagma : Magma< math::add, Element > { - typename plus_assign_result_type; + typename plus_assign_result_type; plus_assign_result_type operator+=(Element& x, Element y); // requires std::Convertible; // Operator + is by default defined with += - typename addition_result_type; + typename addition_result_type; addition_result_type operator+(Element x, Element y); #if 0 { Element tmp(x); return tmp += y; defaults NYS } -#endif +#endif requires std::Convertible; // Type consistency with Magma - requires std::Convertible< addition_result_type, + requires std::Convertible< addition_result_type, Magma< math::add, Element >::result_type>; // SameType requires more rigorous specializations on pure algebraic functors - // requires std::SameType< addition_result_type, + // requires std::SameType< addition_result_type, // Magma< math::add, Element >::result_type>; axiom Consistency(math::add op, Element x, Element y) { - op(x, y) == x + y; - + op(x, y) == x + y; + // Consistency definition between + and += might change later x + y == x += y; // Element tmp = x; tmp+= y; tmp == x + y; not proposal-compliant - } + } } @@ -345,12 +345,12 @@ auto concept AdditiveCommutativeMagma auto concept AdditiveSemiGroup - : AdditiveMagma, + : AdditiveMagma, SemiGroup< math::add, Element > {}; -// We really need only one of the additive concepts for the requirements, +// We really need only one of the additive concepts for the requirements, // the requirements of the other would be implied. // Vice versa, to derive concept maps of nested concepts from // concept maps of refined concepts, they are needed all. @@ -374,7 +374,7 @@ concept AdditiveMonoid }; -// We really need only one of the additive concepts for the requirements, +// We really need only one of the additive concepts for the requirements, // the requirements of the other would be implied. // Vice versa, to derive concept maps of nested concepts from // concept maps of refined concepts, they are needed all. @@ -389,55 +389,55 @@ concept AdditivePartiallyInvertibleMonoid : AdditiveMonoid, PartiallyInvertibleMonoid< math::add, Element > { - typename minus_assign_result_type; + typename minus_assign_result_type; minus_assign_result_type operator-=(Element& x, Element y); // requires std::Convertible; - + // Operator - by default defined with -= - typename subtraction_result_type; + typename subtraction_result_type; subtraction_result_type operator-(Element& x, Element y); #if 0 { Element tmp(x); return tmp -= y; defaults NYS } -#endif +#endif requires std::Convertible; - typename unary_result_type; + typename unary_result_type; unary_result_type operator-(Element x); #if 0 { return zero(x) - x; defaults NYS } -#endif +#endif requires std::Convertible; - + axiom Consistency(math::add op, Element x, Element y) { // consistency between additive and pure algebraic concept if ( is_invertible(op, y) ) - op(x, inverse(op, y)) == x - y; + op(x, inverse(op, y)) == x - y; if ( is_invertible(op, y) ) - inverse(op, y) == -y; + inverse(op, y) == -y; // consistency between unary and binary - if ( is_invertible(op, x) ) - identity(op, x) - x == -x; + identity(op, x) - x == -x; // Might change later if ( is_invertible(op, y) ) - x - y == x -= y; + x - y == x -= y; // Element tmp = x; tmp-= y; tmp == x - y; not proposal-compliant - } + } }; auto concept AdditivePartiallyInvertibleCommutativeMonoid : AdditivePartiallyInvertibleMonoid, - AdditiveCommutativeMonoid, + AdditiveCommutativeMonoid, PartiallyInvertibleCommutativeMonoid< math::add, Element > {}; @@ -464,38 +464,38 @@ auto concept AdditiveAbelianGroup concept MultiplicativeMagma : Magma< math::mult, Element > { - typename mult_assign_result_type; + typename mult_assign_result_type; mult_assign_result_type operator*=(Element& x, Element y); // requires std::Convertible; // Operator * is by default defined with *= - typename mult_result_type; + typename mult_result_type; mult_result_type operator*(Element x, Element y); #if 0 { Element tmp(x); return tmp *= y; defaults NYS } -#endif +#endif requires std::Convertible; - + // Type consistency with Magma - requires std::Convertible< mult_result_type, + requires std::Convertible< mult_result_type, Magma< math::mult, Element >::result_type>; // SameType requires more rigorous specializations on pure algebraic functors - // requires std::SameType< mult_result_type, + // requires std::SameType< mult_result_type, // Magma< math::mult, Element >::result_type>; axiom Consistency(math::mult op, Element x, Element y) { - op(x, y) == x * y; - + op(x, y) == x * y; + // Consistency definition between * and *= might change later x * y == x *= y; // Element tmp = x; tmp*= y; tmp == x * y; not proposal-compliant - } + } } @@ -536,41 +536,41 @@ concept MultiplicativePartiallyInvertibleMonoid : MultiplicativeMonoid, PartiallyInvertibleMonoid< math::mult, Element > { - typename divide_assign_result_type; + typename divide_assign_result_type; divide_assign_result_type operator/=(Element& x, Element y); // requires std::Convertible; - + // Operator / by default defined with /= - typename division_result_type = Element; + typename division_result_type = Element; division_result_type operator/(Element x, Element y); #if 0 { Element tmp(x); return tmp /= y; defaults NYS } -#endif +#endif requires std::Convertible; - + axiom Consistency(math::mult op, Element x, Element y) { // consistency between multiplicative and pure algebraic concept if ( is_invertible(op, y) ) - op(x, inverse(op, y)) == x / y; + op(x, inverse(op, y)) == x / y; // Consistency between / and /=, might change later if ( is_invertible(op, y) ) - x / y == x /= y; - // Element tmp = x; tmp/= y; tmp == x / y; not proposal-compliant - } + x / y == x /= y; + // Element tmp = x; tmp/= y; tmp == x / y; not proposal-compliant + } }; - + auto concept MultiplicativePartiallyInvertibleCommutativeMonoid : MultiplicativePartiallyInvertibleMonoid, MultiplicativeCommutativeMonoid, PartiallyInvertibleCommutativeMonoid< math::mult, Element > {}; - + auto concept MultiplicativeGroup : MultiplicativeMonoid, @@ -628,7 +628,7 @@ concept GenericDivisionRing algebra::DivisionRing { requires std::Convertible; -}; +}; auto concept GenericField @@ -639,7 +639,7 @@ auto concept GenericField // ------------------ -// Based on operators +// Based on operators // ------------------ // Handier, less generic @@ -658,7 +658,7 @@ auto concept Ring auto concept CommutativeRing : Ring, MultiplicativeCommutativeSemiGroup, - GenericCommutativeRing, math::mult, Element> + GenericCommutativeRing, math::mult, Element> {}; @@ -667,7 +667,7 @@ auto concept RingWithIdentity MultiplicativeMonoid, GenericRingWithIdentity, math::mult, Element> {}; - + auto concept CommutativeRingWithIdentity : RingWithIdentity, @@ -679,15 +679,15 @@ auto concept CommutativeRingWithIdentity concept DivisionRing : RingWithIdentity, - MultiplicativePartiallyInvertibleMonoid, + MultiplicativePartiallyInvertibleMonoid, GenericDivisionRing, math::mult, Element> { axiom NonZeroDivisibility(Element x) { - if (x != zero(x)) + if (x != zero(x)) x / x == one(x); } -}; +}; auto concept Field @@ -771,7 +771,7 @@ auto concept AdditionResultConvertible typename result_type; result_type operator+=(T& t, T u); requires std::Convertible; -}; +}; auto concept SubtractionResultConvertible @@ -783,7 +783,7 @@ auto concept SubtractionResultConvertible typename result_type; result_type operator-=(T& t, T u); requires std::Convertible; -}; +}; auto concept NumericOperatorResultConvertible : AdditionResultConvertible, @@ -835,7 +835,7 @@ concept_map Field< std::complex > {} // Draft version: defined generously unless there will be problems with some types template -concept_map CommutativeMonoid< max, Element > +concept_map CommutativeMonoid< max, Element > { // Why do we need this? typedef Element identity_result_type; @@ -864,7 +864,7 @@ concept NaturalNumber {} usage of real processors. It is arguable if this is really a refinement **/ concept IntegralNumber : NaturalNumber {} - + /// Specify the semantic Behavior of complex numbers (TBD) /** Mathematic properties are in most cases only approximated but not held exactly. Rigorous definition would impede @@ -964,7 +964,7 @@ struct magnitude_type_trait< std::complex > #ifdef __GXX_CONCEPTS__ -//The following concepts Addable, Subtractable etc. differ from std::Addable, std::Subtractable +//The following concepts Addable, Subtractable etc. differ from std::Addable, std::Subtractable //etc. in so far that no default for result_type is provided, thus allowing automated return type deduction auto concept Addable @@ -972,25 +972,25 @@ auto concept Addable typename result_type; result_type operator+(const T& t, const U& u); }; - - + + // Usually + and += are both defined // + can be efficiently derived from += but not vice versa auto concept AddableWithAssign { - typename assign_result_type; + typename assign_result_type; assign_result_type operator+=(T& x, U y); // Operator + is by default defined with += - typename result_type; + typename result_type; result_type operator+(T x, U y); #if 0 { // Default requires std::CopyConstructible, without default not needed - Element tmp(x); + Element tmp(x); return tmp += y; defaults NYS } -#endif +#endif }; @@ -999,25 +999,25 @@ auto concept Subtractable typename result_type; result_type operator-(const T& t, const U& u); }; - + // Usually - and -= are both defined // - can be efficiently derived from -= but not vice versa auto concept SubtractableWithAssign { - typename assign_result_type; + typename assign_result_type; assign_result_type operator-=(T& x, U y); // Operator - is by default defined with -= - typename result_type; + typename result_type; result_type operator-(T x, U y); #if 0 { // Default requires std::CopyConstructible, without default not needed - Element tmp(x); + Element tmp(x); return tmp -= y; defaults NYS } -#endif +#endif }; @@ -1032,19 +1032,19 @@ auto concept Multiplicable // * can be efficiently derived from *= but not vice versa auto concept MultiplicableWithAssign { - typename assign_result_type; + typename assign_result_type; assign_result_type operator*=(T& x, U y); // Operator * is by default defined with *= - typename result_type; + typename result_type; result_type operator*(T x, U y); #if 0 { // Default requires std::CopyConstructible, without default not needed - Element tmp(x); + Element tmp(x); return tmp *= y; defaults NYS } -#endif +#endif }; @@ -1059,19 +1059,19 @@ auto concept Divisible // * can be efficiently derived from *= but not vice versa auto concept DivisibleWithAssign { - typename assign_result_type; + typename assign_result_type; assign_result_type operator*=(T& x, U y); // Operator * is by default defined with *= - typename result_type; + typename result_type; result_type operator*(T x, U y); #if 0 { // Default requires std::CopyConstructible, without default not needed - Element tmp(x); + Element tmp(x); return tmp *= y; defaults NYS } -#endif +#endif }; @@ -1079,7 +1079,7 @@ auto concept Transposable { typename result_type; result_type trans(T&); -}; +}; // Unary Negation -> Any suggestions for better names?! Is there a word as "negatable"?! @@ -1106,12 +1106,12 @@ auto concept HasConjugate typename result_type; result_type conj(const S&); }; - - + + // We need the following; might be placed somewhere else later template -concept_map HasConjugate -{ +concept_map HasConjugate +{ typedef T result_type; result_type conj(const T& s) {return s;} } @@ -1124,23 +1124,23 @@ auto concept Dottable typename result_type = T; result_type dot(const T&t, const U& u); }; - -auto concept OneNormApplicable + +auto concept OneNormApplicable { typename result_type; result_type one_norm(const V&); }; -auto concept TwoNormApplicable +auto concept TwoNormApplicable { typename result_type; result_type two_norm(const V&); }; -auto concept InfinityNormApplicable +auto concept InfinityNormApplicable { typename result_type; result_type inf_norm(const V&); diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/operators.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/operators.hpp index e58051f7..9fb0c14c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/operators.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/operators.hpp @@ -1,14 +1,14 @@ // Copyright 2006. Peter Gottschling, Matthias Troyer, Rolf Bonderer // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_OPERATORS_INCLUDE @@ -31,7 +31,7 @@ struct add : public std::binary_function // Heterogeneous addition, i.e. addends and result type may be different template -struct heterogeneous_add +struct heterogeneous_add : public std::binary_function { R operator() (const A1& x, const A2& y) @@ -41,11 +41,11 @@ struct heterogeneous_add }; -// The results of char and short additions are int, dito unsigned +// The results of char and short additions are int, dito unsigned template <> struct add : heterogeneous_add {}; template <> struct add : heterogeneous_add {}; template <> struct add : heterogeneous_add {}; -template <> struct add : heterogeneous_add {}; +template <> struct add : heterogeneous_add {}; template @@ -59,7 +59,7 @@ struct mult : public std::binary_function template -struct heterogeneous_mult +struct heterogeneous_mult : public std::binary_function { R operator() (const A1& x, const A2& y) @@ -69,11 +69,11 @@ struct heterogeneous_mult }; -// The results of char and short multiplications are int, dito unsigned +// The results of char and short multiplications are int, dito unsigned template <> struct mult : heterogeneous_mult {}; template <> struct mult : heterogeneous_mult {}; template <> struct mult : heterogeneous_mult {}; -template <> struct mult : heterogeneous_mult {}; +template <> struct mult : heterogeneous_mult {}; #else diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/power.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/power.hpp index d3ee807e..9e044d52 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/power.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/power.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MATH_POWER_INCLUDE @@ -37,10 +37,10 @@ namespace math { #if 0 template - requires SemiGroup + requires SemiGroup && std::Callable2 && std::Convertible::result_type, Element> - inline Element multiply_and_square_horner(const Element& a, Exponent n, Op op) + inline Element multiply_and_square_horner(const Element& a, Exponent n, Op op) { if (n < 1) throw std::range_error("mult&square Horner: n must be > 0"); @@ -58,14 +58,14 @@ namespace math { Element value= a; for (mask>>= 1; mask; mask>>= 1) { value= op(value, value); - if (n & mask) + if (n & mask) value= op(value, a); } return value; } template - requires SemiGroup + requires SemiGroup && std::Callable2 && std::Convertible::result_type, Element> inline Element power(const Element& a, Exponent n, Op op) @@ -76,10 +76,10 @@ namespace math { #if 1 - // With Horner scheme we can avoid recursion - // This one is more intuitive (I believe) + // With Horner scheme we can avoid recursion + // This one is more intuitive (I believe) template - requires SemiGroup + requires SemiGroup && std::Callable2 && std::Convertible::result_type, Element> inline Element power(const Element& a, Exponent n, Op op) @@ -97,7 +97,7 @@ namespace math { value= op(value, value); // If n is odd another operation with a is needed - if (n & 1) + if (n & 1) value= op(value, a); return value; } @@ -106,29 +106,29 @@ namespace math { template - requires Monoid + requires Monoid && std::Callable2 && std::Convertible::result_type, Element> - inline Element multiply_and_square(const Element& a, Exponent n, Op op) + inline Element multiply_and_square(const Element& a, Exponent n, Op op) { - // Same as the simpler form except that the first multiplication is made before + // Same as the simpler form except that the first multiplication is made before // the loop and one squaring is saved this way if (n < 0) throw std::range_error("mult&square: n must be >= 0"); - + using math::identity; Element value= bool(n & 1) ? Element(a) : Element(identity(op, a)), square= a; - + for (n>>= 1; n > 0; n>>= 1) { - square= op(square, square); - if (n & 1) + square= op(square, square); + if (n & 1) value= op(value, square); } - return value; - } + return value; + } template - requires Monoid + requires Monoid && std::Callable2 && std::Convertible::result_type, Element> inline Element power(const Element& a, Exponent n, Op op) @@ -141,13 +141,13 @@ namespace math { template - requires PIMonoid + requires PIMonoid && std::Callable2 && std::Convertible::result_type, Element> inline Element power(const Element& a, Exponent n, Op op) { std::cout << "[PIMonoid] "; - if (n < 0 && !is_invertible(op, a)) + if (n < 0 && !is_invertible(op, a)) throw std::range_error("power [PIMonoid]: a must be invertible with n < 0"); return n < 0 ? multiply_and_square(Element(inverse(op, a)), Exponent(-n), op) @@ -156,7 +156,7 @@ namespace math { #if 1 template - requires Group + requires Group && std::Callable2 && std::Convertible::result_type, Element> inline Element power(const Element& a, Exponent n, Op op) @@ -172,7 +172,7 @@ namespace math { #if 0 template - requires Group + requires Group && Integral && std::Semiregular && std::Callable2 @@ -181,10 +181,10 @@ namespace math { && std::HasNegate && math::Monoid::result_type> && Integral< std::HasNegate::result_type> - && std::Callable2::result_type, + && std::Callable2::result_type, math::Inversion::result_type> - && std::Convertible::result_type, - math::Inversion::result_type>::result_type, + && std::Convertible::result_type, + math::Inversion::result_type>::result_type, math::Inversion::result_type> inline Element power(const Element& a, Exponent n, Op op) { diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/pseudo_concept.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/pseudo_concept.hpp index 5506a202..037d6a1f 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/pseudo_concept.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/pseudo_concept.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef PSEUDO_CONCEPT_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/vector_concepts.hpp b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/vector_concepts.hpp index 0f37105c..67edb47e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/linear_algebra/vector_concepts.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/linear_algebra/vector_concepts.hpp @@ -1,14 +1,14 @@ // Copyright 2006. Peter Gottschling, Matthias Troyer, Rolf Bonderer // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef LA_VECTOR_CONCEPTS_INCLUDE @@ -20,13 +20,13 @@ #ifdef __GXX_CONCEPTS__ # include -#else +#else # include #endif -namespace math { - +namespace math { + /** @addtogroup Concepts * @{ */ @@ -39,11 +39,11 @@ concept VectorSpace; requires MultiplicableWithAssign; requires DivisibleWithAssign; - + requires std::Assignable::result_type>; requires std::Assignable::result_type>; requires std::Assignable::result_type>; - + // Associated types of Field and AdditiveAbelianGroup collide // typename result_type = AdditiveAbelianGroup::result_type; // typename assign_result_type = AdditiveAbelianGroup::assign_result_type; @@ -61,9 +61,9 @@ concept VectorSpace; - Multiplicable ; @@ -83,9 +83,9 @@ concept VectorSpace : std::Callable1 { @@ -108,8 +108,8 @@ concept Norm; requires std::Convertible; @@ -141,9 +141,9 @@ concept Norm @@ -159,7 +159,7 @@ concept Norm; */ -template struct Norm : std::Callable1 @@ -172,7 +172,7 @@ struct Norm /** Automatically detected */ typedef associated_type result_type_norm; - /// Invariant: norm of vector is larger than zero + /// Invariant: norm of vector is larger than zero axiom Positivity(N norm, Vector v, magnitude_type ref) { /// norm(v) >= zero(ref); @@ -194,7 +194,7 @@ struct Norm #ifdef __GXX_CONCEPTS__ -concept SemiNorm : Norm { @@ -212,13 +212,13 @@ concept SemiNorm */ -template struct SemiNorm : Norm @@ -234,7 +234,7 @@ struct SemiNorm #endif #ifdef __GXX_CONCEPTS__ -concept BanachSpace : Norm, VectorSpace @@ -245,22 +245,22 @@ concept BanachSpace - VectorSpace \note - The (expressible) requirements of Banach Space are already given in Norm. - - The difference between the requirements is the completeness of the + - The difference between the requirements is the completeness of the Banach space, i.e. that every Cauchy sequence w.r.t. norm(v-w) has a limit in the space. Unfortunately, completeness is never satisfied for finite precision arithmetic types. - Another subtle difference is that Norm is not a refinement of Vectorspace */ -template struct BanachSpace : Norm, @@ -270,7 +270,7 @@ struct BanachSpace #ifdef __GXX_CONCEPTS__ -concept InnerProduct : std::Callable2 { @@ -321,9 +321,9 @@ concept InnerProduct @@ -336,7 +336,7 @@ concept InnerProduct - RealMagnitude < Scalar > ; the scalar value needs a real magnitude type */ -template struct InnerProduct : std::Callable2 @@ -386,7 +386,7 @@ struct InnerProduct #ifdef __GXX_CONCEPTS_ // A dot product is only a semantically special case of an inner product // Questionable if we want such a concept -concept DotProduct : InnerProduct {}; @@ -396,13 +396,13 @@ concept DotProduct */ -template struct DotProduct : InnerProduct @@ -418,7 +418,7 @@ struct DotProduct // Conversion from scalar to magnitude_type is covered by norm concept template - _GLIBCXX_WHERE(InnerProduct + _GLIBCXX_WHERE(InnerProduct && RealMagnitude) struct induced_norm_t { @@ -428,10 +428,10 @@ struct induced_norm_t { // Check whether inner product is positive real // assert(Scalar(abs(inner(v, v))) == inner(v, v)); - + // Similar check while accepting small imaginary values // assert( (abs(inner(v, v)) - inner(v, v)) / abs(inner(v, v)) < 1e-6; ) - + // Could also be defined with abs but that might introduce extra ops // typedef RealMagnitude::type magnitude_type; @@ -444,7 +444,7 @@ struct induced_norm_t #if 0 template - LA_WHERE( InnerProduct + LA_WHERE( InnerProduct && RealMagnitude ) magnitude_type_trait::type induced_norm(const I& inner, const Vector& v) @@ -457,15 +457,15 @@ induced_norm(const I& inner, const Vector& v) concept HilbertSpace > : InnerProduct, BanachSpace { axiom Consistency(Vector v) { - math::induced_norm_t()(v) == N()(v); - } + math::induced_norm_t()(v) == N()(v); + } }; #else //! Concept HilbertSpace @@ -473,10 +473,10 @@ concept HilbertSpace - BanachSpace @@ -487,7 +487,7 @@ concept HilbertSpace > struct HilbertSpace : InnerProduct, @@ -496,8 +496,8 @@ struct HilbertSpace /// Consistency between norm and induced norm axiom Consistency(Vector v) { - /// math::induced_norm_t()(v) == N()(v); - } + /// math::induced_norm_t()(v) == N()(v); + } }; #endif // __GXX_CONCEPTS__ diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/abs.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/abs.hpp index fdf5e9ed..55e802ff 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/abs.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/abs.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_ABS_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/is_power_of_2.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/is_power_of_2.hpp index e629a6d3..bee04431 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/is_power_of_2.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/is_power_of_2.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_IS_POWER_OF_2_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/is_prime.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/is_prime.hpp index e6aa21de..c1b567de 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/is_prime.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/is_prime.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_IS_PRIME_INCLUDE @@ -84,7 +84,7 @@ template <> struct is_prime<5> : mpl::true_ {}; concept Prime {} template - where std::True::value> + where std::True::value> concept_map Prime {} #endif diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/least_significant_one_bit.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/least_significant_one_bit.hpp index faf1e7f6..56cfbc62 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/least_significant_one_bit.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/least_significant_one_bit.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_LEAST_SIGNIFICANT_ONE_BIT_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/log_2.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/log_2.hpp index 8f474a4a..ce469eec 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/log_2.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/log_2.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_LOG_2_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop.hpp index cb1b3538..125e0511 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_LOOP_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop1.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop1.hpp index 49178153..f1f1b541 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop1.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop1.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_LOOP1_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop2.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop2.hpp index e00227b4..39bf7d40 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop2.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop2.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_LOOP2_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop3.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop3.hpp index eaf4858d..a6b177fb 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/loop3.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/loop3.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_LOOP3_INCLUDE @@ -27,7 +27,7 @@ struct loop3 }; -template struct loop3 { @@ -75,7 +75,7 @@ struct loop3_trace : public loop3 { std::cout << this->index0 << " : " << this->index1 << " : " << this->index2 << "\n"; next_t() (); - } + } }; @@ -86,7 +86,7 @@ struct loop3_trace void operator() () { std::cout << this->index0 << " : " << this->index1 << " : " << this->index2 << "\n"; - } + } }; #endif diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/max.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/max.hpp index 58356018..cf24f686 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/max.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/max.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_MAX_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/min.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/min.hpp index 94156eb7..48395e4d 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/min.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/min.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_MIN_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/power_of_2.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/power_of_2.hpp index b0f460d6..56f28421 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/power_of_2.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/power_of_2.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_POWER_OF_2_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/meta_math/sqrt.hpp b/AMDiS/lib/mtl4/boost/numeric/meta_math/sqrt.hpp index dd9dc426..d976f75c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/meta_math/sqrt.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/meta_math/sqrt.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef META_MATH_SQRT_INCLUDE @@ -39,7 +39,7 @@ namespace impl { // If the condition becomes true the guessed root will be the returned value template - struct sqrt_impl + struct sqrt_impl { static long int const value = guess; }; @@ -47,11 +47,11 @@ namespace impl { } template -struct sqrt +struct sqrt { typedef long int type; static long int const value = impl::sqrt_impl<1, x, false>::value; -}; +}; } // namespace meta_math diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/collection.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/collection.hpp index 5f33eb94..a3637be3 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/collection.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/collection.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_COLLECTION_INCLUDE @@ -19,7 +19,7 @@ #ifdef __GXX_CONCEPTS__ # include -#else +#else # include # include #endif @@ -101,7 +101,7 @@ namespace mtl { }; #else /// Concept AlgebraicCollection: common requirements of matrices, vectors, and scalars in computations - /** For more design clarity we consider them all as matrices (as Matlab does) and we regard + /** For more design clarity we consider them all as matrices (as Matlab does) and we regard Scalar and Vector as special cases (see there). However, the implementation of vectors is supposed to differ from the ones of matrices in order to provide efficient computations and storage. \par Refinement of: @@ -132,11 +132,11 @@ namespace mtl { static Collection::size_type T::static_num_rows; static Collection::size_type T::static_num_cols; static Collection::size_type T::static_size; -#endif +#endif }; #else /// Concept ConstantSizeAlgebraicCollection: extension of AlgebraicCollection with meta-functions - /** This concept is used for algebraic collections with sizes known at compile time. + /** This concept is used for algebraic collections with sizes known at compile time. The motivation is that if the size of the collection is is small, arithmetic operations can be unrolled at compile time. @@ -151,7 +151,7 @@ namespace mtl { - Number of elements: \n static_size::value \n Sematics: static_num_rows::value * static_size::value \note - -# For more design clarity we consider them all as matrices (as Matlab does) and we regard + -# For more design clarity we consider them all as matrices (as Matlab does) and we regard Scalar and Vector as special cases (see there). However, the implementation of vectors is supposed to differ from the ones of matrices in order to provide efficient computations and storage. @@ -199,11 +199,11 @@ namespace mtl { /// Associated type: return type of tagged begin and end function typedef associated_type cursor_type; - /// Tagged free function that returns a cursor or iterator at the begin of an interval + /// Tagged free function that returns a cursor or iterator at the begin of an interval /** The interval is specified by the Tag, i.e. the function is called begin(c); */ cursor_type begin(const C& c); - /// Tagged free function that returns a cursor or iterator at the end of an interval + /// Tagged free function that returns a cursor or iterator at the end of an interval /** The interval is specified by the Tag, i.e. the function is called end(c); */ cursor_type end(const C& c); }; @@ -236,11 +236,11 @@ namespace mtl { /// Associated type: return type of tagged begin function typedef associated_type cursor_type; - /// Tagged free function that returns a cursor or iterator at the begin of an interval + /// Tagged free function that returns a cursor or iterator at the begin of an interval /** The interval is specified by the Tag, i.e. the function is called begin(c); */ cursor_type begin(const C& c); - /// Tagged free function that returns a cursor or iterator at the end of an interval + /// Tagged free function that returns a cursor or iterator at the end of an interval /** The interval is specified by the Tag, i.e. the function is called end(c); */ cursor_type end(const C& c); }; @@ -471,7 +471,7 @@ namespace mtl { typedef typename matrix::rscaled_view::size_type size_type; }; #endif - + #ifdef __GXX_CONCEPTS__ @@ -489,14 +489,14 @@ namespace mtl { // typedef typename Functor::result_type value_type; // typedef typename Functor::result_type const_reference; // typedef typename Collection::size_type size_type; - + typedef typename vector::map_view::value_type value_type; typedef typename vector::map_view::const_reference const_reference; typedef typename vector::map_view::size_type size_type; }; #endif - + #ifdef __GXX_CONCEPTS__ #else @@ -598,7 +598,7 @@ namespace mtl { { typedef typename Collection::value_type value_type; typedef value_type const_reference; - typedef typename Collection::size_type size_type; + typedef typename Collection::size_type size_type; }; #endif @@ -908,7 +908,7 @@ namespace mtl { #else template< typename Matrix, typename Vector> - struct Collection > + struct Collection > { typedef typename Collection< Matrix >::value_type value_type; typedef const value_type& const_reference; @@ -955,7 +955,7 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ #else - template + template struct Collection > { typedef typename Multiplicable::value_type, @@ -967,7 +967,7 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ #else - template + template struct Collection > { typedef typename Addable::value_type, @@ -979,7 +979,7 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ #else - template + template struct Collection > { typedef typename SFunctor::result_type value_type; @@ -990,7 +990,7 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ #else - template + template struct Collection > { typedef typename Collection::value_type value_type; @@ -1309,7 +1309,7 @@ namespace mtl { }; #endif - + #ifdef __GXX_CONCEPTS__ template concept_map OrientedCollection< mtl::vector::scaled_view > @@ -1349,7 +1349,7 @@ namespace mtl { }; #endif - + #ifdef __GXX_CONCEPTS__ template concept_map OrientedCollection > diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/magnitude.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/magnitude.hpp index ba432ca1..007d0111 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/magnitude.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/magnitude.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAGNITUDE_INCLUDE @@ -60,7 +60,7 @@ auto concept RealMagnitude /// Concept/Type-trait for magnitudes of scalar values /** This name is overloaded: when MTL4 is compiled with a concept-compiler Magnitude is a concept otherwise a type-trait. - It is used for instance in norms. + It is used for instance in norms. **/ template struct Magnitude diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/matrix.hpp index e701b21f..40a6253e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_CONCEPT_INCLUDE @@ -18,7 +18,7 @@ #ifdef __GXX_CONCEPTS__ # include -#else +#else # include #endif @@ -48,7 +48,7 @@ namespace mtl { - A is an object of type X - r, c are objects of size_type \par Valid expressions: - - Element access: \n A(r, c) \n Return Type: const_reference + - Element access: \n A(r, c) \n Return Type: const_reference \n Semantics: Element in row \p r and column \p c - Element access: \n A[r][c] \n Equivalent to A(r, c) \par Models: @@ -61,7 +61,7 @@ namespace mtl { of element access by A(r, c). -# The name const_reference does not imply that the return type is necessarily referrable. For instance compressed2D returns value_type. - */ + */ template struct Matrix : public AlgebraicCollection @@ -71,7 +71,7 @@ namespace mtl { }; #endif - + #ifdef __GXX_CONCEPTS__ concept MatrixInserter @@ -80,15 +80,15 @@ namespace mtl { // typename T::matrix_type; requires Matrix; - + typename proxy_type; proxy_type operator() (Matrix::size_type row, Matrix::size_type col); - + T operator<< (proxy_type, Matrix::value_type>); }; #else /// Concept MatrixInserter: classes that enable efficient insertion into matrices, esp. compressed sparse. - /** + /** Used to fill non-mutable matrices like compressed2D. Matrix inserters might be parametrizable with update functor. This allow to perform different operations when entry already exist, e.g. overwriting, incrementing, minimum, ... The most important updates are certainly overwrite and increment (add). @@ -98,7 +98,7 @@ namespace mtl { \par Requires: - Matrix - + \par Notation: - X is a type that models MatrixInserter - A is an object of type X @@ -135,7 +135,7 @@ namespace mtl { }; #else /// Concept InsertableMatrix: %matrix that can be filled by means of inserter - /** + /** \par Requires: - MatrixInserter < mtl::matrix::inserter< T > > \par Models: @@ -172,7 +172,7 @@ namespace mtl { - A is an object of type X - r, c are objects of size_type \par Valid expressions: - - Element access: \n A(r, c) \n Return Type: reference + - Element access: \n A(r, c) \n Return Type: reference \n Semantics: Element in row \p r and column \p c - Element access: \n A[r][c] \n Equivalent to A(r, c) \par Models: @@ -182,7 +182,7 @@ namespace mtl { -# The access via A[r][c] is supposed to be implemented by means of A(r, c) (typically via CRTP and proxies). If it would become (extremely) important to support 2D C arrays, it might be necessary to drop the requirement of element access by A(r, c). - */ + */ template struct MutableMatrix : public Matrix, @@ -193,7 +193,7 @@ namespace mtl { }; #endif - + #ifdef __GXX_CONCEPTS__ concept ConstantSizeMatrix : Matrix, @@ -205,7 +205,7 @@ namespace mtl { \par Refinement of: - Matrix < T > - ConstantSizeAlgebraicCollection < T > - */ + */ template struct ConstantSizeMatrix : public Matrix, @@ -225,7 +225,7 @@ namespace mtl { /** \par Refinement of: - Matrix < T > - */ + */ template struct ResizeableMatrix : public Matrix @@ -240,15 +240,15 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ concept RowTraversableMatrix : Matrix, - TraversableCollection + TraversableCollection {}; #else /// Concept RowTraversableMatrix: provides begin and end cursor to traverse rows /** \par Refinement of: - Matrix < M > - - TraversableCollection - */ + - TraversableCollection + */ template struct RowTraversableMatrix : public Matrix, @@ -256,19 +256,19 @@ namespace mtl { {}; #endif - + #ifdef __GXX_CONCEPTS__ concept ColumnTraversableMatrix : Matrix, - TraversableCollection + TraversableCollection {}; #else /// Concept ColumnTraversableMatrix: provides begin and end cursor to traverse columns /** \par Refinement of: - Matrix < M > - - TraversableCollection - */ + - TraversableCollection + */ template struct ColumnTraversableMatrix : public Matrix, @@ -280,7 +280,7 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ concept MajorTraversableMatrix : Matrix, - TraversableCollection + TraversableCollection {}; #else /// Concept MajorTraversableMatrix: traversable on major dimension @@ -290,22 +290,22 @@ namespace mtl { The cursors begin and end are provided. \par Refinement of: - Matrix < M > - - TraversableCollection + - TraversableCollection \note -# This traversal corresponds to the iterator design in MTL 2. - */ + */ template struct MajorTraversableMatrix : public Matrix, public TraversableCollection {}; #endif - + #ifdef __GXX_CONCEPTS__ concept MinorTraversableMatrix : Matrix, - TraversableCollection + TraversableCollection {}; #else /// Concept MinorTraversableMatrix: traversable on minor dimension @@ -315,22 +315,22 @@ namespace mtl { The cursors begin and end are provided. \par Refinement of: - Matrix < M > - - TraversableCollection + - TraversableCollection \note -# This traversal corresponds to the iterator design in MTL 2. - */ + */ template struct MinorTraversableMatrix : public Matrix, public TraversableCollection {}; #endif - + #ifdef __GXX_CONCEPTS__ concept AllTraversableMatrix : Matrix, - TraversableCollection + TraversableCollection {}; #else /// Concept AllTraversableMatrix: provides traversion over all elements @@ -340,22 +340,22 @@ namespace mtl { The cursors begin and end are provided. \par Refinement of: - Matrix < M > - - TraversableCollection + - TraversableCollection \note -# For dense matrices the concept is equivalent to NonZeroTraversableMatrix. - */ + */ template struct AllTraversableMatrix : public Matrix, public TraversableCollection {}; #endif - + #ifdef __GXX_CONCEPTS__ concept NonZeroTraversableMatrix : Matrix, - TraversableCollection + TraversableCollection {}; #else /// Concept NonZeroTraversableMatrix: provides traversion over all structural non-zeros @@ -365,17 +365,17 @@ namespace mtl { The cursors begin and end are provided. \par Refinement of: - Matrix < M > - - TraversableCollection + - TraversableCollection \note -# For dense matrices the concept is equivalent to AllTraversableMatrix. - */ + */ template struct AllTraversableMatrix : public Matrix, public TraversableCollection {}; #endif - + #ifdef __GXX_CONCEPTS__ concept AllTraversableSubMatrix @@ -392,7 +392,7 @@ namespace mtl { - Matrix < M > - TraversableCollection, - TraversableCollection::result_type> - */ + */ template struct AllTraversableMatrix : public Matrix, @@ -400,8 +400,8 @@ namespace mtl { public TraversableCollection::result_type> {}; #endif - - + + #ifdef __GXX_CONCEPTS__ concept NonZeroTraversableSubMatrix @@ -418,7 +418,7 @@ namespace mtl { - Matrix < M > - TraversableCollection, - TraversableCollection::result_type> - */ + */ template struct NonZeroTraversableSubMatrix : public Matrix, @@ -426,7 +426,7 @@ namespace mtl { public TraversableCollection::result_type> {}; #endif - + #ifdef __GXX_CONCEPTS__ concept IteratableSubMatrix @@ -439,7 +439,7 @@ namespace mtl { /** This concepts actually combines four sub-concepts. The iteration can be either performed over all elements or only over structural non-zero elements whereby the iterator can be a const-iterator - or a mutable iterator. These four combinations are specified by the tags mtl::tag::iter::all, + or a mutable iterator. These four combinations are specified by the tags mtl::tag::iter::all, mtl::tag::iter::nz, mtl::tag::const_iter::all, and mtl::tag::const_iter::nz for ITag. The template parameter Tag can be mtl::tag::major or mtl::tag::column. The cursors begin and end are provided. @@ -447,7 +447,7 @@ namespace mtl { - Matrix < M > - TraversableCollection, - TraversableCollection::result_type> - */ + */ template struct IteratableSubMatrix : public Matrix, diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/static_functor.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/static_functor.hpp index e1a549f6..705f7971 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/static_functor.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/static_functor.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_STATIC_FUNCTOR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/std_concept.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/std_concept.hpp index 0a8f091f..c473f10c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/std_concept.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/std_concept.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_STD_CONCEPT_INCLUDE @@ -57,12 +57,12 @@ namespace mtl { // Use Joel de Guzman's return type deduction // Adapted from uBLAS - // Differences: + // Differences: // - Separate types for all operations // - result_type like in concept /// Concept Addable: Binary operation - /** In concept-free compilations also used for return type deduction */ + /** In concept-free compilations also used for return type deduction */ template class Addable { @@ -73,7 +73,7 @@ namespace mtl { boost::numeric::ublas::type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type - >(x + y) + >(x + y) ); static const std::size_t index = (size / sizeof (char)) - 1; @@ -86,7 +86,7 @@ namespace mtl { /// Concept Subtractable: Binary operation - /** In concept-free compilations also used for return type deduction */ + /** In concept-free compilations also used for return type deduction */ template class Subtractable { @@ -97,7 +97,7 @@ namespace mtl { boost::numeric::ublas::type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type - >(x - y) + >(x - y) ); static const std::size_t index = (size / sizeof (char)) - 1; @@ -116,7 +116,7 @@ namespace mtl { }; /// Concept Multiplicable: Binary operation - /** In concept-free compilations also used for return type deduction */ + /** In concept-free compilations also used for return type deduction */ template class Multiplicable_aux { @@ -127,7 +127,7 @@ namespace mtl { boost::numeric::ublas::type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type - >(x * y) + >(x * y) ); static const std::size_t index = (size / sizeof (char)) - 1; @@ -137,9 +137,9 @@ namespace mtl { /// Result of multiplication typedef typename id::type result_type; }; - + /// Concept Multiplicable: Binary operation - /** In concept-free compilations also used for return type deduction */ + /** In concept-free compilations also used for return type deduction */ template class Multiplicable : Multiplicable_aux::value && mtl::traits::is_scalar::value> @@ -147,7 +147,7 @@ namespace mtl { #endif /// Concept Multiplicable: Binary operation - /** In concept-free compilations also used for return type deduction */ + /** In concept-free compilations also used for return type deduction */ template class Multiplicable { @@ -158,7 +158,7 @@ namespace mtl { boost::numeric::ublas::type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type - >(x * y) + >(x * y) ); static const std::size_t index = (size / sizeof (char)) - 1; @@ -170,7 +170,7 @@ namespace mtl { }; /// Concept Divisible: Binary operation - /** In concept-free compilations also used for return type deduction */ + /** In concept-free compilations also used for return type deduction */ template class Divisible { @@ -181,7 +181,7 @@ namespace mtl { boost::numeric::ublas::type_deduction_detail::test< typename base_type::x_type , typename base_type::y_type - >(x * y) + >(x * y) ); static const std::size_t index = (size / sizeof (char)) - 1; @@ -191,7 +191,7 @@ namespace mtl { /// Result of division typedef typename id::type result_type; }; - + #endif @@ -200,18 +200,18 @@ namespace mtl { : std::Callable1 { typename result_type; - + static result_type F::apply(T); }; #else /// Concept UnaryFunctor - /** With concept corresponds to std::Callable1 */ + /** With concept corresponds to std::Callable1 */ template struct UnaryFunctor { /// Result type of operator() typedef associated_type result_type; - + /// The unary function result_type operator()(T); }; @@ -228,7 +228,7 @@ namespace mtl { { /// Result type of apply typedef associated_type result_type; - + /// The unary static function static result_type apply(T); @@ -248,13 +248,13 @@ namespace mtl { }; #else /// Concept BinaryFunctor - /** With concept corresponds to std::Callable2 */ + /** With concept corresponds to std::Callable2 */ template struct BinaryFunctor { /// Result type of operator() typedef associated_type result_type; - + /// The unary function result_type operator()(T, U); }; @@ -270,7 +270,7 @@ namespace mtl { { /// Result type of apply typedef associated_type result_type; - + /// The unary static function static result_type apply(T, U); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/vector.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/vector.hpp index a9c63209..581a4f7a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/concept/vector.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/concept/vector.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_VECTOR_CONCEPTS_INCLUDE @@ -18,7 +18,7 @@ #ifdef __GXX_CONCEPTS__ # include -#else +#else # include #endif @@ -48,20 +48,20 @@ namespace mtl { - v is an object of type X - r are objects of size_type \par Valid expressions: - - Element access: \n v(r) \n Return Type: const_reference + - Element access: \n v(r) \n Return Type: const_reference \n Semantics: Element in row \p r and column \p c - Element access: \n v[r] \n Equivalent to v(r) \invariant - Either num_cols(v), in case of a column vector, or num_rows(v), in case of a row vector, must be 1! Otherwise it would be - a matrix. + a matrix. \par Models: - dense_vector \note - -# If it would become (extremely) important to support 1D C arrays as Vector, + -# If it would become (extremely) important to support 1D C arrays as Vector, it might be necessary to drop the requirement of element access by v(r). - */ + */ template struct Vector : public AlgebraicCollection @@ -77,7 +77,7 @@ namespace mtl { #ifdef __GXX_CONCEPTS__ concept MutableVector - : Vector, + : Vector, MutableCollection { reference T::operator() (size_type index); @@ -95,19 +95,19 @@ namespace mtl { - v is an object of type X - r are objects of size_type \par Valid expressions: - - Element access: \n v(r) \n Return Type: reference + - Element access: \n v(r) \n Return Type: reference \n Semantics: Element in row \p r for a column vector or in column \p c for a row vector - Element access: \n v[r] \n Equivalent to v(r) \par Models: - dense_vector \note - -# If it would become (extremely) important to support 1D C arrays as Vector, + -# If it would become (extremely) important to support 1D C arrays as Vector, it might be necessary to drop the requirement of element access by v(r). - */ + */ template struct MutableVector - : public Vector, + : public Vector, public MutableCollection {}; #endif @@ -124,7 +124,7 @@ namespace mtl { \par Refinement of: - Vector < T > - ConstantSizeAlgebraicCollection < T > - */ + */ template struct ConstantSizeVector : public Vector, @@ -132,7 +132,7 @@ namespace mtl { {}; #endif - + /*@}*/ // end of group Concepts diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/config.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/config.hpp index 336a8d79..29ad7928 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/config.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/config.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CONFIG_INCLUDE @@ -69,7 +69,7 @@ namespace mtl { # else /// Maximal number of columns in block that is inserted separately; above this the block is presorted (only row-major sparse matrices). /** Can be reset with a macro definition or corresponding compiler flag, - e.g. {-D|/D}MTL_SORTED_BLOCK_INSERTION_LIMIT=8 + e.g. {-D|/D}MTL_SORTED_BLOCK_INSERTION_LIMIT=8 Default is 5. **/ const std::size_t sorted_block_insertion_limit= 5; # endif @@ -77,8 +77,8 @@ namespace mtl { # ifdef MTL_CRS_CVEC_MULT_BLOCK_SIZE const std::size_t crs_cvec_mult_block_size= MTL_CRS_CVEC_MULT_BLOCK_SIZE; # else - /// Number of rows that are handled independently in each iteration of CRS times vector product - /** The independent treatment of multiple matrix rows enables concurrency + /// Number of rows that are handled independently in each iteration of CRS times vector product + /** The independent treatment of multiple matrix rows enables concurrency (although we do not explicit parallelize the matrix product here). The default is treating 4 rows in each iteration. This default can be changed with a macro definition or corresponding compiler flag, diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/base_cursor.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/base_cursor.hpp index 11cc95e9..b1ba20f2 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/base_cursor.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/base_cursor.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_BASE_CURSOR_INCLUDE @@ -16,81 +16,81 @@ namespace mtl { namespace detail { // base class for different cursors, works with pointers and integers -template class base_cursor +template class base_cursor { public: typedef Key key_type; typedef base_cursor self; - base_cursor () {} + base_cursor () {} base_cursor (key_type key) : key(key) {} - key_type operator*() const - { - return key; + key_type operator*() const + { + return key; } - key_type value() const - { - return key; + key_type value() const + { + return key; } - self& operator++ () - { - ++key; return *this; + self& operator++ () + { + ++key; return *this; } - self operator++ (int) - { - self tmp = *this; - ++key; - return tmp; + self operator++ (int) + { + self tmp = *this; + ++key; + return tmp; } - self& operator-- () - { - --key; - return *this; + self& operator-- () + { + --key; + return *this; } - self operator-- (int) - { - self tmp = *this; - --key; - return tmp; + self operator-- (int) + { + self tmp = *this; + --key; + return tmp; } - self& operator+=(int n) - { - key += n; - return *this; + self& operator+=(int n) + { + key += n; + return *this; } - + self operator+(int n) const { self tmp = *this; tmp+= n; return tmp; } - - self& operator-=(int n) - { - key -= n; - return *this; + + self& operator-=(int n) + { + key -= n; + return *this; } - int operator-(const self& cc) const + int operator-(const self& cc) const { return this->key - cc.key; } - bool operator==(const self& cc) const + bool operator==(const self& cc) const { - return key == cc.key; + return key == cc.key; } - bool operator!=(const self& cc) const + bool operator!=(const self& cc) const { - return !(*this == cc); + return !(*this == cc); } - - + + key_type key; @@ -98,8 +98,8 @@ template class base_cursor -}} // namespace mtl::detail +}} // namespace mtl::detail -#endif // MTL_BASE_CURSOR_INCLUDE +#endif // MTL_BASE_CURSOR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/contiguous_memory_block.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/contiguous_memory_block.hpp index 816fe1b3..bcdb0122 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/contiguous_memory_block.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/contiguous_memory_block.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CONTIGUOUS_MEMORY_BLOCK_INCLUDE @@ -27,7 +27,7 @@ namespace mtl { namespace detail { using std::size_t; - + // Macro MTL_ENABLE_ALIGNMENT is by default not set // Minimal size of memory allocation using alignment @@ -82,7 +82,7 @@ struct size_helper<0> return my_used_memory; } - friend void swap(self& x, self& y) + friend void swap(self& x, self& y) { std::swap(x.my_used_memory, y.my_used_memory); } @@ -110,7 +110,7 @@ struct size_helper<0> bool align= size * sizeof(value_type) >= MTL_ALIGNMENT_LIMIT; std::size_t bytes= size * sizeof(value_type); - + if (align) bytes+= MTL_ALIGNMENT - 1; @@ -128,13 +128,13 @@ struct size_helper<0> data= 0; } - friend void swap(self& x, self& y) + friend void swap(self& x, self& y) { using std::swap swap(x.malloc_address, y.malloc_address); } - private: + private: char* malloc_address; }; @@ -149,7 +149,7 @@ struct size_helper<0> void aligned_delete(bool is_own, Value*& data) { - if (is_own && data != 0) // std::cout << "Delete " << data << '\n', + if (is_own && data != 0) // std::cout << "Delete " << data << '\n', delete[] data, data= 0; } @@ -166,47 +166,47 @@ struct memory_crtp typedef contiguous_memory_block base; static bool const on_stack= OnStack; - + typedef Value value_type; typedef value_type* pointer_type; typedef const value_type* const_pointer_type; - // offset of key (pointer) w.r.t. data + // offset of key (pointer) w.r.t. data // values must be stored consecutively - size_t offset(const Value* p) const - { - return p - static_cast(*this).data; + size_t offset(const Value* p) const + { + return p - static_cast(*this).data; } // returns pointer to data pointer_type elements() { - return static_cast(*this).data; + return static_cast(*this).data; } // returns const pointer to data - const_pointer_type elements() const + const_pointer_type elements() const { - return static_cast(*this).data; + return static_cast(*this).data; } // returns n-th value in consecutive memory // (whatever this means in the corr. matrix format) value_type& value_n(size_t offset) - { - return static_cast(*this).data[offset]; + { + return static_cast(*this).data[offset]; } // returns n-th value in consecutive memory // (whatever this means in the corr. matrix format) - const value_type& value_n(size_t offset) const - { - return static_cast(*this).data[offset]; + const value_type& value_n(size_t offset) const + { + return static_cast(*this).data[offset]; } - + }; -// OnStack == false -> data on heap +// OnStack == false -> data on heap template struct contiguous_memory_block : public size_helper, @@ -221,7 +221,7 @@ struct contiguous_memory_block /// Category of memory, determines behaviour enum c_t {own, //< My own memory: allocate and free it - external, //< Memory, complete memory block of other item, only reference + external, //< Memory, complete memory block of other item, only reference view //< View of other's memory (e.g. sub-matrix), different construction than external }; @@ -244,7 +244,7 @@ struct contiguous_memory_block { using std::copy; category= own; - // std::cout << "Copied in copy constructor.\n"; + // std::cout << "Copied in copy constructor.\n"; alloc(other.used_memory()); // std::cout << "My address: " << data << ", other address: " << other.data << '\n'; copy(other.data, other.data + other.used_memory(), data); @@ -270,7 +270,7 @@ struct contiguous_memory_block template void copy_assignment(const Other& other) { - // std::cout << "Copied in assignment.\n"; + // std::cout << "Copied in assignment.\n"; if (this->used_memory() == 0) alloc(other.used_memory()); MTL_DEBUG_THROW_IF(this->used_memory() != other.used_memory(), incompatible_size()); @@ -280,9 +280,9 @@ struct contiguous_memory_block public: contiguous_memory_block() : category(own), data(0) {} - explicit contiguous_memory_block(Value *data, std::size_t size, bool is_view= false) + explicit contiguous_memory_block(Value *data, std::size_t size, bool is_view= false) : size_base(size), category(is_view ? view : external), data(data) - {} + {} explicit contiguous_memory_block(std::size_t size) : category(own) { @@ -294,7 +294,7 @@ struct contiguous_memory_block // Default copy constructor contiguous_memory_block(const self& other) : size_base(other) { - // std::cout << "Copy constructor (same type).\n"; + // std::cout << "Copy constructor (same type).\n"; if (other.category == view) copy_view(other); else @@ -304,7 +304,7 @@ struct contiguous_memory_block // Force copy construction contiguous_memory_block(const self& other, clone_ctor) { - // std::cout << "(Forced) Copy constructor (same type).\n"; + // std::cout << "(Forced) Copy constructor (same type).\n"; copy_construction(other); } @@ -371,14 +371,14 @@ public: if (Size == 0) { // If already have memory of the right size we can keep it - if (size == this->used_memory()) + if (size == this->used_memory()) return; - MTL_DEBUG_THROW_IF(category != own, + MTL_DEBUG_THROW_IF(category != own, logic_error("Can't change the size of collections with external memory")); delete_it(); alloc(size); } else { - MTL_DEBUG_THROW_IF(size != Size, logic_error("Can't change static size")); + MTL_DEBUG_THROW_IF(size != Size, logic_error("Can't change static size")); } } @@ -395,7 +395,7 @@ public: std::swap(x.data, y.data); swap(static_cast(x), static_cast(y)); swap(static_cast(x), static_cast(y)); - } + } protected: enum c_t category; @@ -403,7 +403,7 @@ public: Value *data; }; -// OnStack == true +// OnStack == true template struct contiguous_memory_block : public alignment_helper, @@ -418,7 +418,7 @@ struct contiguous_memory_block # ifdef NDEBUG contiguous_memory_block() {} // default constructor in release mode explicit contiguous_memory_block(std::size_t) {} -# else +# else explicit contiguous_memory_block(std::size_t size= Size) { MTL_DEBUG_THROW_IF(Size != size, incompatible_size()); @@ -436,7 +436,7 @@ struct contiguous_memory_block template explicit contiguous_memory_block(const contiguous_memory_block& other) { - // std::cout << "Copied in copy constructor (different type).\n"; + // std::cout << "Copied in copy constructor (different type).\n"; MTL_DEBUG_THROW_IF(Size != other.used_memory(), incompatible_size()); std::copy(other.data, other.data + other.used_memory(), data); } @@ -466,10 +466,10 @@ public: } - void realloc(std::size_t MTL_DEBUG_ARG(s)) + void realloc(std::size_t MTL_DEBUG_ARG(s)) { // Arrays on stack cannot be reallocated but if the size isn't changed we are fine - assert(s == Size); + assert(s == Size); } std::size_t used_memory() const diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilated_int.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilated_int.hpp index dff44a1e..88a169b1 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilated_int.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilated_int.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Written by Jiahu Deng and Peter Gottschling @@ -25,7 +25,7 @@ struct even_bits { static T const value = T(-1) / T(3); }; - + template struct odd_bits { @@ -50,7 +50,7 @@ struct masking { static T const anti_mask = ~BitMask; x |= anti_mask; - } + } }; template @@ -79,20 +79,20 @@ struct dilated_int { typedef T value_type; typedef dilated_int self; - + typedef masking clean_carry; typedef masking init_carry; static T const bit_mask = BitMask, - anti_mask = ~BitMask, + anti_mask = ~BitMask, dilated_zero = Normalized ? 0 : anti_mask, dilated_one = dilated_zero + last_bit::value; protected: // masked_dilation_tables mask_tables; // masked_dilation_tables anti_tables; probably not needed - + // will be protected later -public: +public: T i; void dilate(T x) @@ -108,7 +108,7 @@ public: { i = Normalized ? 0 : anti_mask; } - + // Only works for odd and even bits and 4-byte-int at this point !!!!!!!!!!!!!!!!!!! explicit dilated_int(T x) { @@ -168,7 +168,7 @@ public: } self& operator-- () - { + { i -= dilated_one; clean_carry()(i); return *this; @@ -187,13 +187,13 @@ public: clean_carry()(i); return *this; } - + self operator- (self const& x) const { self tmp(*this); return tmp -= x; } - + // advance in both directions, special care is needed for negative values self& advance(int inc) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilation_table.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilation_table.hpp index cffe40be..906e2708 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilation_table.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/dilation_table.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Written by Jiahu Deng and Peter Gottschling @@ -18,11 +18,11 @@ */ /* Rewrote by Jiahu Deng 06/08/2005 - modified the undilated-lookup table, use the algorithms from + modified the undilated-lookup table, use the algorithms from Prof.Wise's paper, Converting to and from Dilated Integers. Added supports for anti-dilated integers. */ - + #ifndef MTL_DILATION_TABLE_INCLUDE #define MTL_DILATION_TABLE_INCLUDE @@ -30,38 +30,38 @@ namespace mtl { namespace dilated { static const unsigned short int dilate_lut[256] = { - 0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015, - 0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055, - 0x0100, 0x0101, 0x0104, 0x0105, 0x0110, 0x0111, 0x0114, 0x0115, - 0x0140, 0x0141, 0x0144, 0x0145, 0x0150, 0x0151, 0x0154, 0x0155, - 0x0400, 0x0401, 0x0404, 0x0405, 0x0410, 0x0411, 0x0414, 0x0415, - 0x0440, 0x0441, 0x0444, 0x0445, 0x0450, 0x0451, 0x0454, 0x0455, - 0x0500, 0x0501, 0x0504, 0x0505, 0x0510, 0x0511, 0x0514, 0x0515, - 0x0540, 0x0541, 0x0544, 0x0545, 0x0550, 0x0551, 0x0554, 0x0555, - 0x1000, 0x1001, 0x1004, 0x1005, 0x1010, 0x1011, 0x1014, 0x1015, - 0x1040, 0x1041, 0x1044, 0x1045, 0x1050, 0x1051, 0x1054, 0x1055, - 0x1100, 0x1101, 0x1104, 0x1105, 0x1110, 0x1111, 0x1114, 0x1115, - 0x1140, 0x1141, 0x1144, 0x1145, 0x1150, 0x1151, 0x1154, 0x1155, - 0x1400, 0x1401, 0x1404, 0x1405, 0x1410, 0x1411, 0x1414, 0x1415, - 0x1440, 0x1441, 0x1444, 0x1445, 0x1450, 0x1451, 0x1454, 0x1455, - 0x1500, 0x1501, 0x1504, 0x1505, 0x1510, 0x1511, 0x1514, 0x1515, - 0x1540, 0x1541, 0x1544, 0x1545, 0x1550, 0x1551, 0x1554, 0x1555, - 0x4000, 0x4001, 0x4004, 0x4005, 0x4010, 0x4011, 0x4014, 0x4015, - 0x4040, 0x4041, 0x4044, 0x4045, 0x4050, 0x4051, 0x4054, 0x4055, - 0x4100, 0x4101, 0x4104, 0x4105, 0x4110, 0x4111, 0x4114, 0x4115, - 0x4140, 0x4141, 0x4144, 0x4145, 0x4150, 0x4151, 0x4154, 0x4155, - 0x4400, 0x4401, 0x4404, 0x4405, 0x4410, 0x4411, 0x4414, 0x4415, - 0x4440, 0x4441, 0x4444, 0x4445, 0x4450, 0x4451, 0x4454, 0x4455, - 0x4500, 0x4501, 0x4504, 0x4505, 0x4510, 0x4511, 0x4514, 0x4515, - 0x4540, 0x4541, 0x4544, 0x4545, 0x4550, 0x4551, 0x4554, 0x4555, - 0x5000, 0x5001, 0x5004, 0x5005, 0x5010, 0x5011, 0x5014, 0x5015, - 0x5040, 0x5041, 0x5044, 0x5045, 0x5050, 0x5051, 0x5054, 0x5055, - 0x5100, 0x5101, 0x5104, 0x5105, 0x5110, 0x5111, 0x5114, 0x5115, - 0x5140, 0x5141, 0x5144, 0x5145, 0x5150, 0x5151, 0x5154, 0x5155, - 0x5400, 0x5401, 0x5404, 0x5405, 0x5410, 0x5411, 0x5414, 0x5415, - 0x5440, 0x5441, 0x5444, 0x5445, 0x5450, 0x5451, 0x5454, 0x5455, - 0x5500, 0x5501, 0x5504, 0x5505, 0x5510, 0x5511, 0x5514, 0x5515, - 0x5540, 0x5541, 0x5544, 0x5545, 0x5550, 0x5551, 0x5554, 0x5555, + 0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015, + 0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055, + 0x0100, 0x0101, 0x0104, 0x0105, 0x0110, 0x0111, 0x0114, 0x0115, + 0x0140, 0x0141, 0x0144, 0x0145, 0x0150, 0x0151, 0x0154, 0x0155, + 0x0400, 0x0401, 0x0404, 0x0405, 0x0410, 0x0411, 0x0414, 0x0415, + 0x0440, 0x0441, 0x0444, 0x0445, 0x0450, 0x0451, 0x0454, 0x0455, + 0x0500, 0x0501, 0x0504, 0x0505, 0x0510, 0x0511, 0x0514, 0x0515, + 0x0540, 0x0541, 0x0544, 0x0545, 0x0550, 0x0551, 0x0554, 0x0555, + 0x1000, 0x1001, 0x1004, 0x1005, 0x1010, 0x1011, 0x1014, 0x1015, + 0x1040, 0x1041, 0x1044, 0x1045, 0x1050, 0x1051, 0x1054, 0x1055, + 0x1100, 0x1101, 0x1104, 0x1105, 0x1110, 0x1111, 0x1114, 0x1115, + 0x1140, 0x1141, 0x1144, 0x1145, 0x1150, 0x1151, 0x1154, 0x1155, + 0x1400, 0x1401, 0x1404, 0x1405, 0x1410, 0x1411, 0x1414, 0x1415, + 0x1440, 0x1441, 0x1444, 0x1445, 0x1450, 0x1451, 0x1454, 0x1455, + 0x1500, 0x1501, 0x1504, 0x1505, 0x1510, 0x1511, 0x1514, 0x1515, + 0x1540, 0x1541, 0x1544, 0x1545, 0x1550, 0x1551, 0x1554, 0x1555, + 0x4000, 0x4001, 0x4004, 0x4005, 0x4010, 0x4011, 0x4014, 0x4015, + 0x4040, 0x4041, 0x4044, 0x4045, 0x4050, 0x4051, 0x4054, 0x4055, + 0x4100, 0x4101, 0x4104, 0x4105, 0x4110, 0x4111, 0x4114, 0x4115, + 0x4140, 0x4141, 0x4144, 0x4145, 0x4150, 0x4151, 0x4154, 0x4155, + 0x4400, 0x4401, 0x4404, 0x4405, 0x4410, 0x4411, 0x4414, 0x4415, + 0x4440, 0x4441, 0x4444, 0x4445, 0x4450, 0x4451, 0x4454, 0x4455, + 0x4500, 0x4501, 0x4504, 0x4505, 0x4510, 0x4511, 0x4514, 0x4515, + 0x4540, 0x4541, 0x4544, 0x4545, 0x4550, 0x4551, 0x4554, 0x4555, + 0x5000, 0x5001, 0x5004, 0x5005, 0x5010, 0x5011, 0x5014, 0x5015, + 0x5040, 0x5041, 0x5044, 0x5045, 0x5050, 0x5051, 0x5054, 0x5055, + 0x5100, 0x5101, 0x5104, 0x5105, 0x5110, 0x5111, 0x5114, 0x5115, + 0x5140, 0x5141, 0x5144, 0x5145, 0x5150, 0x5151, 0x5154, 0x5155, + 0x5400, 0x5401, 0x5404, 0x5405, 0x5410, 0x5411, 0x5414, 0x5415, + 0x5440, 0x5441, 0x5444, 0x5445, 0x5450, 0x5451, 0x5454, 0x5455, + 0x5500, 0x5501, 0x5504, 0x5505, 0x5510, 0x5511, 0x5514, 0x5515, + 0x5540, 0x5541, 0x5544, 0x5545, 0x5550, 0x5551, 0x5554, 0x5555, }; @@ -98,7 +98,7 @@ static const unsigned short int anti_dilate_lut[256] = { 0xfeea,0xfeeb,0xfeee,0xfeef,0xfefa,0xfefb,0xfefe,0xfeff, 0xffaa,0xffab,0xffae,0xffaf,0xffba,0xffbb,0xffbe,0xffbf, 0xffea,0xffeb,0xffee,0xffef,0xfffa,0xfffb,0xfffe,0xffff, - + }; static const unsigned short int undilate_lut[256] = { @@ -136,7 +136,7 @@ static const unsigned short int undilate_lut[256] = { 0xec, 0xed, 0xfc, 0xfd, 0xee, 0xef, 0xfe, 0xff, }; - + }} // namespace mtl::dilated diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/index.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/index.hpp index 62de2d71..10241d15 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/index.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/index.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_INDEX_INCLUDE @@ -46,25 +46,25 @@ template struct which_index }; // Change from internal representation to requested index type -template inline T change_to(c_index, T i) +template inline T change_to(c_index, T i) { - return i; + return i; } -template inline T change_to(f_index, T i) -{ - return i + 1; +template inline T change_to(f_index, T i) +{ + return i + 1; } // Change from requested index type to internal representation -template inline T change_from(c_index, T i) -{ - return i; +template inline T change_from(c_index, T i) +{ + return i; } -template inline T change_from(f_index, T i) -{ - return i - 1; +template inline T change_from(f_index, T i) +{ + return i - 1; } }} // namespace mtl::index diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/masked_dilation_tables.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/masked_dilation_tables.hpp index ef693c63..f932385c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/masked_dilation_tables.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/masked_dilation_tables.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MASKED_DILATION_TABLES_INCLUDE @@ -37,7 +37,7 @@ struct masked_dilation_tables static it_type* my_mask_size, *my_mask_shift_table, *my_unmask_shift_table; static int n_valid_table, instances; public: - + masked_dilation_tables() { if (instances++ == 0) @@ -47,11 +47,11 @@ struct masked_dilation_tables ~masked_dilation_tables() { if (--instances == 0) { - delete[] my_mask_lut; - delete[] my_unmask_lut; - delete[] my_mask_piece; - delete[] my_mask_size; - delete[] my_mask_shift_table; + delete[] my_mask_lut; + delete[] my_unmask_lut; + delete[] my_mask_piece; + delete[] my_mask_size; + delete[] my_mask_shift_table; delete[] my_unmask_shift_table; } } @@ -70,7 +70,7 @@ private: T inc(T i, T mask) { return ((i - mask) & mask); } - void compute_tables() + void compute_tables() { // std::cout << "computing tables! " << std::endl; init(); @@ -78,18 +78,18 @@ private: // compute the mask table for (int j = 0; j < n_valid_table; ++j) { T f_mask = get_f_mask(mask_size()[j]), i, ii; - for (i = 0, ii = 0; i < 256; ++i, ii = inc(ii, mask_piece()[j])) - mask_lut()[j][i] = (ii & f_mask) << mask_shift_table()[j]; // need to shift + for (i = 0, ii = 0; i < 256; ++i, ii = inc(ii, mask_piece()[j])) + mask_lut()[j][i] = (ii & f_mask) << mask_shift_table()[j]; // need to shift } // compute the unmask table T f_mask = get_f_mask(8); for (T j = 0; j < sizeof(T); ++j) { T t_mask = (Mask >> (8*j)) & f_mask, i, ii; - for(i = 0, ii = 0; ii < t_mask; ii = inc(ii, t_mask), ++i) + for(i = 0, ii = 0; ii < t_mask; ii = inc(ii, t_mask), ++i) unmask_lut()[j][ii] = i << unmask_shift_table()[j]; // set the value for the last one - unmask_lut()[j][t_mask] = i << unmask_shift_table()[j]; + unmask_lut()[j][t_mask] = i << unmask_shift_table()[j]; } } @@ -105,16 +105,16 @@ private: // initialize needed parameters - void init() + void init() { allocate(); assert(count_n_ones(Mask) > 0); n_valid_table= (count_n_ones(Mask) + 7) / 8; // calculate the number of valid table - set_mask(); + set_mask(); } // return the number of 1's in the mask - int count_n_ones(T t) + int count_n_ones(T t) { int n_ones = 0; for (; t; t>>= 1) @@ -123,7 +123,7 @@ private: } // return the number of valid bits in the mask - int count_bits(T t) + int count_bits(T t) { int bits = 0; for (; t; t>>= 1) @@ -133,7 +133,7 @@ private: // set mask pieces - void set_mask() + void set_mask() { // set the unmask shift table unmask_shift_table()[0] = 0; @@ -149,7 +149,7 @@ private: // if there is only 8 or less 1's in the mask, // only one table is needed if (n_valid_table == 1) { - mask_piece()[0] = Mask; + mask_piece()[0] = Mask; mask_size()[0] = count_bits(Mask); return; } @@ -160,27 +160,27 @@ private: for (T n_ones= 0; n_ones < 8; ++n_bits) { if ((t_mask & 0x01) == 1) ++n_ones; t_mask = t_mask >>1; - } + } // set the ith piece of mask, which must contains 8 1's mask_piece()[i] = get_f_mask(n_bits) & tmp; - + // set the mask size table mask_size()[i] = n_bits; - + // set shift table mask_shift_table()[i + 1] = n_bits + mask_shift_table()[i]; } // set the last piece of mask, which may contain less than 8 1's // set the number of bits of the last mask - mask_piece()[n_valid_table - 1 ] = t_mask; + mask_piece()[n_valid_table - 1 ] = t_mask; mask_size()[n_valid_table - 1] = count_bits(t_mask); } public: - + // convert to masked integer - T to_masked(T x) + T to_masked(T x) { T result = 0; for (int i = 0; i < n_valid_table; ++i) @@ -190,7 +190,7 @@ public: // convert to unmasked integer - T to_unmasked(T x) + T to_unmasked(T x) { T result = 0; x &= Mask; @@ -263,7 +263,7 @@ inline T unmask(T const& value, masked_dilation_tables tables) // Conversion from Mask1 to Mask2 -// syntax e.g. from Morton to Doppler convert<0x55555555, 0x5555ff00>(7); +// syntax e.g. from Morton to Doppler convert<0x55555555, 0x5555ff00>(7); // Mask must be in front of T -> need casting :-( template inline T convert(T const& value) @@ -273,7 +273,7 @@ inline T convert(T const& value) // Conversion from Mask1 to Mask2 template -inline T convert(T const& value, masked_dilation_tables const& tables1, +inline T convert(T const& value, masked_dilation_tables const& tables1, masked_dilation_tables const& tables2) { return tables2.to_masked(tables1.to_unmasked(value)); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/range_generator.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/range_generator.hpp index 0c789ba7..13238ccb 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/range_generator.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/range_generator.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DETAIL_RANGE_GENERATOR_INCLUDE @@ -22,7 +22,7 @@ namespace mtl { namespace traits { namespace detail { - /// Range generator that traverses all elements of some densely stored collection + /// Range generator that traverses all elements of some densely stored collection /** - Or contiguous parts of such collection - Works for matrices and vectors when derived from contiguous_memory_block **/ @@ -81,12 +81,12 @@ namespace mtl { namespace traits { namespace detail { return type(matrix, matrix.nnz()); } }; - + // Cursor to some submatrix (e.g. row, column, block matrix, block row) - // This cursor is intended to be used by range generators to iterate + // This cursor is intended to be used by range generators to iterate // over subsets of the submatrix this cursor refers to. - // For instance if this cursor refers to a row then a range + // For instance if this cursor refers to a row then a range // can iterate over the elements in this row. // If this cursor refers to a block then a range can iterate over the rows in this block. // The level of a generated cursor must be of course at least one level less @@ -101,8 +101,8 @@ namespace mtl { namespace traits { namespace detail { static int const level = Level; sub_matrix_cursor(int i, Matrix const& c) - : base(i), ref(c) - {} + : base(i), ref(c) + {} self operator+(int offset) const { @@ -112,7 +112,7 @@ namespace mtl { namespace traits { namespace detail { // otherwise base_cursor returns an int and ranged for doesn't work // for getting the key of base_cursor use this->value() self operator*() const { return *this; } - + Matrix const& ref; }; @@ -145,12 +145,12 @@ namespace mtl { namespace traits { namespace detail { typedef matrix_element_cursor self; typedef matrix_element_key key_type; static int const level = 2; - + matrix_element_cursor(Matrix const& ref, size_type r, size_type c) : ref(ref) { indices[0]= r; indices[1]= c; } - + key_type operator*() const { return key_type(ref, indices[0], indices[1]); } self& operator++() { ++indices[pos]; return *this; } @@ -270,7 +270,7 @@ namespace mtl { namespace traits { namespace detail { static int const level = RangeGenerator::level; typedef typename RangeGenerator::type type; typedef typename Collection::size_type size_type; - + type begin(const Coll& c) { return RangeGenerator().begin(c.ref); @@ -292,9 +292,9 @@ namespace mtl { namespace traits { namespace detail { template struct min - : public boost::mpl::if_< + : public boost::mpl::if_< boost::mpl::less< - typename Range1::complexity, + typename Range1::complexity, typename Range2::complexity> , Range1 , Range2 diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/strided_base_cursor.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/strided_base_cursor.hpp index 0465e9ee..cf5bf7c3 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/strided_base_cursor.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/strided_base_cursor.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_STRIDED_BASE_CURSOR_INCLUDE @@ -17,43 +17,43 @@ namespace mtl { namespace detail { -template struct strided_base_cursor +template struct strided_base_cursor : base_cursor { typedef Key key_type; typedef base_cursor base; typedef strided_base_cursor self; - strided_base_cursor () {} - strided_base_cursor (key_type key, std::size_t stride) - : base(key), stride(stride) + strided_base_cursor () {} + strided_base_cursor (key_type key, std::size_t stride) + : base(key), stride(stride) {} - self& operator++ () - { - this->key+= stride; return *this; + self& operator++ () + { + this->key+= stride; return *this; } - self operator++ (int) - { - self tmp = *this; - this->key+= stride; - return tmp; + self operator++ (int) + { + self tmp = *this; + this->key+= stride; + return tmp; } - self& operator-- () - { - this->key-= stride; - return *this; + self& operator-- () + { + this->key-= stride; + return *this; } - self operator-- (int) - { - self tmp = *this; - this->key-= stride; - return tmp; + self operator-- (int) + { + self tmp = *this; + this->key-= stride; + return tmp; } - self& operator+=(int n) - { - this->key += stride * n; - return *this; + self& operator+=(int n) + { + this->key += stride * n; + return *this; } self operator+(int n) const { @@ -61,13 +61,13 @@ template struct strided_base_cursor tmp+= n; return tmp; } - self& operator-=(int n) - { - this->key -= stride * n; - return *this; + self& operator-=(int n) + { + this->key -= stride * n; + return *this; } - int operator-(const self& cc) const + int operator-(const self& cc) const { return (this->key - cc.key) / stride; } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/trivial_inserter.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/trivial_inserter.hpp index 1e16adef..6f9525aa 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/detail/trivial_inserter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/detail/trivial_inserter.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_TRIVIAL_INSERTER_INCLUDE @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include namespace mtl { namespace detail { @@ -30,7 +30,7 @@ struct trivial_inserter typedef typename matrix_type::size_type size_type; typedef typename matrix_type::value_type value_type; typedef operations::update_proxy proxy_type; - + explicit trivial_inserter(matrix_type& matrix, size_type) : matrix(matrix) {} proxy_type operator() (size_type row, size_type col) @@ -40,11 +40,11 @@ struct trivial_inserter private: - + struct bracket_proxy { bracket_proxy(self& ref, size_type row) : ref(ref), row(row) {} - + proxy_type operator[](size_type col) { return proxy_type(ref, row, col); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/arprec.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/arprec.hpp index dd172611..3c39f1df 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/arprec.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/arprec.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ARPREC_INCLUDE @@ -45,9 +45,9 @@ namespace mtl { namespace math { template <> - struct identity_t< add, mp_complex > + struct identity_t< add, mp_complex > : public std::binary_function, mp_complex, mp_complex> - { + { mp_complex operator() (const add&, const mp_complex& /*ref*/) const { return mp_complex("0", "0"); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/blas.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/blas.hpp index 13e8222a..0e65db11 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/blas.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/blas.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. @@ -105,7 +105,7 @@ void MTL_BLAS_NAME(srot)(int*, float*, int*, float*, int*, float*, float*); void MTL_BLAS_NAME(drot)(int*, double*, int*, double*, int*, double*, double*); #if 0 /* MTL implements ccrot and zzrot */ -void MTL_BLAS_NAME(csrot)(int*, complex*, int*, complex*, int*, +void MTL_BLAS_NAME(csrot)(int*, complex*, int*, complex*, int*, complex*, complex*); void MTL_BLAS_NAME(zdrot)(int*, complex*, int*, complex*, int*, double*, double*); @@ -125,32 +125,32 @@ void MTL_BLAS_NAME(dgbmv)(char*, int*, int*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*); -void MTL_BLAS_NAME(dtrsv)(char* uplo, char* trans, char* diag, int* n, double *da, +void MTL_BLAS_NAME(dtrsv)(char* uplo, char* trans, char* diag, int* n, double *da, int* lda, double *dx, int* incx); /*--------------------------------------------------------- Level 3 BLAS -----------------------------------------------------------*/ -void MTL_BLAS_NAME(sgemm)(const char* transa, const char* transb, +void MTL_BLAS_NAME(sgemm)(const char* transa, const char* transb, const int* m, const int* n, const int* k, const float* alpha, const float *da, const int* lda, const float *db, const int* ldb, const float* dbeta, float *dc, const int* ldc); -void MTL_BLAS_NAME(dgemm)(const char* transa, const char* transb, +void MTL_BLAS_NAME(dgemm)(const char* transa, const char* transb, const int* m, const int* n, const int* k, const double* alpha, const double *da, const int* lda, const double *db, const int* ldb, const double* dbeta, double *dc, const int* ldc); -void MTL_BLAS_NAME(cgemm)(const char* transa, const char* transb, +void MTL_BLAS_NAME(cgemm)(const char* transa, const char* transb, const int* m, const int* n, const int* k, const std::complex* alpha, const std::complex *da, const int* lda, const std::complex *db, const int* ldb, const std::complex* dbeta, std::complex *dc, const int* ldc); -void MTL_BLAS_NAME(zgemm)(const char* transa, const char* transb, +void MTL_BLAS_NAME(zgemm)(const char* transa, const char* transb, const int* m, const int* n, const int* k, const std::complex* alpha, const std::complex *da, const int* lda, const std::complex *db, const int* ldb, const std::complex* dbeta, diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/lapack.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/lapack.hpp index 502314f4..cdb0bfbf 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/lapack.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/lapack.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_LAPACK_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/umfpack_solve.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/umfpack_solve.hpp index 878d60ad..a9c90960 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/umfpack_solve.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/umfpack_solve.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_UMFPACK_SOLVE_INCLUDE @@ -59,10 +59,10 @@ namespace mtl { namespace matrix { template<> struct index_aux { typedef long type; }; #endif - template struct index + template struct index : index_aux::value> {}; - template + template struct matrix_copy {}; // If arbitrary compressed matrix -> copy @@ -89,9 +89,9 @@ namespace mtl { namespace matrix { } /// Class for repeated Umfpack solutions - /** Keeps symbolic and numeric preprocessing. Numeric part can be updated. + /** Keeps symbolic and numeric preprocessing. Numeric part can be updated. Only defined for compressed2D and compressed2D >. **/ - template + template class solver { public: /// Constructor referring to matrix \p A (not changed) and optionally Umfpack's strategy and alloc_init (look for the specializations) @@ -135,7 +135,7 @@ namespace mtl { namespace matrix { void assign_pointers() { if (copy_indices) { - if (Apc == 0) Apc= new index_type[n + 1]; + if (Apc == 0) Apc= new index_type[n + 1]; if (my_nnz != A.nnz() && Aic) { delete[] Aic; Aic= 0; } if (Aic == 0) Aic= new index_type[A.nnz()]; std::copy(A.address_major(), A.address_major() + n + 1, Apc); @@ -154,7 +154,7 @@ namespace mtl { namespace matrix { check(umfpack_dl_symbolic(n, n, Ap, Ai, Ax, &Symbolic, Control, Info), "Error in dl_symbolic"); check(umfpack_dl_numeric(Ap, Ai, Ax, Symbolic, &Numeric, Control, Info), "Error in dl_numeric"); } - + void init_aux(false_) { check(umfpack_di_symbolic(n, n, Ap, Ai, Ax, &Symbolic, Control, Info), "Error in di_symbolic"); @@ -181,7 +181,7 @@ namespace mtl { namespace matrix { std::cout << " UMFPACK_MAX_FRONT_SIZE_ESTIMATE: " << Info[UMFPACK_MAX_FRONT_SIZE_ESTIMATE] << "\n"; std::cout << " UMFPACK_SYMBOLIC_TIME: " << Info[UMFPACK_SYMBOLIC_TIME] << "\n"; std::cout << " UMFPACK_SYMBOLIC_WALLTIME: " << Info[UMFPACK_SYMBOLIC_WALLTIME] << "\n"; - + if (Info[UMFPACK_STRATEGY_USED] == UMFPACK_STRATEGY_SYMMETRIC) std::cout << " UMFPACK_STRATEGY_USED: SYMMETRIC\n"; else { @@ -194,7 +194,7 @@ namespace mtl { namespace matrix { std::cout << " UMFPACK_STRATEGY_USED: UNKOWN STRATEGY " << Info[UMFPACK_STRATEGY_USED] << "\n"; } } - + std::cout << " UMFPACK_ORDERING_USED: " << Info[UMFPACK_ORDERING_USED] << "\n"; std::cout << " UMFPACK_QFIXED: " << Info[UMFPACK_QFIXED] << "\n"; std::cout << " UMFPACK_DIAG_PREFERRED: " << Info[UMFPACK_DIAG_PREFERRED] << "\n"; @@ -252,8 +252,8 @@ namespace mtl { namespace matrix { public: /// Constructor referring to matrix \p A (not changed) and optionally Umfpack's strategy and alloc_init - solver(const matrix_type& A, int strategy = UMFPACK_STRATEGY_AUTO, double alloc_init = 0.7) - : A(A), Apc(0), Aic(0), my_nnz(0), Symbolic(0), Numeric(0) + solver(const matrix_type& A, int strategy = UMFPACK_STRATEGY_AUTO, double alloc_init = 0.7) + : A(A), Apc(0), Aic(0), my_nnz(0), Symbolic(0), Numeric(0) { vampir_trace<5060> trace; // Use default setings. @@ -264,7 +264,7 @@ namespace mtl { namespace matrix { Control[UMFPACK_STRATEGY] = strategy; Control[UMFPACK_ALLOC_INIT] = alloc_init; - init(); + init(); } ~solver() @@ -277,7 +277,7 @@ namespace mtl { namespace matrix { umfpack_di_free_numeric(&Numeric); umfpack_di_free_symbolic(&Symbolic); } - if (Apc) delete[] Apc; + if (Apc) delete[] Apc; if (Aic) delete[] Aic; } @@ -286,7 +286,7 @@ namespace mtl { namespace matrix { umfpack_dl_free_numeric(&Numeric); check(umfpack_dl_numeric(Ap, Ai, Ax, Symbolic, &Numeric, Control, Info), "Error in dl_numeric"); } - + void update_numeric_aux(false_) { umfpack_di_free_numeric(&Numeric); @@ -372,12 +372,12 @@ namespace mtl { namespace matrix { typedef boost::mpl::bool_ blong; typedef boost::mpl::true_ true_; typedef boost::mpl::false_ false_; - + void assign_pointers() { if (copy_indices) { - if (Apc == 0) Apc= new index_type[n + 1]; + if (Apc == 0) Apc= new index_type[n + 1]; if (Aic == 0) Aic= new index_type[A.nnz()]; std::copy(A.address_major(), A.address_major() + n + 1, Apc); std::copy(A.address_minor(), A.address_minor() + A.nnz(), Aic); @@ -395,7 +395,7 @@ namespace mtl { namespace matrix { check(umfpack_zl_symbolic(n, n, Ap, Ai, &Ax[0], &Az[0], &Symbolic, Control, Info), "Error in zl_symbolic"); check(umfpack_zl_numeric(Ap, Ai, &Ax[0], &Az[0], Symbolic, &Numeric, Control, Info), "Error in zl_numeric"); } - + void init_aux(false_) { check(umfpack_zi_symbolic(n, n, Ap, Ai, &Ax[0], &Az[0], &Symbolic, Control, Info), "Error in zi_symbolic"); @@ -411,7 +411,7 @@ namespace mtl { namespace matrix { } public: /// Constructor referring to matrix \p A (not changed) and optionally Umfpack's strategy and alloc_init (look for the specializations) - explicit solver(const compressed2D& A, int strategy = UMFPACK_STRATEGY_AUTO, double alloc_init = 0.7) + explicit solver(const compressed2D& A, int strategy = UMFPACK_STRATEGY_AUTO, double alloc_init = 0.7) : A(A), Apc(0), Aic(0) { vampir_trace<5060> trace; @@ -437,7 +437,7 @@ namespace mtl { namespace matrix { umfpack_zi_free_numeric(&Numeric); umfpack_zi_free_symbolic(&Symbolic); } - if (Apc) delete[] Apc; + if (Apc) delete[] Apc; if (Aic) delete[] Aic; } @@ -446,7 +446,7 @@ namespace mtl { namespace matrix { umfpack_zl_free_numeric(&Numeric); check(umfpack_zl_numeric(Ap, Ai, &Ax[0], &Az[0], Symbolic, &Numeric, Control, Info), "Error in dl_numeric D"); } - + void update_numeric_aux(false_) { umfpack_zi_free_numeric(&Numeric); @@ -477,14 +477,14 @@ namespace mtl { namespace matrix { template void solve_aux(int sys, VectorX& Xx, VectorX& Xz, const VectorB& Bx, const VectorB& Bz, true_) { - check(umfpack_zl_solve(sys, Ap, Ai, &Ax[0], &Az[0], &Xx[0], &Xz[0], &Bx[0], &Bz[0], Numeric, Control, Info), + check(umfpack_zl_solve(sys, Ap, Ai, &Ax[0], &Az[0], &Xx[0], &Xz[0], &Bx[0], &Bz[0], Numeric, Control, Info), "Error in zi_solve"); } template void solve_aux(int sys, VectorX& Xx, VectorX& Xz, const VectorB& Bx, const VectorB& Bz, false_) { - check(umfpack_zi_solve(sys, Ap, Ai, &Ax[0], &Az[0], &Xx[0], &Xz[0], &Bx[0], &Bz[0], Numeric, Control, Info), + check(umfpack_zi_solve(sys, Ap, Ai, &Ax[0], &Az[0], &Xx[0], &Xz[0], &Bx[0], &Bz[0], Numeric, Control, Info), "Error in zi_solve"); } @@ -511,7 +511,7 @@ namespace mtl { namespace matrix { private: const matrix_type& A; - int n; + int n; const index_type *Ap, *Ai; index_type *Apc, *Aic; dense_vector Ax, Az; @@ -527,7 +527,7 @@ namespace mtl { namespace matrix { typedef matrix_copy, Value, typename Parameters::orientation> copy_type; typedef solver, Value, typename Parameters::orientation>::matrix_type > solver_type; public: - explicit solver(const compressed2D& A) + explicit solver(const compressed2D& A) : copy_type(A), solver_type(copy_type::matrix), A(A) {} diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.cpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.cpp index 838596b2..254063c1 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.cpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.cpp @@ -1,7 +1,7 @@ #include #ifdef MTL_HAS_VPT -namespace mtl { +namespace mtl { /// Namespace for Vampir Trace interface namespace vpt { @@ -114,7 +114,7 @@ template <> std::string vampir_trace<2015>::name("vector::one_norm"); template <> std::string vampir_trace<2016>::name("vector::diagonal"); template <> std::string vampir_trace<2017>::name("dyn_vec_expr"); template <> std::string vampir_trace<2018>::name("Orthogonalize_Vectors"); -template <> std::string vampir_trace<2019>::name("Orthogonalize_Factors"); +template <> std::string vampir_trace<2019>::name("Orthogonalize_Factors"); template <> std::string vampir_trace<2020>::name("Vector_product"); template <> std::string vampir_trace<2021>::name("Vector_random"); template <> std::string vampir_trace<2022>::name("Vec_Vec_rank_update"); @@ -250,7 +250,7 @@ template <> std::string vampir_trace<4015>::name("matrix_random"); template <> std::string vampir_trace<4016>::name("matrix_scale_inplace"); template <> std::string vampir_trace<4017>::name("matrix_rscale"); template <> std::string vampir_trace<4018>::name("matrix_gen_smat_dmat_mult"); -template <> std::string vampir_trace<4019>::name("matrix_gen_tiling_smat_dmat_mult"); +template <> std::string vampir_trace<4019>::name("matrix_gen_tiling_smat_dmat_mult"); template <> std::string vampir_trace<4020>::name("matrix_smat_smat_mult"); template <> std::string vampir_trace<4021>::name(""); template <> std::string vampir_trace<4022>::name(""); @@ -425,12 +425,12 @@ template <> std::string vampir_trace<8930>::name("NaSto::computeImplViscosity()" template <> std::string vampir_trace<8940>::name("NaSto::computePressureCorr()"); // Test blocks for performance debugging -template <> std::string vampir_trace<9901>::name("tb1"); +template <> std::string vampir_trace<9901>::name("tb1"); template <> std::string vampir_trace<9902>::name("tb2"); template <> std::string vampir_trace<9903>::name("tb3"); template <> std::string vampir_trace<9904>::name("tb4"); template <> std::string vampir_trace<9999>::name("main"); - + // Only for testing template <> std::string vampir_trace<9990>::name("helper_function"); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.hpp index a1838bcc..678eb8e9 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interface/vpt.hpp @@ -1,27 +1,27 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_VPT_VPT_INCLUDE #define MTL_VPT_VPT_INCLUDE #ifdef MTL_HAS_VPT - #include + #include #include -#endif +#endif -#include +#include #include -namespace mtl { +namespace mtl { /// Namespace for Vampir Trace interface namespace vpt { @@ -30,7 +30,7 @@ namespace vpt { #ifndef MTL_VPT_LEVEL # define MTL_VPT_LEVEL 2 -#endif +#endif /// Class for Vampir Trace template @@ -43,22 +43,22 @@ class vampir_trace vampir_trace() { entry(to_print()); } void entry(boost::mpl::false_) {} - void entry(boost::mpl::true_) - { - VT_USER_START(name.c_str()); - // std::cout << "vpt_entry(" << N << ")\n"; + void entry(boost::mpl::true_) + { + VT_USER_START(name.c_str()); + // std::cout << "vpt_entry(" << N << ")\n"; } - + /// Destructor defines the end point of a trace ~vampir_trace() { end(to_print()); } void end(boost::mpl::false_) {} - void end(boost::mpl::true_) + void end(boost::mpl::true_) { - VT_USER_END(name.c_str()); - // std::cout << "vpt_end(" << N << ")\n"; + VT_USER_END(name.c_str()); + // std::cout << "vpt_end(" << N << ")\n"; } - + /// Function to check whether this event is traced with the current setting bool is_traced() { return to_print::value; } @@ -71,7 +71,7 @@ class vampir_trace // Dummy when Vampir Trace is not supported template -class vampir_trace +class vampir_trace { public: vampir_trace() {} diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/interfaces.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/interfaces.hpp index b709dda9..85fd2775 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/interfaces.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/interfaces.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_INTERFACES_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/functor_symbol.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/functor_symbol.hpp index b66fe3a6..a601b196 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/functor_symbol.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/functor_symbol.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_IO_FUNCTOR_SYMBOL_INCLUDE @@ -17,71 +17,71 @@ namespace mtl { namespace io { -template +template std::string functor_symbol(const sfunctor::conj&) { return "conj"; } -template +template std::string functor_symbol(const sfunctor::imag&) { return "imag"; } -template +template std::string functor_symbol(const sfunctor::real&) { return "real"; } -template +template std::string functor_symbol(const sfunctor::identity&) { return "identity"; } -template +template std::string functor_symbol(const sfunctor::abs&) { return "abs"; } -template +template std::string functor_symbol(const sfunctor::sqrt&) { return "sqrt"; } -template +template std::string functor_symbol(const sfunctor::square&) { return "square"; } -template +template std::string functor_symbol(const sfunctor::negate&) { return "-"; } -template +template std::string functor_symbol(const sfunctor::minus&) { return "-"; } -template +template std::string functor_symbol(const sfunctor::plus&) { return "+"; } -template +template std::string functor_symbol(const sfunctor::times&) { return "*"; } -template +template std::string functor_symbol(const sfunctor::divide&) { return "/"; } -template +template std::string functor_symbol(const sfunctor::assign&) { return "="; } -template +template std::string functor_symbol(const sfunctor::plus_assign&) { return "+="; } -template +template std::string functor_symbol(const sfunctor::minus_assign&) { return "-="; } -template +template std::string functor_symbol(const sfunctor::times_assign&) { return "*="; } -template +template std::string functor_symbol(const sfunctor::divide_assign&) { return "/="; } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_file.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_file.hpp index cd0b2763..b5e97ac0 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_file.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_file.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_IO_MATRIX_FILE_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_market.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_market.hpp index 6aa60fed..a452b78b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_market.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/matrix_market.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_IO_MATRIX_MARKET_INCLUDE @@ -63,11 +63,11 @@ class matrix_market_istream explicit matrix_market_istream(const std::string& s) : new_stream(new std::ifstream(s.c_str())), my_stream(*new_stream) { check_stream(s); } explicit matrix_market_istream(std::istream& s= std::cin) : new_stream(0), my_stream(s) { check_stream(); } - ~matrix_market_istream() + ~matrix_market_istream() { if (new_stream) delete new_stream; } template - self& operator>>(Coll& c) + self& operator>>(Coll& c) { return read(c, typename mtl::traits::category::type()); } /// Close only my own file, i.e. if filename and not stream is passed in constructor @@ -85,14 +85,14 @@ class matrix_market_istream void set_symmetry(std::string& symmetry_text) { - to_lower(symmetry_text); + to_lower(symmetry_text); const char* symmetry_options[]= {"general", "symmetric", "skew-symmetric", "hermitian"}; my_symmetry= string_to_enum(symmetry_text, symmetry_options, symmetry()); } void set_sparsity(std::string& sparsity_text) { - to_lower(sparsity_text); + to_lower(sparsity_text); const char* sparsity_options[]= {"coordinate", "array"}; my_sparsity= string_to_enum(sparsity_text, sparsity_options, sparsity()); } @@ -110,14 +110,14 @@ class matrix_market_istream if (!my_stream) break; // in case while(my_stream) caught an empty line at the end insert_value(ins, r-1, c-1, filter, Value()); } - else // dense - for (std::size_t c= 0; c < ncols; c++) + else // dense + for (std::size_t c= 0; c < ncols; c++) for (std::size_t r= 0; r < nrows; r++) insert_value(ins, r, c, filter, Value()); } template - void insert_value(Inserter& ins, std::size_t r, std::size_t c, const Filter& filter, Value) + void insert_value(Inserter& ins, std::size_t r, std::size_t c, const Filter& filter, Value) { using mtl::conj; typedef typename Collection::value_type mvt; @@ -126,7 +126,7 @@ class matrix_market_istream // std::cout << "Going to insert at [" << r << "][" << c << "] value " << which_value(v, mvt()) << "\n"; if (filter(r, c)) ins[r][c] << which_value(v, mvt()); - if (r != c && filter(c, r)) + if (r != c && filter(c, r)) switch(my_symmetry) { case symmetric: ins[c][r] << which_value(v, mvt()); break; case skew: ins[c][r] << -which_value(v, mvt()); break; @@ -138,12 +138,12 @@ class matrix_market_istream void read_value(pattern_type) {} void read_value(double& v) { my_stream >> v;} void read_value(long& v) { my_stream >> v;} - void read_value(std::complex& v) - { + void read_value(std::complex& v) + { double r, i; my_stream >> r >> i; v= std::complex(r, i); } - // Which value to be inserted? Itself if exist and 0 for pattern; complex are + // Which value to be inserted? Itself if exist and 0 for pattern; complex are template MValue which_value(Value v, MValue) { return boost::numeric_cast(v); } template MValue which_value(pattern_type, MValue) { return boost::numeric_cast(0.0); } template MValue which_value(std::complex, MValue) { MTL_THROW(runtime_error("Cannot convert complex value in real\n")); return 1; } @@ -166,13 +166,13 @@ matrix_market_istream& matrix_market_istream::read(Matrix& A, tag::matrix) { std::string marker, type, sparsity_text, value_format, symmetry_text; my_stream >> marker >> type >> sparsity_text >> value_format >> symmetry_text; -#if 0 - std::cout << marker << ", " << type << ", " << sparsity_text << ", " +#if 0 + std::cout << marker << ", " << type << ", " << sparsity_text << ", " << value_format << ", " << symmetry_text << "\n"; #endif - MTL_THROW_IF(marker != std::string("%%MatrixMarket"), + MTL_THROW_IF(marker != std::string("%%MatrixMarket"), runtime_error("File not in Matrix Market format")); - MTL_THROW_IF(type != std::string("matrix"), + MTL_THROW_IF(type != std::string("matrix"), runtime_error("Try to read matrix from non-matrix file")); set_symmetry(symmetry_text); @@ -188,7 +188,7 @@ matrix_market_istream& matrix_market_istream::read(Matrix& A, tag::matrix) } while (first == '%'); my_stream >> nrows >> ncols; - // std::cout << nrows << "x" << ncols << ", " << nnz << " non-zeros\n"; + // std::cout << nrows << "x" << ncols << ", " << nnz << " non-zeros\n"; A.change_dim(nrows, ncols); set_to_zero(A); @@ -216,7 +216,7 @@ matrix_market_istream& matrix_market_istream::read(Matrix& A, tag::matrix) } -class matrix_market_ostream +class matrix_market_ostream { typedef matrix_market_ostream self; public: @@ -227,8 +227,8 @@ public: ~matrix_market_ostream() { if (new_stream) delete new_stream; } template - self& operator<<(const Coll& c) - { + self& operator<<(const Coll& c) + { return write(c, typename mtl::traits::category::type()); } @@ -248,10 +248,10 @@ private: template self& write_sparse_matrix(const Matrix& A) { my_stream << num_rows(A) << " " << num_cols(A) << " " << A.nnz() << "\n"; - - typename mtl::traits::row::type row(A); - typename mtl::traits::col::type col(A); - typename mtl::traits::const_value::type value(A); + + typename mtl::traits::row::type row(A); + typename mtl::traits::col::type col(A); + typename mtl::traits::const_value::type value(A); typedef typename mtl::traits::range_generator::type cursor_type; typedef typename mtl::traits::range_generator::type icursor_type; @@ -278,21 +278,21 @@ private: template typename boost::enable_if >::type - write_value(const Value& v) - { + write_value(const Value& v) + { my_stream.precision(std::numeric_limits::digits10 + 1); - my_stream.setf(std::ios::scientific); - my_stream << v; - my_stream.unsetf(std::ios::scientific); + my_stream.setf(std::ios::scientific); + my_stream << v; + my_stream.unsetf(std::ios::scientific); } template - void write_value(const std::complex& v) - { + void write_value(const std::complex& v) + { my_stream.precision(std::numeric_limits::digits10 + 1); - my_stream.setf(std::ios::scientific); - my_stream << real(v) << " " << imag(v); - my_stream.unsetf(std::ios::scientific); + my_stream.setf(std::ios::scientific); + my_stream << real(v) << " " << imag(v); + my_stream.unsetf(std::ios::scientific); } // Will be generalized via traits::is_symmetric and alike @@ -300,7 +300,7 @@ private: std::string symmetry(const Matrix&) const { return std::string("general\n"); } template - std::string sparsity(const Matrix&) const + std::string sparsity(const Matrix&) const { return std::string( mtl::traits::is_sparse::value ? "coordinate " : "array " ); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/path.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/path.hpp index d0bedc07..068ba2e2 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/path.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/path.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_IO_PATH_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_el_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_el_matrix.hpp index 9ec4f186..0365ca2c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_el_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_el_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt @@ -31,7 +31,7 @@ namespace mtl { namespace matrix { // Read a value from the stream. The stream is advanced. template -inline T read_value(StreamType& stream) +inline T read_value(StreamType& stream) { T value; stream >> value; @@ -43,7 +43,7 @@ inline T read_value(StreamType& stream) // It is assumed the nodes are numbered consecutively, i.e. there are no unused // node numbers. template < typename StreamType, typename ValueType> -void read_el_matrix(StreamType& file, element_structure& A) +void read_el_matrix(StreamType& file, element_structure& A) { // Type definitions typedef element element_type; @@ -82,22 +82,22 @@ void read_el_matrix(StreamType& file, element_structure& A) ++read_num; } read_num--; - mtl::vector::dense_vector nodes(read_num, 0); + mtl::vector::dense_vector nodes(read_num, 0); while( !node_line.eof() ) { int idx = 0; node_line >> idx; if (i nb_total_vars) - nb_total_vars = idx; + if(idx > nb_total_vars) + nb_total_vars = idx; i++; } indices index(nodes); // Read the values. const int nb_vars = int(size(nodes)); matrix vals(nb_vars, nb_vars); - for(int i = 0; i < nb_vars*nb_vars; ++i) - vals(i / nb_vars, i % nb_vars) = read_value(file); + for(int i = 0; i < nb_vars*nb_vars; ++i) + vals(i / nb_vars, i % nb_vars) = read_value(file); file.ignore(500,'\n'); file.ignore(500,'\n'); element_type elem(el_nbr, index, vals); @@ -115,8 +115,8 @@ void read_el_matrix(StreamType& file, element_structure& A) for( int i = 0; i < nb_elements; ++i ) { element_type& el = elements[i]; indices& idx = el.get_indices(); - for(int j = 0; j < el.nb_vars(); ++j) - node_element_map[ idx(j) ].push_back(el.get_id()); + for(int j = 0; j < el.nb_vars(); ++j) + node_element_map[ idx(j) ].push_back(el.get_id()); } // Construct neighborhood information. @@ -124,14 +124,14 @@ void read_el_matrix(StreamType& file, element_structure& A) element_type& el = elements[i]; indices& idx = el.get_indices(); std::set neighs; - for(int j = 0; j < el.nb_vars(); ++j) + for(int j = 0; j < el.nb_vars(); ++j) neighs.insert(node_element_map[ idx(j) ].begin(), node_element_map[ idx(j) ].end()); - - for(std::set::iterator it = neighs.begin(); it != neighs.end(); ++it) - if( *it != el.get_id() ) + + for(std::set::iterator it = neighs.begin(); it != neighs.end(); ++it) + if( *it != el.get_id() ) el.get_neighbors().push_back( elements+(*it) ); - + // Sort data. el.sort_indices(); @@ -142,18 +142,18 @@ void read_el_matrix(StreamType& file, element_structure& A) } template -inline void read_el_matrix(std::string& mat_file, element_structure& A) +inline void read_el_matrix(std::string& mat_file, element_structure& A) { read_el_matrix(mat_file.c_str(), A); } template -void read_el_matrix(const char* mat_file, element_structure& A) +void read_el_matrix(const char* mat_file, element_structure& A) { std::ifstream file; file.open( mat_file ); if( !file.is_open() ) { std::cout << "The file \"" << mat_file << "\" could not be opened." << std::endl; - throw "File could not be opened"; + throw "File could not be opened"; } read_el_matrix(file, A); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_filter.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_filter.hpp index 960bc052..9c1de6bc 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_filter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/read_filter.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_IO_READ_FILTER_INCLUDE @@ -25,7 +25,7 @@ class read_filter { public: explicit read_filter(const Inserter& inserter) : inserter(inserter) {} - + /// Default for vectors is to consider every entry bool operator()(std::size_t) const { return true; } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/test_ostream.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/test_ostream.hpp index ec2b57ec..3956b2fd 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/test_ostream.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/test_ostream.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_TEST_OSTREAM_INCLUDE @@ -18,14 +18,14 @@ namespace mtl { namespace io { /// ostream class whose objects only write if MTL_VERBOSE_TEST is defined -struct test_ostream +struct test_ostream { #ifdef MTL_VERBOSE_TEST /// Constructor for out or std::cout test_ostream(std::ostream& out = std::cout) : out(out) {} - + template test_ostream& operator<<(const T& v) { @@ -37,7 +37,7 @@ struct test_ostream { return pf(*this); } void flush() { out.flush(); } - + private: std::ostream& out; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast.hpp index 6b30c89c..45ac65fb 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_IO_WRITE_AST_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast_dispatch.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast_dispatch.hpp index ea3bc548..de317595 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast_dispatch.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/io/write_ast_dispatch.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_IO_WRITE_AST_DISPATCH_INCLUDE @@ -25,23 +25,23 @@ namespace mtl { namespace io { -template +template void write_ast_dispatch(const mtl::vector::dense_vector& v, std::string s, std::ofstream& f); template void write_ast_dispatch(const mtl::vector::vec_vec_aop_expr& expr, std::string s, std::ofstream& f); template void write_ast_dispatch(const mtl::vector::vec_vec_pmop_expr& expr, std::string s, std::ofstream& f); -template +template void write_ast_dispatch(const mtl::vector::map_view& expr, std::string s, std::ofstream& f); template void write_ast_dispatch(const mtl::vector::scaled_view& expr, std::string s, std::ofstream& f); -template +template void write_ast_dispatch(const mtl::mat_cvec_times_expr& expr, std::string s, std::ofstream& f); template void write_ast_dispatch(const mtl::operation::compute_summand& expr, std::string s, std::ofstream& f); -template +template void write_ast_dispatch(const mtl::operation::compute_summand >& expr, std::string s, std::ofstream& f); -template +template void write_ast_dispatch(const mtl::matrix::outer_product_matrix& expr, std::string s, std::ofstream& f); @@ -49,21 +49,21 @@ void write_ast_dispatch(const mtl::matrix::outer_product_matrix typename boost::enable_if_c::value || boost::is_integral::value>::type write_ast_dispatch(const Value& v, std::string s, std::ofstream& f) -{ +{ f << " " << s << "[shape=box,label=\"scalar\\n" << v << "\"]\n"; } -template +template void write_ast_dispatch(const mtl::vector::dense_vector& v, std::string s, std::ofstream& f) -{ +{ f << " " << s << "[shape=box,label=\"vector\\n" << &v << "\"]\n"; } template void write_ast_dispatch(const mtl::vector::vec_vec_aop_expr& expr, std::string s, std::ofstream& f) { - f << " " << s << "[label=\"" << functor_symbol(SFunctor()) << "\"]\n"; + f << " " << s << "[label=\"" << functor_symbol(SFunctor()) << "\"]\n"; std::string target= s + "t", source= s + "s"; write_ast_dispatch(expr.first_argument(), target, f); write_ast_dispatch(expr.second_argument(), source, f); @@ -74,7 +74,7 @@ void write_ast_dispatch(const mtl::vector::vec_vec_aop_expr& e template void write_ast_dispatch(const mtl::vector::vec_vec_pmop_expr& expr, std::string s, std::ofstream& f) { - f << " " << s << "[label=\"" << functor_symbol(SFunctor()) << "\"]\n"; + f << " " << s << "[label=\"" << functor_symbol(SFunctor()) << "\"]\n"; std::string first= s + "f", second= s + "s"; write_ast_dispatch(expr.first_argument(), first, f); write_ast_dispatch(expr.second_argument(), second, f); @@ -85,9 +85,9 @@ void write_ast_dispatch(const mtl::vector::vec_vec_pmop_expr& template void write_ast_dispatch(const mtl::vector::scaled_view& expr, std::string s, std::ofstream& f) { - f << " " << s << "[label=\"scaled_view\"]\n"; + f << " " << s << "[label=\"scaled_view\"]\n"; std::string functor= s + "f", ref= s + "r"; - + write_ast_dispatch(expr.functor.value, functor, f); write_ast_dispatch(expr.ref, ref, f); @@ -98,21 +98,21 @@ void write_ast_dispatch(const mtl::vector::scaled_view& expr, s template void write_ast_dispatch(const mtl::tfunctor::scale& expr, std::string s, std::ofstream& f) { - f << " " << s << "[label=\"scale\"]\n"; + f << " " << s << "[label=\"scale\"]\n"; std::string factor= s + "f", ref= s + "r"; write_ast_dispatch(expr.value(), factor, f); - f << " " << ref << "[label=\".\"]\n"; + f << " " << ref << "[label=\".\"]\n"; f << " " << s << "->" << factor << '\n'; f << " " << s << "->" << ref << '\n'; } -template +template void write_ast_dispatch(const mtl::vector::map_view& expr, std::string s, std::ofstream& f) { - f << " " << s << "[label=\"map\"]\n"; + f << " " << s << "[label=\"map\"]\n"; std::string functor= s + "f", ref= s + "r"; - + write_ast_dispatch(expr.functor, functor, f); write_ast_dispatch(expr.ref, ref, f); @@ -120,7 +120,7 @@ void write_ast_dispatch(const mtl::vector::map_view& expr, std: f << " " << s << "->" << ref << '\n'; } -// template +// template // void write_ast_dispatch(const mtl::mat_cvec_times_expr& expr, std::string s, std::ofstream& f) // { // } @@ -131,25 +131,25 @@ void write_ast_dispatch(const mtl::operation::compute_summand& expr, std:: write_ast_dispatch(expr.value, s, f); } -template +template void write_ast_dispatch(const mtl::operation::compute_summand >& expr, std::string s, std::ofstream& f) { # ifdef NDEBUG write_ast_dispatch(expr.value, s, f); # else - f << " " << s << "[label=\"*\"]\n"; + f << " " << s << "[label=\"*\"]\n"; std::string first= s + "f", second= s + "s"; write_ast_dispatch(expr.first, first, f); write_ast_dispatch(expr.second, second, f); f << " " << s << "->" << first << '\n'; f << " " << s << "->" << second << '\n'; -# endif +# endif } -template +template void write_ast_dispatch(const mtl::matrix::outer_product_matrix& expr, std::string s, std::ofstream& f) { - f << " " << s << "[label=\"outer product\"]\n"; + f << " " << s << "[label=\"outer product\"]\n"; std::string first= s + "f", second= s + "s"; write_ast_dispatch(expr.v1(), first, f); write_ast_dispatch(expr.v2(), second, f); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrices.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrices.hpp index d2d2bc1f..7d72f965 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrices.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrices.hpp @@ -1,32 +1,32 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRICES_INCLUDE #define MTL_MATRICES_INCLUDE #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include #include @@ -36,10 +36,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/all_mat_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/all_mat_expr.hpp index 6677d89b..27302129 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/all_mat_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/all_mat_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ALL_MAT_EXPR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/banded_view.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/banded_view.hpp index a548be24..26c9d6af 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/banded_view.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/banded_view.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_BANDED_VIEW_INCLUDE @@ -35,18 +35,18 @@ namespace mtl { namespace matrix { // Forward -namespace detail { - template struct banded_value; - template struct mapped_value; +namespace detail { + template struct banded_value; + template struct mapped_value; } -template -struct banded_view - : public const_crtp_base_matrix< banded_view, +template +struct banded_view + : public const_crtp_base_matrix< banded_view, typename Matrix::value_type, typename Matrix::size_type >, public mat_expr< banded_view >, - public base_matrix::type> { typedef banded_view self; @@ -54,7 +54,7 @@ struct banded_view typedef typename mtl::traits::parameters::type parameters; typedef base_matrix base; - + typedef Matrix other; typedef typename Matrix::orientation orientation; typedef typename Matrix::index_type index_type; @@ -69,17 +69,17 @@ struct banded_view typedef long int bsize_type; - banded_view(const other& ref, bsize_type begin, bsize_type end) - : base(dim_type(mtl::matrix::num_rows(ref), mtl::matrix::num_cols(ref)), ref.nnz()), - ref(ref), begin(begin), end(end) + banded_view(const other& ref, bsize_type begin, bsize_type end) + : base(dim_type(mtl::matrix::num_rows(ref), mtl::matrix::num_cols(ref)), ref.nnz()), + ref(ref), begin(begin), end(end) {} - banded_view(const boost::shared_ptr& p, bsize_type begin, bsize_type end) - : base(dim_type(mtl::matrix::num_rows(*p), mtl::matrix::num_cols(*p)), p->nnz()), - my_copy(p), ref(*p), begin(begin), end(end) + banded_view(const boost::shared_ptr& p, bsize_type begin, bsize_type end) + : base(dim_type(mtl::matrix::num_rows(*p), mtl::matrix::num_cols(*p)), p->nnz()), + my_copy(p), ref(*p), begin(begin), end(end) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE banded_view (self&& that) : my_copy(std::move(that.my_copy)), ref(that.ref), begin(that.begin), end(that.end) {} banded_view (const self& that) : ref(that.ref), begin(that.begin), end(that.end) { assert(that.my_copy.use_count() == 0); } #endif @@ -90,7 +90,7 @@ struct banded_view bsize_type bc= static_cast(c), br= static_cast(r), band= bc - br; // Need value to return correct zero as well (i.e. matrices itself) - value_type v= ref(r, c); + value_type v= ref(r, c); return begin <= band && band < end ? v : zero(v); } @@ -102,9 +102,9 @@ struct banded_view template friend struct detail::map_value; //template friend struct ::mtl::sub_matrix_t; - friend size_type inline num_rows(const self& A) + friend size_type inline num_rows(const self& A) { using mtl::matrix::num_rows; return num_rows(A.ref); } - friend size_type inline num_cols(const self& A) + friend size_type inline num_cols(const self& A) { using mtl::matrix::num_cols; return num_cols(A.ref); } protected: @@ -114,10 +114,10 @@ struct banded_view bsize_type begin, end; }; -template +template inline std::size_t size(const banded_view& A) { - return num_rows(A) * num_rows(A); + return num_rows(A) * num_rows(A); } // ========== @@ -135,7 +135,7 @@ struct sub_matrix_t< mtl::matrix::banded_view > typedef mtl::matrix::banded_view sub_matrix_type; typedef typename view_type::size_type size_type; - sub_matrix_type operator()(view_type const& view, size_type begin_r, size_type end_r, + sub_matrix_type operator()(view_type const& view, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { typedef boost::shared_ptr pointer_type; @@ -143,7 +143,7 @@ struct sub_matrix_t< mtl::matrix::banded_view > // Submatrix of referred matrix (or view) // Create a submatrix, whos address will be kept by banded_view pointer_type p(new ref_sub_type(sub_matrix(view.ref, begin_r, end_r, begin_c, end_c))); - return sub_matrix_type(p, view.begin, view.end); + return sub_matrix_type(p, view.begin, view.end); } }; @@ -157,14 +157,14 @@ namespace mtl { namespace traits { using mtl::matrix::banded_view; - template + template struct row > { // from map_view typedef detail::mapped_row, Matrix> type; }; - template + template struct col > { // from map_view @@ -173,15 +173,15 @@ namespace mtl { namespace traits { namespace detail { - template + template struct banded_value { typedef typename Matrix::key_type key_type; typedef typename Matrix::value_type value_type; typedef banded_view view_type; - - banded_value(view_type const& view) - : view(view), its_row(view.ref), its_col(view.ref), its_value(view.ref) + + banded_value(view_type const& view) + : view(view), its_row(view.ref), its_col(view.ref), its_value(view.ref) {} value_type operator() (key_type const& key) const @@ -189,7 +189,7 @@ namespace mtl { namespace traits { using math::zero; typedef typename view_type::bsize_type bsize_type; - bsize_type br= static_cast(its_row(key)), + bsize_type br= static_cast(its_row(key)), bc= static_cast(its_col(key)), band= bc - br; // Need value to return correct zero as well (i.e. matrices itself) @@ -207,7 +207,7 @@ namespace mtl { namespace traits { } // detail - template + template struct const_value > { typedef detail::banded_value type; @@ -218,16 +218,16 @@ namespace mtl { namespace traits { // ================ // Use range_generator of original matrix - template + template struct range_generator > : public detail::referred_range_generator, range_generator > {}; -#if 0 // It is more complicated than this because referred_range_generator returns Matrix's cursor and we +#if 0 // It is more complicated than this because referred_range_generator returns Matrix's cursor and we // cannot dispatch on this anymore - template - struct range_generator, range_generator >::type> + template + struct range_generator, range_generator >::type> detail::sub_matrix_cursor, glas::tag::row, 2> > { @@ -238,15 +238,15 @@ namespace mtl { namespace traits { type begin(const collection_type& c) { - return + return - // + // typedef typename range_generator, glas::tag::row, 2>::type type; #endif // To disambiguate - template + template struct range_generator > : public detail::referred_range_generator, range_generator > {}; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/bands.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/bands.hpp index 420b2f20..bc24d820 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/bands.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/bands.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_BANDS_INCLUDE @@ -31,7 +31,7 @@ namespace traits { Accordingly, the off-diagonal above the main is 1. The parameters \p begin and \p end specify a right-open interval. For, instance bands(A, -1, 2) yields a tridiagonal matrix. **/ -template +template typename traits::bands::type inline bands(const Matrix& A, long begin, long end) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_matrix.hpp index f3ad7db0..897581e3 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_BASE_MATRIX_INCLUDE @@ -23,10 +23,10 @@ #include namespace mtl { namespace matrix { - + /// Base class for other matrices, contains only very simple functionality that is used in all matrices. template -struct base_matrix +struct base_matrix { typedef base_matrix self; typedef Elt value_type; @@ -39,7 +39,7 @@ struct base_matrix dim_type dim; ///< # of rows and columns size_type my_nnz; ///< # of non-zeros, to be set by derived matrix typedef mtl::traits::is_static static_bool; - + public: base_matrix(size_type n= 0) : my_nnz(n) {} @@ -69,44 +69,44 @@ struct base_matrix /** Will fail for fixed::dimension **/ void change_dim(mtl::non_fixed::dimensions d) { dim= d; } - template + template void change_dim(mtl::fixed::dimensions d) {} #endif - void change_dim(size_type r, size_type c, boost::mpl::false_) { dim= dim_type(r, c); } - void change_dim(size_type r, size_type c, boost::mpl::true_) { check_dim(r, c); } + void change_dim(size_type r, size_type c, boost::mpl::false_) { dim= dim_type(r, c); } + void change_dim(size_type r, size_type c, boost::mpl::true_) { check_dim(r, c); } - void change_dim(size_type r, size_type c) { change_dim(r, c, static_bool()); } + void change_dim(size_type r, size_type c) { change_dim(r, c, static_bool()); } public: /// Number of rows - size_type num_rows() const + size_type num_rows() const { return dim.num_rows(); } /// First row taking indexing into account - size_type begin_row() const + size_type begin_row() const { return index::change_to(index_type(), 0); } /// Past-end row taking indexing into account - size_type end_row() const + size_type end_row() const { return index::change_to(index_type(), num_rows()); } /// number of colums - size_type num_cols() const + size_type num_cols() const { return dim.num_cols(); } /// First column taking indexing into account - size_type begin_col() const + size_type begin_col() const { return index::change_to(index_type(), 0); } /// Past-end column taking indexing into account - size_type end_col() const + size_type end_col() const { return index::change_to(index_type(), num_cols()); } @@ -119,45 +119,45 @@ public: protected: // dispatched functions for major dimension - size_type dim1(row_major) const + size_type dim1(row_major) const { return num_rows(); } - size_type dim1(col_major) const + size_type dim1(col_major) const { return num_cols(); } // dispatched functions for minor dimension - size_type dim2(row_major) const + size_type dim2(row_major) const { return num_cols(); } - size_type dim2(col_major) const + size_type dim2(col_major) const { return num_rows(); } - + // Dispatched functions for major // Trailing _ due to conflicts with macro major size_type major_(size_type r, size_type, row_major) const { - return r; + return r; } size_type major_(size_type, size_type c, col_major) const { - return c; - } + return c; + } public: /// Major dimension - size_type dim1() const + size_type dim1() const { return dim1(orientation()); } /// Minor dimension - size_type dim2() const + size_type dim2() const { return dim2(orientation()); } @@ -175,12 +175,12 @@ public: { return major_(c, r, orientation()); } - + // returns copy of dim - dim_type get_dimensions() const + dim_type get_dimensions() const { - return dim; - } + return dim; + } }; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_sub_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_sub_matrix.hpp index 8abfa125..b96a7369 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_sub_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/base_sub_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_BASE_SUB_MATRIX_INCLUDE @@ -25,7 +25,7 @@ namespace mtl { namespace matrix { // Contains only very simple functionality that is used in all sub-matrices // But also used in some complete matrices template -struct base_sub_matrix +struct base_sub_matrix { typedef Elt value_type; typedef typename Parameters::orientation orientation; @@ -51,15 +51,15 @@ struct base_sub_matrix public: // base_sub_matrix() : my_nnz(0), my_begin_row(0), my_end_row(0), my_begin_col(0), my_end_col(0) {} - - base_sub_matrix() + + base_sub_matrix() { // With no static dimension information, it is by default 0 constructor_helper(dim_type()); } - explicit base_sub_matrix(const dim_type& d) - //explicit base_sub_matrix(mtl::non_fixed::dimensions d) + explicit base_sub_matrix(const dim_type& d) + //explicit base_sub_matrix(mtl::non_fixed::dimensions d) { constructor_helper(d); } @@ -82,13 +82,13 @@ struct base_sub_matrix } protected: - void change_dim(non_fixed::dimensions d) { constructor_helper(d); } + void change_dim(non_fixed::dimensions d) { constructor_helper(d); } template - void change_dim(fixed::dimensions d) { check_dim(d.num_rows(), d.num_cols()); } + void change_dim(fixed::dimensions d) { check_dim(d.num_rows(), d.num_cols()); } + - - void change_dim(size_type r, size_type c) { change_dim(dim_type(r, c)); } + void change_dim(size_type r, size_type c) { change_dim(dim_type(r, c)); } void set_ranges(size_type br, size_type er, size_type bc, size_type ec) { @@ -98,13 +98,13 @@ protected: } public: - void check_ranges(size_type MTL_DEBUG_ARG(begin_r), size_type MTL_DEBUG_ARG(end_r), + void check_ranges(size_type MTL_DEBUG_ARG(begin_r), size_type MTL_DEBUG_ARG(end_r), size_type MTL_DEBUG_ARG(begin_c), size_type MTL_DEBUG_ARG(end_c) ) const { MTL_DEBUG_THROW_IF(begin_r < begin_row(), range_error("begin_row out of range")); // if (end_r > end_row()) std::cout << "end_row out of range\n"; MTL_DEBUG_THROW_IF(end_r > end_row(), range_error("end_row out of range")); - + MTL_DEBUG_THROW_IF(begin_c < begin_col(), range_error("begin_col out of range")); MTL_DEBUG_THROW_IF(end_c > end_col(), range_error("end_col out of range")); } @@ -113,39 +113,39 @@ public: { set_ranges(br, er, bc, ec); } - + // Number of rows - size_type num_rows() const + size_type num_rows() const { return my_end_row - my_begin_row; } // First row taking indexing into account (already stored as such) - size_type begin_row() const + size_type begin_row() const { return my_begin_row; } - + // Past-end row taking indexing into account (already stored as such) - size_type end_row() const + size_type end_row() const { return my_end_row; } // Number of columns - size_type num_cols() const + size_type num_cols() const { return my_end_col - my_begin_col; } // First column taking indexing into account (already stored as such) - size_type begin_col() const + size_type begin_col() const { return my_begin_col; } - + // Past-end column taking indexing into account (already stored as such) - size_type end_col() const + size_type end_col() const { return my_end_col; } @@ -158,48 +158,48 @@ public: protected: // dispatched functions for major dimension - size_type dim1(row_major) const + size_type dim1(row_major) const { return num_rows(); } - size_type dim1(col_major) const + size_type dim1(col_major) const { return num_cols(); } // dispatched functions for minor dimension - size_type dim2(row_major) const + size_type dim2(row_major) const { return num_cols(); } - size_type dim2(col_major) const + size_type dim2(col_major) const { return num_rows(); } - + // Dispatched functions for major // Trailing _ due to conflicts with macro major size_type major_(size_type r, size_type, row_major) const { - return r; + return r; } size_type major_(size_type, size_type c, col_major) const { - return c; - } + return c; + } public: // return major dimension - size_type dim1() const + size_type dim1() const { return dim1(orientation()); } // return minor dimension - size_type dim2() const + size_type dim2() const { return dim2(orientation()); } @@ -218,10 +218,10 @@ public: return major_(c, r, orientation()); } - dim_type get_dimensions() const + dim_type get_dimensions() const { - return dim_type(num_rows(), num_cols()); - } + return dim_type(num_rows(), num_cols()); + } }; @@ -231,7 +231,7 @@ public: #endif // MTL_BASE_SUB_MATRIX_INCLUDE -/* +/* Question: - Shall we keep the position in the original matrix? */ diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/block_diagonal2D.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/block_diagonal2D.hpp index 2a0b9482..da5eb0c4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/block_diagonal2D.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/block_diagonal2D.hpp @@ -24,16 +24,16 @@ namespace mtl { namespace matrix { - + /// Block diagonal matrix structure /** Blocks can be any existing matrix_type in mtl4. **/ template -class block_diagonal2D +class block_diagonal2D : public mat_expr< block_diagonal2D > { public: - + typedef unsigned int size_type; typedef Matrix block_type; typedef std::vector block_matrix_type; @@ -47,8 +47,8 @@ class block_diagonal2D min_ind(std::numeric_limits::max()), max_ind(std::numeric_limits::min()), compact_heap(0) { - start_block.reserve(init_size); - end_block.reserve(init_size); + start_block.reserve(init_size); + end_block.reserve(init_size); blocks.reserve(init_size); } @@ -64,7 +64,7 @@ class block_diagonal2D } /// Returns the global number of blocks size_type num_blocks() const { - return nb_blocks; + return nb_blocks; } /// Minimal index @@ -81,18 +81,18 @@ class block_diagonal2D } /// Insert a block from start x start to end x end - void insert(size_type start, size_type end, const block_type& A) + void insert(size_type start, size_type end, const block_type& A) { MTL_DEBUG_THROW_IF(start > end, logic_error()); MTL_DEBUG_THROW_IF(is_negative(start) || end > nrows || end > ncols, index_out_of_range()); assert(compact_heap == 0); // insertion after make_compact; might be relaxed later - + start_block.push_back(start); end_block.push_back(end); - blocks.push_back(A); + blocks.push_back(A); my_nnz+= A.nnz(); nb_blocks++; - + if (start < min_ind) min_ind= start; if (end > max_ind) @@ -105,7 +105,7 @@ class block_diagonal2D << blocks.back(); } #endif - } + } /// Element A[i][j] by summing over all blocks, use only for debugging because it is very slow value_type operator()(size_type i, size_type j) const @@ -118,12 +118,12 @@ class block_diagonal2D } return s; } - - /// Memory of inserted + + /// Memory of inserted void make_compact(boost::mpl::true_) { assert(compact_heap == 0); // might be relaxed later - + size_type entries= 0; for (size_type i= 0; i < nb_blocks; i++) entries+= size(blocks[i]); @@ -142,15 +142,15 @@ class block_diagonal2D void make_compact(boost::mpl::false_) {} void make_compact() { make_compact(boost::is_same::type, tag::dense2D>()); } - + /// Number of non-zeros (accumulated over blocks) size_type nnz() const { return my_nnz; } template - void add_mult(const VectorIn& x, VectorOut& y) const + void add_mult(const VectorIn& x, VectorOut& y) const { mtl::vampir_trace<3062> tracer; - MTL_DEBUG_THROW_IF(ncols != size(x) || nrows != size(y), incompatible_size()); + MTL_DEBUG_THROW_IF(ncols != size(x) || nrows != size(y), incompatible_size()); // set_to_zero(y); for(size_type i= 0; i < nb_blocks; i++) { @@ -161,10 +161,10 @@ class block_diagonal2D ///block_diagonal-matrix times cvec template - void mult(const VectorIn& x, VectorOut& y) const + void mult(const VectorIn& x, VectorOut& y) const { mtl::vampir_trace<3062> tracer; - MTL_DEBUG_THROW_IF(ncols != size(x) || nrows != size(y), incompatible_size()); + MTL_DEBUG_THROW_IF(ncols != size(x) || nrows != size(y), incompatible_size()); set_to_zero(y); for(size_type i= 0; i < nb_blocks; i++) { @@ -182,12 +182,12 @@ class block_diagonal2D template void assign_to(VectorOut& y) const { P.mult(x, y); } - + const self& P; const VectorIn& x; }; - - + + template multiplier operator*(const VectorIn& x) // const { return multiplier(*this, x); } @@ -197,7 +197,7 @@ class block_diagonal2D size_type nrows, ncols, nb_blocks, my_nnz, min_ind, max_ind; index_vector_type start_block, end_block; block_matrix_type blocks; - value_type* compact_heap; + value_type* compact_heap; }; // ================ diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/compressed2D.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/compressed2D.hpp index 7cef5c7d..ee8e5689 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/compressed2D.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/compressed2D.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_COMPRESSED2D_INCLUDE @@ -38,9 +38,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -60,7 +60,7 @@ struct compressed_key { typedef std::size_t size_t; typedef compressed_key self; - + template explicit compressed_key(compressed2D const& matrix, size_t offset) : offset(offset) { @@ -85,7 +85,7 @@ struct compressed_key bool operator== (compressed_key const& other) const { - //if (offset == other.offset && major != other.major) + //if (offset == other.offset && major != other.major) // std::cout << offset << " " << other.offset << " " << major << " " << other.major << '\n'; // The following tests doesn't hold everywhere (anymore) // MTL_DEBUG_THROW_IF(offset == other.offset && major != other.major, logic_error("equal offsets imply equal major")); @@ -101,8 +101,8 @@ struct compressed_key // Cursor over every element template -struct compressed_el_cursor - : public compressed_key +struct compressed_el_cursor + : public compressed_key { typedef Elt value_type; typedef compressed_key base; @@ -112,10 +112,10 @@ struct compressed_el_cursor explicit compressed_el_cursor(compressed2D const& matrix, size_t r, size_t c) : base(matrix, r, c), matrix(matrix) {} - explicit compressed_el_cursor(compressed2D const& matrix, size_t offset) + explicit compressed_el_cursor(compressed2D const& matrix, size_t offset) : base(matrix, offset), matrix(matrix) {} - compressed_el_cursor(const compressed_el_cursor& other) + compressed_el_cursor(const compressed_el_cursor& other) : base(other), matrix(other.matrix) {} self& operator= (self const& other) { base::operator=(other); return *this; } @@ -124,7 +124,7 @@ struct compressed_el_cursor { ++offset; MTL_DEBUG_THROW_IF(matrix.starts[major+1] < offset, runtime_error("Inconsistent incrementation!")); - while (major < matrix.starts.size()-1 && matrix.starts[major+1] == offset) + while (major < matrix.starts.size()-1 && matrix.starts[major+1] == offset) ++major; return *this; } @@ -138,8 +138,8 @@ struct compressed_el_cursor // Cursor over every element template -struct compressed_minor_cursor - : public compressed_key +struct compressed_minor_cursor + : public compressed_key { typedef Elt value_type; typedef compressed_key base; @@ -150,7 +150,7 @@ struct compressed_minor_cursor : base(matrix, r, c), matrix(matrix) {} - explicit compressed_minor_cursor(mtl::matrix::compressed2D const& matrix, size_t offset) + explicit compressed_minor_cursor(mtl::matrix::compressed2D const& matrix, size_t offset) : base(matrix, offset), matrix(matrix) {} @@ -175,14 +175,14 @@ struct compressed_minor_cursor // Indexing for compressed matrices template -struct compressed2D_indexer +struct compressed2D_indexer { typedef SizeType size_type; typedef std::pair size_pair; private: // helpers for public functions template - utilities::maybe offset(const Matrix& ma, size_type major, size_type minor) const + utilities::maybe offset(const Matrix& ma, size_type major, size_type minor) const { typedef utilities::maybe result_type; assert(ma.starts[major] <= ma.starts[major+1]); // Check sortedness @@ -196,7 +196,7 @@ struct compressed2D_indexer const size_type *first = &ma.indices[0] + ma.starts[major], *last = &ma.indices[0] + ma.starts[major+1]; // if empty row (or column) return start of next one - if (first == last) + if (first == last) return result_type(first - &ma.indices[0], false); const size_type *index= first; @@ -232,7 +232,7 @@ struct compressed2D_indexer // Same as above if internal representation is already known template - utilities::maybe operator() (const Matrix& ma, size_pair major_minor) const + utilities::maybe operator() (const Matrix& ma, size_pair major_minor) const { return offset(ma, major_minor.first, major_minor.second); } @@ -260,7 +260,7 @@ struct compressed2D_indexer /// Compressed 2D matrix type // For now no external data template > -class compressed2D +class compressed2D : public base_matrix, public const_crtp_base_matrix< compressed2D, Elt, typename Parameters::size_type >, public crtp_matrix_assign< compressed2D, Elt, typename Parameters::size_type >, @@ -336,7 +336,7 @@ class compressed2D /// Setting dimension and allocate starting vector - explicit compressed2D (mtl::non_fixed::dimensions d, size_t nnz = 0) + explicit compressed2D (mtl::non_fixed::dimensions d, size_t nnz = 0) : super(d), inserting(false) { starts.resize(super::dim1() + 1, 0); @@ -344,7 +344,7 @@ class compressed2D } /// Setting dimension and allocate starting vector - explicit compressed2D (size_type num_rows, size_type num_cols, size_t nnz = 0) + explicit compressed2D (size_type num_rows, size_type num_cols, size_t nnz = 0) : super(non_fixed::dimensions(num_rows, num_cols)), inserting(false) { starts.resize(super::dim1() + 1, 0); @@ -356,7 +356,7 @@ class compressed2D This function is for advanced users only and should be used with care: errors can lead to inconsistent matrices and segmentation faults. **/ - compressed2D (size_type m, size_type n, size_type nnz, + compressed2D (size_type m, size_type n, size_type nnz, size_type* Major, size_type* Minor, value_type* Entries) : super(non_fixed::dimensions(m, n)), inserting(false) { @@ -370,7 +370,7 @@ class compressed2D #if 0 // Default is faster !!! /// Copy constructor (just in case that is not generated by all compilers (generic matrix copy slower)) - compressed2D(const self& src) + compressed2D(const self& src) : super(non_fixed::dimensions(src.num_rows(), src.num_cols())), data(src.data), starts(src.starts), indices(src.indices), inserting(false) {} @@ -386,7 +386,7 @@ class compressed2D #if defined(MTL_WITH_INITLIST) && defined(MTL_WITH_AUTO) && defined(MTL_WITH_RANGEDFOR) - /// Constructor for initializer list \p values + /// Constructor for initializer list \p values template compressed2D(std::initializer_list > values) : super(mtl::non_fixed::dimensions(values.size(), values.size()? values.begin()->size() : 0)), @@ -406,7 +406,7 @@ class compressed2D self& operator=(self&& src) { std::cout << "I am moving !!!\n"; - check(); + check(); this->checked_change_dim(src.num_rows(), src.num_cols()); swap(*this, src); return *this; @@ -414,9 +414,9 @@ class compressed2D self& operator=(const self& src) { - if (this == &src) + if (this == &src) return *this; - check(); + check(); this->checked_change_dim(src.num_rows(), src.num_cols()); set_nnz(src.nnz()); @@ -430,8 +430,8 @@ class compressed2D self& operator=(self src) { assert(this != &src); // Self-copy would be an indication of an error - - check(); + + check(); // TODO Check the following line this->checked_change_dim(src.num_rows(), src.num_cols()); swap(*this, src); @@ -444,13 +444,13 @@ class compressed2D #if 0 void self_copy(const self& src) { - if (this == &src) + if (this == &src) return; change_dim(num_rows(src), num_cols(src)); set_nnz(src.nnz()); #ifdef MTL_WITH_OPENMP - # pragma omp parallel for schedule(static, 16) + # pragma omp parallel for schedule(static, 16) #endif for (int i= 0; i < int(src.dim1()); i++) { const size_type cj0= src.starts[i], cj1= src.starts[i+1]; @@ -462,7 +462,7 @@ class compressed2D } starts[src.dim1()]= src.starts[src.dim1()]; } -#endif +#endif /// Copy the pattern of matrix \p src /** Advanced feature. Not generic, i.e. does not exist for all matrix types. @@ -488,11 +488,11 @@ class compressed2D using math::zero; inserter ins(A, 2 * this->nnz() / this->dim1()); - typename traits::row::type row(*this); - typename traits::col::type col(*this); - typename traits::const_value::type value(*this); + typename traits::row::type row(*this); + typename traits::col::type col(*this); + typename traits::const_value::type value(*this); typedef typename traits::range_generator::type cursor_type; - for (cursor_type cursor = mtl::begin(*this), cend = mtl::end(*this); + for (cursor_type cursor = mtl::begin(*this), cend = mtl::end(*this); cursor != cend; ++cursor) { typedef mtl::tag::nz inner_tag; typedef typename traits::range_generator::type icursor_type; @@ -510,14 +510,14 @@ class compressed2D // Copies range of values and their coordinates into compressed matrix // For brute force initialization, should be used with uttermost care // Won't be suitable for distributed matrices, take care of this to this later - template - void raw_copy(ValueIterator first_value, ValueIterator last_value, + template + void raw_copy(ValueIterator first_value, ValueIterator last_value, StartIterator first_start, IndexIterator first_index) { using std::copy; // check if starts has right size - allocate(last_value - first_value); // ???? + allocate(last_value - first_value); // ???? // check if nnz and indices has right size copy(first_value, last_value, data.begin()); @@ -531,7 +531,7 @@ class compressed2D using math::zero; check(); MTL_DEBUG_THROW_IF(is_negative(row) || row >= this->num_rows() || is_negative(col) || col >= this->num_cols(), index_out_of_range()); utilities::maybe pos = indexer(*this, row, col); - return pos ? data[pos.value()] : zero(value_type()); + return pos ? data[pos.value()] : zero(value_type()); } /// L-value reference of stored matrix entry @@ -561,7 +561,7 @@ class compressed2D { using std::swap; swap(static_cast(matrix1), static_cast(matrix2)); - + swap(matrix1.data, matrix2.data); swap(matrix1.starts, matrix2.starts); swap(matrix1.indices, matrix2.indices); @@ -571,28 +571,28 @@ class compressed2D /// Remove zero entries void crop() { - check(); + check(); if (data.empty()) return; using math::zero; value_type z= zero(data[0]); size_type nzi= 0; // Where to copy next non-zero - + std::vector new_starts(this->dim1() + 1); new_starts[0] = 0; for (size_type i = 0; i < this->dim1(); i++) { for (size_type j= starts[i], end= starts[i+1]; j != end; ++j) if (data[j] != z) - indices[nzi]= indices[j], data[nzi++]= data[j]; + indices[nzi]= indices[j], data[nzi++]= data[j]; new_starts[i+1]= nzi; } this->my_nnz= nzi; data.resize(nzi); indices.resize(nzi); swap(starts, new_starts); - } - + } + /// Address of first major index; to be used with care. [advanced] size_type* address_major() { check(); return &starts[0]; } @@ -613,7 +613,7 @@ class compressed2D std::vector& ref_minor() { return indices; } ///< Refer index vector [advanced] /// Release unused space in STL vectors - void shrink() + void shrink() { shrink_stl_vector(data); shrink_stl_vector(starts); @@ -621,8 +621,8 @@ class compressed2D } /// Number of non-zeros in row/column \p r_or_c when matrix is row-/column-major - size_type nnz_local(size_type r_or_c) const - { + size_type nnz_local(size_type r_or_c) const + { MTL_DEBUG_THROW_IF(r_or_c >= this->dim1(), index_out_of_range()); return starts[r_or_c+1] - starts[r_or_c]; } @@ -633,7 +633,7 @@ class compressed2D template friend struct compressed_minor_cursor; indexer_type indexer; - std::vector data; + std::vector data; protected: std::vector starts; std::vector indices; @@ -658,14 +658,14 @@ struct compressed2D_inserter typedef std::map map_type; typedef operations::update_proxy proxy_type; - private: + private: // stretch matrix rows or columns to slot size (or leave it if equal or greater) void stretch(); struct bracket_proxy { bracket_proxy(self& ref, size_type row) : ref(ref), row(row) {} - + proxy_type operator[](size_type col) { return proxy_type(ref, row, col); } self& ref; @@ -675,7 +675,7 @@ struct compressed2D_inserter protected: void finish() { - // std::cout << "~compressed2D_inserter: " << matrix.my_nnz << " entries in matrix already (reserved for " << elements.size() + // std::cout << "~compressed2D_inserter: " << matrix.my_nnz << " entries in matrix already (reserved for " << elements.size() // << ") and " << spare.size() << " entries in map.\n"; vampir_trace<3051> tracer; if (num_rows(matrix) > 0 && num_cols(matrix) > 0) { @@ -688,13 +688,13 @@ struct compressed2D_inserter public: /// Construction with matrix reference and optional slot size, see \ref matrix_insertion explicit compressed2D_inserter(matrix_type& matrix, size_type slot_size = 5) - : matrix(matrix), elements(matrix.data), starts(matrix.starts), indices(matrix.indices), - slot_size(std::min(slot_size, matrix.dim2())), slot_ends(matrix.dim1()+1) + : matrix(matrix), elements(matrix.data), starts(matrix.starts), indices(matrix.indices), + slot_size(std::min(slot_size, matrix.dim2())), slot_ends(matrix.dim1()+1) { vampir_trace<3050> tracer; MTL_THROW_IF(matrix.inserting, runtime_error("Two inserters on same matrix")); matrix.inserting = true; - if (size(matrix) > 0) + if (size(matrix) > 0) stretch(); } @@ -704,7 +704,7 @@ struct compressed2D_inserter if (matrix.inserting) finish(); } - + /// Proxy to insert into A[row][col] bracket_proxy operator[] (size_type row) { @@ -743,7 +743,7 @@ struct compressed2D_inserter std::cout << "[" << indices[j] << ": " << elements[j] << "]"; std::cout << "\n"; } - + /// Empties slot i (row or column according to orientation); for experts only [advanced] /** Does not work if entries are in spare map !!!! **/ void make_empty(size_type i) @@ -761,7 +761,7 @@ struct compressed2D_inserter /** It should be faster for sufficiently large element matrices but our benchmarks showed the opposite. **/ template self& sorted_block_insertion(const element_matrix_t& elements); - + /// Insert \p elements into %matrix template self& operator<< (const element_matrix_t& elements) @@ -800,7 +800,7 @@ struct compressed2D_inserter utilities::maybe matrix_offset(size_pair) const; void final_place(); void insert_spare(); - + // Show ith row/column void display(size_type i) { @@ -826,7 +826,7 @@ struct compressed2D_inserter indices[tgt]= indices[src]; elements[tgt]= elements[src++]; if (src >= end) ++tgt; // correction to not remain on the last entry - } + } } slot_ends[i]= tgt; } @@ -873,7 +873,7 @@ void compressed2D_inserter::stretch() new_starts[0] = 0; for (size_type i = 0; i < matrix.dim1(); i++) { size_type entries = starts[i+1] - starts[i]; - slot_ends[i] = new_starts[i] + entries; + slot_ends[i] = new_starts[i] + entries; new_starts[i+1] = new_starts[i] + std::max(entries, slot_size); } // Add an additional slot for temporaries @@ -881,7 +881,7 @@ void compressed2D_inserter::stretch() elements.resize(new_total); indices.resize(new_total); // for (int i= 0; i < matrix.dim1()+1; i++) std::cout << "Slot " << i << " is [" << new_starts[i] << ", " << slot_ends[i] << ")\n"; - + // copy normally if not overlapping and backward if overlapping // i goes down to 1 (not to 0) because i >= 0 never stops for unsigned ;-) // &v[i] is replaced by &v[0]+i to enable past-end addresses for STL copy @@ -895,11 +895,11 @@ void compressed2D_inserter::stretch() copy_backward(&elements[0] + starts[i-1], &elements[0] + starts[i], &elements[0] + slot_ends[i-1]); copy_backward(&indices[0] + starts[i-1], &indices[0] + starts[i], &indices[0] + slot_ends[i-1]); } - swap(starts, new_starts); + swap(starts, new_starts); } template -inline utilities::maybe::size_type> +inline utilities::maybe::size_type> compressed2D_inserter::matrix_offset(size_pair mm) const { size_type major, minor; @@ -911,7 +911,7 @@ compressed2D_inserter::matrix_offset(size_pair mm) con // &v[i] isn't liked by all libs -> &v[0]+i circumvents complaints const size_type *first = &indices[0] + starts[major], *last = &indices[0] + slot_ends[major]; - if (first == last) + if (first == last) return utilities::maybe (first - &indices[0], false); const size_type *index= first; @@ -919,7 +919,7 @@ compressed2D_inserter::matrix_offset(size_pair mm) con while (index != last && *index < minor) ++index; else index = std::lower_bound(first, last, minor); - return utilities::maybe(index - &indices[0], index != last && *index == minor); + return utilities::maybe(index - &indices[0], index != last && *index == minor); } @@ -930,7 +930,7 @@ inline void compressed2D_inserter::modify(size_type ro using std::copy_backward; MTL_DEBUG_THROW_IF(is_negative(row) || row >= num_rows(matrix) || is_negative(col) || col >= num_cols(matrix), index_out_of_range()); - Modifier modifier; + Modifier modifier; compressed2D_indexer indexer; size_pair mm = indexer.major_minor_c(matrix, row, col); size_type major, minor; @@ -938,18 +938,18 @@ inline void compressed2D_inserter::modify(size_type ro utilities::maybe pos = matrix_offset(mm); // Check if already in matrix and update it - if (pos) - modifier (elements[pos.value()], val); + if (pos) + modifier (elements[pos.value()], val); else { size_type& my_end = slot_ends[major]; // Check if place in matrix to insert there - if (my_end != starts[major+1]) { + if (my_end != starts[major+1]) { if (pos.value() != my_end) { copy_backward(&elements[0] + pos.value(), &elements[0] + my_end, &elements[0] + (my_end+1)); copy_backward(&indices[0] + pos.value(), &indices[0] + my_end, &indices[0] + (my_end+1)); } elements[pos.value()] = modifier.init(val); indices[pos.value()] = minor; - my_end++; + my_end++; matrix.my_nnz++; // new entry } else { typename map_type::iterator it = spare.find(mm); @@ -957,15 +957,15 @@ inline void compressed2D_inserter::modify(size_type ro if (it == spare.end()) { spare.insert(std::make_pair(mm, modifier.init(val))); matrix.my_nnz++; // new entry - } else + } else modifier(it->second, val); } } // std::cout << "inserter update: " << matrix.my_nnz << " non-zero elements, new value is " << elements[pos] << "\n"; -} +} namespace detail { - + struct cmp_first { template @@ -978,7 +978,7 @@ namespace detail { template template -compressed2D_inserter& +compressed2D_inserter& compressed2D_inserter::sorted_block_insertion(const element_matrix_t& iblock) { using std::copy; using std::copy_backward; using std::min; @@ -1002,7 +1002,7 @@ compressed2D_inserter::sorted_block_insertion(const el slot_ends[r]= starts[r] + to_copy; std::sort(it_type(&index_0, &value_0, 0), it_type(&index_0, &value_0, to_copy), less_0()); reduce_slot(r); - // display(r); + // display(r); matrix.my_nnz+= slot_ends[r] - starts[r]; for (size_type j= to_copy; j < n; ++j) update(r, iblock.cols[j], iblock.matrix[i][j]); @@ -1031,10 +1031,10 @@ compressed2D_inserter::sorted_block_insertion(const el update(r, indices[src], elements[src]); later= starts[rmax]; // we're done, avoid postponed loop } - // collect indices not found in r to deal with later + // collect indices not found in r to deal with later while (src < end && indices[src] < indices[tgt]) { if (later != src) { - indices[later]= indices[src]; + indices[later]= indices[src]; elements[later]= elements[src]; } ++src; ++later; @@ -1062,8 +1062,8 @@ void compressed2D_inserter::final_place() // Check if everything is already in place if (slot_ends[dim1-1] == matrix.my_nnz) { starts[dim1]= slot_ends[dim1-1]; - if (std::size_t(matrix.my_nnz) < elements.size()) - elements.resize(matrix.my_nnz), + if (std::size_t(matrix.my_nnz) < elements.size()) + elements.resize(matrix.my_nnz), indices.resize(matrix.my_nnz); return; } @@ -1077,8 +1077,8 @@ void compressed2D_inserter::final_place() } new_starts[dim1]= pos; swap(new_starts, starts); - if (std::size_t(matrix.my_nnz) < elements.size()) - elements.resize(matrix.my_nnz), + if (std::size_t(matrix.my_nnz) < elements.size()) + elements.resize(matrix.my_nnz), indices.resize(matrix.my_nnz); return; } @@ -1095,18 +1095,18 @@ void compressed2D_inserter::final_place() if (new_total > old_total) { elements.resize(new_total); indices.resize(new_total); } - + operations::shift_blocks(dim1, starts, new_starts, slot_ends, elements); operations::shift_blocks(dim1, starts, new_starts, slot_ends, indices); if (std::size_t(new_total) < elements.size()) { elements.resize(new_total); indices.resize(new_total); } - + for (size_type i = 0; i < dim1; i++) slot_ends[i] = new_starts[i] + slot_ends[i] - starts[i]; - swap(starts, new_starts); + swap(starts, new_starts); } template @@ -1176,11 +1176,11 @@ namespace mtl { namespace traits { // =========== // For cursors // =========== - + template struct range_generator > : detail::all_offsets_range_generator, - compressed_el_cursor, + compressed_el_cursor, complexity_classes::linear_cached> {}; @@ -1196,7 +1196,7 @@ namespace mtl { namespace traits { template - struct range_generator, glas::tag::row, 2> > { typedef typename Collection >::size_type size_type; @@ -1231,7 +1231,7 @@ namespace mtl { namespace traits { template - struct range_generator, glas::tag::col, 2> > { typedef typename Collection >::size_type size_type; @@ -1267,65 +1267,65 @@ namespace mtl { namespace traits { // ============= // For iterators // ============= - + template - struct range_generator, glas::tag::row, 2> > { typedef compressed2D matrix_type; typedef typename matrix_type::size_type size_type; typedef typename matrix_type::value_type value_type; typedef detail::sub_matrix_cursor cursor; - + typedef complexity_classes::linear_cached complexity; static int const level = 1; typedef const value_type* type; - + type begin(cursor const& c) { const matrix_type& matrix= c.ref; size_type offset= matrix.indexer(matrix, c.key, matrix.begin_col()); return &matrix.data[0] + offset; } - + // returned pointer can pass the end and must only be used for comparison type end(cursor const& c) { const matrix_type& matrix= c.ref; size_type offset= matrix.indexer(matrix, c.key, matrix.end_col()); return &matrix.data[0] + offset; - } + } }; template - struct range_generator, glas::tag::col, 2> > { typedef compressed2D matrix_type; typedef typename matrix_type::size_type size_type; typedef typename matrix_type::value_type value_type; typedef detail::sub_matrix_cursor cursor; - + typedef complexity_classes::linear_cached complexity; static int const level = 1; typedef const value_type* type; - + type begin(cursor const& c) { const matrix_type& matrix= c.ref; size_type offset= matrix.indexer(matrix, matrix.begin_row(), c.key); return &matrix.data[0] + offset; } - + // returned pointer can pass the end and must only be used for comparison type end(cursor const& c) { const matrix_type& matrix= c.ref; size_type offset= matrix.indexer(matrix, matrix.end_row(), c.key); return &matrix.data[0] + offset; - } + } }; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/coordinate2D.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/coordinate2D.hpp index d70051e6..581f9573 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/coordinate2D.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/coordinate2D.hpp @@ -17,18 +17,18 @@ #include namespace mtl { namespace matrix { - - + + /// Sparse matrix structure in coordinate format template > -class coordinate2D +class coordinate2D : public base_matrix, public const_crtp_base_matrix< coordinate2D, Value, typename Parameters::size_type >, public crtp_matrix_assign< coordinate2D, Value, typename Parameters::size_type >, public mat_expr< coordinate2D > { public: - + typedef Value value_type ; typedef Value& reference ; typedef Value const& const_reference ; @@ -51,8 +51,8 @@ class coordinate2D cols.reserve(expected); values.reserve(expected); } - } - + } + size_type nnz() const { return rows.size(); } ///< Number of non-zeros value_array_type const& value_array() const { return values; } ///< Array of values (const) @@ -60,34 +60,34 @@ class coordinate2D row_index_array_type const& row_index_array() const { return rows; } ///< Array of rows (const) column_index_array_type const& column_index_array() const { return cols; } ///< Array of columns (const) - + row_index_array_type& row_index_array() { return rows; } ///< Array of rows (mutable) column_index_array_type& column_index_array() { return cols; } ///< Array of columns (mutable) - /// Insert an entry at the end of the row-,col- and value-array - void push_back(size_type r, size_type c, const_reference v) + /// Insert an entry at the end of the row-,col- and value-array + void push_back(size_type r, size_type c, const_reference v) { rows.push_back(r); cols.push_back(c); values.push_back(v); my_is_sorted= false; - } - + } + /// Insert an entry at the end of the row-,col- and value-array, like push_back void insert(size_type r, size_type c, const_reference v) { push_back(r, c, v); } - + /// Whether the entries are sorted bool is_sorted() const { return my_is_sorted; } /// sorting standard by rows - void sort() - { - if (nnz() > 0) - sort(mtl::traits::is_row_major()); + void sort() + { + if (nnz() > 0) + sort(mtl::traits::is_row_major()); my_is_sorted= true; } private: // sorting by rows void sort(boost::mpl::true_) - { + { mtl::vector::sort_xy(rows, cols, values); } @@ -96,7 +96,7 @@ class coordinate2D { mtl::vector::sort_xy(cols, rows, values); } - + template void print_stl_vector(OStream& os, const Vector& v) const { @@ -121,17 +121,17 @@ class coordinate2D template Vector operator*(const Vector& x) { - + Vector res(this->num_rows()); res= 0; for (size_type i= 0; i < nnz(); i++) res[rows[i]]+= values[i] * x[cols[i]]; return res; } - + value_type operator() (const size_type r, const size_type c) const { - MTL_DEBUG_THROW_IF(is_negative(r) || r >= this->num_rows() + MTL_DEBUG_THROW_IF(is_negative(r) || r >= this->num_rows() || is_negative(c) || c >= this->num_cols(), index_out_of_range()); #if 0 @@ -139,7 +139,7 @@ class coordinate2D return find(r, c, mtl::traits::is_row_major()); #endif - for (size_type i= 0; i < nnz(); i++) + for (size_type i= 0; i < nnz(); i++) if (rows[i] == r && cols[i] == c) return values[i]; return value_type(0); @@ -152,7 +152,7 @@ class coordinate2D sort(); size_type i= 0, j= 1, end= rows.size(); - for (; j < end; ++j) + for (; j < end; ++j) if (rows[i] == rows[j] && cols[i] == cols[j]) { up(values[i], values[j]); } else { @@ -216,7 +216,7 @@ inline nnz(const coordinate2D& matrix) } -template > struct coordinate2D_inserter { @@ -225,12 +225,12 @@ struct coordinate2D_inserter typedef typename matrix_type::size_type size_type; typedef typename matrix_type::value_type value_type; typedef operations::update_proxy proxy_type; - + // We only support storing so far !!! // STATIC_ASSERT((boost::is_same >::value), "We only support storing so far"); - coordinate2D_inserter(matrix_type& matrix, size_type slot_size= 1) - : matrix(matrix) + coordinate2D_inserter(matrix_type& matrix, size_type slot_size= 1) + : matrix(matrix) { std::size_t ns= slot_size * matrix.dim1(); if (ns > matrix.nnz()) { @@ -241,7 +241,7 @@ struct coordinate2D_inserter } ~coordinate2D_inserter() { matrix.compress(Updater()); } - + private: struct update_proxy @@ -258,17 +258,17 @@ struct coordinate2D_inserter self& ref; size_type row, col; }; - + proxy_type operator() (size_type row, size_type col) { return proxy_type(*this, row, col); } - + struct bracket_proxy { bracket_proxy(self& ref, size_type row) : ref(ref), row(row) {} - + proxy_type operator[](size_type col) { return proxy_type(ref, row, col); @@ -329,22 +329,22 @@ struct coordinate_key bool operator== (coordinate_key const& other) const { return offset == other.offset; } bool operator!= (coordinate_key const& other) const { return offset != other.offset; } - - size_t offset; + + size_t offset; }; // Cursor over every element template -struct coordinate_minor_cursor - : public coordinate_key +struct coordinate_minor_cursor + : public coordinate_key { typedef coordinate_minor_cursor self; typedef typename Parameters::size_type size_type; typedef const coordinate2D& matrix_ref_type; static const int level= 2; - coordinate_minor_cursor(matrix_ref_type ref, size_type offset) + coordinate_minor_cursor(matrix_ref_type ref, size_type offset) : coordinate_key(offset), ref(ref) {} bool operator!=(const self& that) const @@ -361,7 +361,7 @@ struct coordinate_minor_cursor template -struct coordinate_major_cursor +struct coordinate_major_cursor { typedef coordinate_major_cursor self; typedef typename Parameters::size_type size_type; @@ -385,7 +385,7 @@ struct coordinate_major_cursor void find_next_offset() { find_next_offset(mtl::traits::is_row_major()); } - coordinate_major_cursor(matrix_ref_type ref, size_type major, size_type offset) + coordinate_major_cursor(matrix_ref_type ref, size_type major, size_type offset) : ref(ref), major(major), offset(offset) { find_next_offset(); @@ -397,12 +397,12 @@ struct coordinate_major_cursor return this->offset != that.offset; } - self& operator++() - { - offset= next_offset; + self& operator++() + { + offset= next_offset; major++; find_next_offset(); - return *this; + return *this; } matrix_ref_type ref; @@ -449,7 +449,7 @@ struct coordinate_col_range_generator namespace mtl { namespace traits { - + // Cursor over all rows // Supported if row major matrix template @@ -458,7 +458,7 @@ namespace mtl { namespace traits { boost::is_same , matrix::coordinate_row_range_generator , range_generator > - >::type {}; + >::type {}; template struct range_generator > @@ -466,7 +466,7 @@ namespace mtl { namespace traits { boost::is_same , matrix::coordinate_col_range_generator , range_generator > - >::type {}; + >::type {}; template struct range_generator > diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/crtp_base_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/crtp_base_matrix.hpp index b8436d73..18e21a81 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/crtp_base_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/crtp_base_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CRTP_BASE_MATRIX_INCLUDE @@ -49,7 +49,7 @@ namespace mtl { namespace matrix { template -struct crtp_assign +struct crtp_assign { Matrix& operator()(const Source& source, Matrix& matrix) { @@ -61,7 +61,7 @@ private: Matrix& assign(const Source& source, Matrix& matrix, ashape::scal) { vampir_trace<3055> tracer; - MTL_DEBUG_THROW_IF(num_rows(matrix) * num_cols(matrix) == 0, + MTL_DEBUG_THROW_IF(num_rows(matrix) * num_cols(matrix) == 0, range_error("Trying to initialize a 0 by 0 matrix with a value")); diagonal_setup(matrix, source); return matrix; @@ -71,7 +71,7 @@ private: Matrix& assign(const Source& source, Matrix& matrix, typename ashape::ashape::type) { vampir_trace<3056> tracer; - // Self-assignment between different types shouldn't happen. + // Self-assignment between different types shouldn't happen. matrix.checked_change_resource(source); matrix_copy(source, matrix); return matrix; @@ -84,7 +84,7 @@ private: /* Note that this is more special then assigning arbitrary expressions including matrices itself because mat_mat_plus_expr is a derived class from mat_expr < MatrixSrc >. **/ template -struct crtp_assign, Matrix> +struct crtp_assign, Matrix> { Matrix& operator()(const mat_mat_plus_expr& src, Matrix& matrix) { @@ -99,7 +99,7 @@ struct crtp_assign, Matrix> /* Note that this is more special then assigning arbitrary expressions including matrices itself because mat_mat_minus_expr is a derived class from mat_expr < MatrixSrc >. **/ template -struct crtp_assign, Matrix> +struct crtp_assign, Matrix> { Matrix& operator()(const mat_mat_minus_expr& src, Matrix& matrix) { @@ -112,7 +112,7 @@ struct crtp_assign, Matrix> /// Assign product by calling mult template -struct crtp_assign, Matrix> +struct crtp_assign, Matrix> { Matrix& operator()(const mat_mat_times_expr& src, Matrix& matrix) { @@ -122,12 +122,12 @@ struct crtp_assign, Matrix> mult(factors.first, factors.second, matrix); return matrix; } -}; +}; -/// Assign element-wise product +/// Assign element-wise product template -struct crtp_assign, Matrix> +struct crtp_assign, Matrix> { Matrix& operator()(const mat_mat_ele_times_expr& src, Matrix& matrix) { @@ -137,7 +137,7 @@ struct crtp_assign, Matrix> matrix= factors.first; return matrix.ele_rscale(factors.second); } -}; +}; @@ -152,7 +152,7 @@ struct crtp_assign matrix.checked_change_dim(Rows, Cols); inserter ins(matrix, matrix.dim2()); - + for (size_type r= 0; r < Rows; ++r) for (size_type c= 0; c < Cols; ++c) ins(r, c) << src[r][c]; @@ -161,7 +161,7 @@ struct crtp_assign }; #if defined(MTL_WITH_INITLIST) && defined(MTL_WITH_AUTO) && defined(MTL_WITH_RANGEDFOR) - /// Constructor for initializer list \p values + /// Constructor for initializer list \p values template struct crtp_assign >, Matrix> { @@ -174,7 +174,7 @@ struct crtp_assign size_t r= 0; for (auto l : values) { - size_t c= 0; + size_t c= 0; MTL_THROW_IF(l.size() != nc, logic_error("All sub-lists must have same size!")); for (auto v : l) ins(r, c++) << v; @@ -197,7 +197,7 @@ struct crtp_assign, Matrix> matrix.checked_change_resource(src); // del checked_change_dim(num_rows(src), num_cols(src)); inserter ins(matrix); - + for (size_type r= 0; r < num_rows(src); ++r) for (size_type c= 0; c < num_cols(src); ++c) ins(r, c) << src[r][c]; @@ -218,10 +218,10 @@ struct crtp_assign, Matrix> return matrix; } }; - + /// Assign-add matrix expressions by incrementally copying except for some special expressions template -struct crtp_plus_assign +struct crtp_plus_assign { Matrix& operator()(const Source& source, Matrix& matrix) { @@ -238,10 +238,10 @@ struct crtp_plus_assign /// Assign-add sum by adding both arguments /** Note that this is more special then assigning arbitrary expressions including matrices itself - because mat_mat_plus_expr is a derived class from + because mat_mat_plus_expr is a derived class from mat_expr < MatrixSrc >. **/ template -struct crtp_plus_assign, Matrix> +struct crtp_plus_assign, Matrix> { Matrix& operator()(const mat_mat_plus_expr& src, Matrix& matrix) { @@ -252,7 +252,7 @@ struct crtp_plus_assign, Matrix> }; template -struct crtp_plus_assign, Matrix> +struct crtp_plus_assign, Matrix> { Matrix& operator()(const mat_mat_minus_expr& src, Matrix& matrix) { @@ -263,7 +263,7 @@ struct crtp_plus_assign, Matrix> }; template -struct crtp_plus_assign, Matrix> +struct crtp_plus_assign, Matrix> { Matrix& operator()(const mat_mat_ele_times_expr& src, Matrix& matrix) { @@ -274,13 +274,13 @@ struct crtp_plus_assign, Matrix> }; template -struct crtp_plus_assign, Matrix> +struct crtp_plus_assign, Matrix> { Matrix& operator()(const mat_mat_times_expr& src, Matrix& matrix) { vampir_trace<3030> tracer; operation::compute_factors > factors(src); - gen_mult(factors.first, factors.second, matrix, assign::plus_sum(), + gen_mult(factors.first, factors.second, matrix, assign::plus_sum(), tag::flat(), tag::flat(), tag::flat()); return matrix; } @@ -289,7 +289,7 @@ struct crtp_plus_assign, Matrix> /// Assign-subtract matrix expressions by decrementally copying except for some special expressions template -struct crtp_minus_assign +struct crtp_minus_assign { Matrix& operator()(const Source& source, Matrix& matrix) { @@ -306,10 +306,10 @@ private: /// Assign-subtract sum by adding both arguments /** Note that this is more special then assigning arbitrary expressions including matrices itself - because mat_mat_plus_expr is a derived class from + because mat_mat_plus_expr is a derived class from mat_expr < MatrixSrc >. **/ template -struct crtp_minus_assign, Matrix> +struct crtp_minus_assign, Matrix> { Matrix& operator()(const mat_mat_plus_expr& src, Matrix& matrix) { @@ -321,10 +321,10 @@ struct crtp_minus_assign, Matrix> /// Assign-subtracting difference by subtracting first argument and adding the second one /** Note that this is more special then assigning arbitrary expressions including matrices itself - because mat_mat_minus_expr is a derived class from + because mat_mat_minus_expr is a derived class from mat_expr < MatrixSrc >. **/ template -struct crtp_minus_assign, Matrix> +struct crtp_minus_assign, Matrix> { Matrix& operator()(const mat_mat_minus_expr& src, Matrix& matrix) { @@ -335,7 +335,7 @@ struct crtp_minus_assign, Matrix> }; template -struct crtp_minus_assign, Matrix> +struct crtp_minus_assign, Matrix> { Matrix& operator()(const mat_mat_ele_times_expr& src, Matrix& matrix) { @@ -348,7 +348,7 @@ struct crtp_minus_assign, Matrix> /// Assign-subtract product by calling gen_mult /** Note that this does not work for arbitrary expressions. **/ template -struct crtp_minus_assign, Matrix> +struct crtp_minus_assign, Matrix> { Matrix& operator()(const mat_mat_times_expr& src, Matrix& matrix) { @@ -361,7 +361,7 @@ struct crtp_minus_assign, Matrix> -/// Base class to provide matrix assignment operators generically +/// Base class to provide matrix assignment operators generically template struct crtp_matrix_assign { @@ -393,7 +393,7 @@ private: return crtp_assign()(src, static_cast(*this)); } - + // For (compatible) dense matrices do a loop over all entries template Matrix& density_plus_assign(const Source& src, boost::mpl::true_) @@ -480,19 +480,19 @@ private: /// Check wether source and target have compatible resources, generalization of check_dim /** For expressions like A= B + C, A can be set to the size of B and C if still is 0 by 0. **/ template - void check_resource(const Src& src) const + void check_resource(const Src& src) const { check_resource(src, typename mtl::traits::category::type()); } // Default case just check_dim template - void check_resource(const Src& src, tag::universe) const + void check_resource(const Src& src, tag::universe) const { check_dim(num_rows(src), num_cols(src)); } /// Check wether source and target have compatible resources and wether target has already resources /** For expressions like A+= B + C, A must be already larger then 0 by 0 and compatible to B and C. **/ // Generalization with 2 arguments might be needed (check rows from first and columns from second) template - void check_ready_resource(const Src& src) const + void check_ready_resource(const Src& src) const { MTL_DEBUG_THROW_IF(num_rows(src) * num_cols(src) == 0, need_nonempty()); check_resource(src); @@ -501,7 +501,7 @@ private: /// Check wether source and target have compatible resources and adapt empty target /** For expressions like A= B + C, A can be set to the size of B and C if still is 0 by 0. **/ template - void checked_change_resource(const Src& src) + void checked_change_resource(const Src& src) { checked_change_resource(src, src); } /// Check whether source and target have compatible resources and adapt empty target @@ -511,12 +511,12 @@ private: { checked_change_resource_aux(src1, src2, typename mtl::traits::category::type()); } template - void checked_change_resource_aux(const Src1& src1, const Src2& src2, tag::universe) + void checked_change_resource_aux(const Src1& src1, const Src2& src2, tag::universe) { checked_change_dim(num_rows(src1), num_cols(src2)); } /// Check whether matrix sizes are compatible or if matrix is 0 by 0 change it to r by c. - /** Deprecated, superseded by checked_change_resource. **/ + /** Deprecated, superseded by checked_change_resource. **/ void checked_change_dim(SizeType r, SizeType c) { Matrix& matrix= static_cast(*this); @@ -528,21 +528,21 @@ private: // Despite there is only an untemplated assignment and despite the disable_if MSVC whines about ambiguity :-! // Scalar assignment is also taking out because it has another return type template - typename boost::disable_if_c::value + typename boost::disable_if_c::value || boost::is_same::type, ashape::scal>::value, Matrix&>::type operator=(const Source& src) { - return density_assign(src, boost::mpl::bool_< boost::is_same::type, - typename ashape::ashape::type>::value + return density_assign(src, boost::mpl::bool_< boost::is_same::type, + typename ashape::ashape::type>::value && mtl::traits::eval_dense< mat_mat_asgn_expr >::value >()); } // Helper type for assigning scalars to handle both A= a; and A= a, b, c; template - struct scalar_assign + struct scalar_assign { - scalar_assign(Source src, Matrix& matrix) + scalar_assign(Source src, Matrix& matrix) : src(src), with_comma(false), r(0), c(0), matrix(matrix), ins(matrix, 1) {} ~scalar_assign() @@ -567,11 +567,11 @@ private: with_comma= true; assert(r == 0 && c == 0); ins[r][c++] << src; // We haven't set v[0] yet - if (c == num_cols(matrix)) + if (c == num_cols(matrix)) c= 0, r++; } ins[r][c++] << val; - if (c == num_cols(matrix)) + if (c == num_cols(matrix)) c= 0, r++; return *this; } @@ -584,12 +584,12 @@ private: }; template - typename boost::enable_if::type, ashape::scal>, + typename boost::enable_if::type, ashape::scal>, scalar_assign >::type operator=(Source src) { Matrix& matrix= static_cast(*this); - MTL_DEBUG_THROW_IF(num_rows(matrix) * num_cols(matrix) == 0, + MTL_DEBUG_THROW_IF(num_rows(matrix) * num_cols(matrix) == 0, range_error("Trying to initialize a 0 by 0 matrix with a value")); set_to_zero(matrix); return scalar_assign(src, static_cast(*this)); @@ -600,13 +600,13 @@ private: { return density_plus_assign(src, mtl::traits::eval_dense< mat_mat_asgn_expr >()); } - + template Matrix& operator-=(const Source& src) { return density_minus_assign(src, mtl::traits::eval_dense< mat_mat_asgn_expr >()); } - + /// Scale matrix (in place) with scalar value or other matrix template Matrix& operator*=(const Factor& alpha) @@ -636,7 +636,7 @@ private: template struct const_crtp_matrix_bracket -{ +{ template typename boost::disable_if_c::value || boost::is_same::value, operations::bracket_proxy >::type @@ -661,8 +661,8 @@ struct const_crtp_matrix_bracket }; template -struct crtp_matrix_bracket -{ +struct crtp_matrix_bracket +{ operations::bracket_proxy operator[] (SizeType row) const { @@ -670,7 +670,7 @@ struct crtp_matrix_bracket } template - typename boost::disable_if_c::value || boost::is_same::value, + typename boost::disable_if_c::value || boost::is_same::value, operations::bracket_proxy >::type // operations::bracket_proxy operator[] (const T& row) @@ -702,13 +702,13 @@ struct crtp_matrix_bracket }; template -struct crtp_matrix_lvalue -{ +struct crtp_matrix_lvalue +{ // Function must be overwritten by Matrix if m(row, col) does not return a reference ValueType& lvalue(SizeType row, SizeType col) { return static_cast(*this)(row, col); - } + } }; template @@ -717,13 +717,13 @@ struct const_crtp_base_matrix {}; template -struct mutable_crtp_base_matrix +struct mutable_crtp_base_matrix : public crtp_matrix_bracket, public crtp_matrix_assign {}; template -struct crtp_base_matrix +struct crtp_base_matrix : boost::mpl::if_, const_crtp_base_matrix, mutable_crtp_base_matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dense2D.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dense2D.hpp index 3028ea05..2149dc03 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dense2D.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dense2D.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DENSE2D_INCLUDE @@ -63,34 +63,34 @@ class dense2D_indexer; struct dense2D_sub_ctor {}; // Indexing for dense matrices -class dense2D_indexer +class dense2D_indexer { // helpers for public functions - size_t offset(size_t ldim, size_t r, size_t c, row_major) const + size_t offset(size_t ldim, size_t r, size_t c, row_major) const { - return r * ldim + c; + return r * ldim + c; } - size_t offset(size_t ldim, size_t r, size_t c, col_major) const + size_t offset(size_t ldim, size_t r, size_t c, col_major) const { - return c * ldim + r; + return c * ldim + r; } - - size_t row(size_t offset, size_t ldim, row_major) const + + size_t row(size_t offset, size_t ldim, row_major) const { - return offset / ldim; + return offset / ldim; } - size_t row(size_t offset, size_t ldim, col_major) const + size_t row(size_t offset, size_t ldim, col_major) const { return offset % ldim; } - - size_t col(size_t offset, size_t ldim, row_major) const + + size_t col(size_t offset, size_t ldim, row_major) const { return offset % ldim; } - size_t col(size_t offset, size_t ldim, col_major) const + size_t col(size_t offset, size_t ldim, col_major) const { - return offset / ldim; + return offset / ldim; } public: @@ -106,7 +106,7 @@ class dense2D_indexer } template - size_t row(const dense2D& ma, + size_t row(const dense2D& ma, typename dense2D::key_type key) const { typedef dense2D matrix_type; @@ -116,8 +116,8 @@ class dense2D_indexer } template - size_t col(const dense2D& ma, - typename dense2D::key_type key) const + size_t col(const dense2D& ma, + typename dense2D::key_type key) const { typedef dense2D matrix_type; // column with c-index for my orientation @@ -128,9 +128,9 @@ class dense2D_indexer }; // dense2D_indexer -namespace detail +namespace detail { - + // Compute required memory // Enabling mechanism to make sure that computation is valid template @@ -146,7 +146,7 @@ namespace detail static std::size_t const value= dimensions::Num_Rows * dimensions::Num_Cols; }; - // return const-ref if matrix on stack and type itself if on heap + // return const-ref if matrix on stack and type itself if on heap template struct ref_on_stack { @@ -161,19 +161,19 @@ namespace detail } // namespace detail - + /// Dense matrix type template > -class dense2D - : public base_sub_matrix, - public mtl::detail::contiguous_memory_block< Value, Parameters::on_stack, +class dense2D + : public base_sub_matrix, + public mtl::detail::contiguous_memory_block< Value, Parameters::on_stack, detail::dense2D_array_size::value >, public crtp_base_matrix< dense2D, Value, std::size_t >, public mat_expr< dense2D > { typedef dense2D self; typedef base_sub_matrix super; - typedef mtl::detail::contiguous_memory_block::value> memory_base; typedef mat_expr< dense2D > expr_base; typedef crtp_base_matrix< self, Value, std::size_t > crtp_base; @@ -190,12 +190,12 @@ class dense2D typedef const value_type* const_pointer_type; typedef const_pointer_type key_type; typedef std::size_t size_type; - typedef dense_el_cursor el_cursor_type; + typedef dense_el_cursor el_cursor_type; typedef dense2D_indexer indexer_type; // Self-similar type unless dimension is fixed // Not supported for the moment - typedef self sub_matrix_type; + typedef self sub_matrix_type; protected: // Obviously, the next 3 functions must be called after setting dimensions @@ -215,38 +215,38 @@ class dense2D { init(); } /// Constructor that only sets dimensions, only for run-time dimensions - explicit dense2D(mtl::non_fixed::dimensions d) + explicit dense2D(mtl::non_fixed::dimensions d) : super(d), memory_base(d.num_rows() * d.num_cols()) { init(); } /// Most common constructor from number of rows and columns - explicit dense2D(size_type num_rows, size_type num_cols) - : super(dim_type(num_rows, num_cols)), + explicit dense2D(size_type num_rows, size_type num_cols) + : super(dim_type(num_rows, num_cols)), memory_base(num_rows * num_cols) { init(); } /// Constructor that sets dimensions and pointer to external data - explicit dense2D(mtl::non_fixed::dimensions d, value_type* a) + explicit dense2D(mtl::non_fixed::dimensions d, value_type* a) : super(d), memory_base(a, d.num_rows() * d.num_cols()) { init(); } /// Constructor that sets dimensions and pointer to external data - explicit dense2D(size_type num_rows, size_type num_cols, value_type* a) + explicit dense2D(size_type num_rows, size_type num_cols, value_type* a) : super(mtl::non_fixed::dimensions(num_rows, num_cols)), memory_base(a, num_rows * num_cols) { init(); } /// Constructor for compile time matrix size /** sets dimensions and pointer to external data **/ - explicit dense2D(value_type* a) + explicit dense2D(value_type* a) : super(), memory_base(a, dim_type().num_rows() * dim_type().num_cols()) - { + { MTL_STATIC_ASSERT((dim_type::is_static), "Size must be known at compile time."); init(); } /// Default copy constructor - dense2D(const self& m) - : super(dim_type(m.num_rows(), m.num_cols())), + dense2D(const self& m) + : super(dim_type(m.num_rows(), m.num_cols())), memory_base(m) { // In case of sub-matrices we need m's ldim -> init doesn't work @@ -254,26 +254,26 @@ class dense2D } /// Clone constructor, copies every source including sub-matrices and other matrices with references - explicit dense2D(const self& m, clone_ctor) - : super(mtl::non_fixed::dimensions(m.num_rows(), m.num_cols())), + explicit dense2D(const self& m, clone_ctor) + : super(mtl::non_fixed::dimensions(m.num_rows(), m.num_cols())), memory_base(m, clone_ctor()) { - init(); + init(); *this= m; } /// General copy constructor, uses functionality from CRTP base template - explicit dense2D(const MatrixSrc& src) + explicit dense2D(const MatrixSrc& src) : super(), memory_base(dim_type().num_rows() * dim_type().num_cols()) - { - init(); + { + init(); *this= src; } /// Constructor for creating sub-matrices template - dense2D(MatrixSrc& matrix, dense2D_sub_ctor, + dense2D(MatrixSrc& matrix, dense2D_sub_ctor, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) : super(mtl::non_fixed::dimensions(matrix.num_rows(), matrix.num_cols())), memory_base(matrix.data, (end_r - begin_r) * (end_c - begin_c), true) @@ -282,11 +282,11 @@ class dense2D } #if defined(MTL_WITH_INITLIST) && defined(MTL_WITH_AUTO) && defined(MTL_WITH_RANGEDFOR) - /// Constructor for initializer list \p values + /// Constructor for initializer list \p values template dense2D(std::initializer_list > values) : super(mtl::non_fixed::dimensions(values.size(), values.size()? values.begin()->size() : 0)), - memory_base(this->num_rows() * this->num_cols()) + memory_base(this->num_rows() * this->num_cols()) { init(); *this= values; @@ -295,11 +295,11 @@ class dense2D private: template - void sub_matrix_constructor(MatrixSrc& matrix, size_type begin_r, size_type end_r, + void sub_matrix_constructor(MatrixSrc& matrix, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c, boost::mpl::false_) { matrix.check_ranges(begin_r, end_r, begin_c, end_c); - + if(end_r <= begin_r || end_c <= begin_c) set_ranges(0, 0); else { @@ -311,7 +311,7 @@ class dense2D } template - void sub_matrix_constructor(MatrixSrc&, size_type, size_type, + void sub_matrix_constructor(MatrixSrc&, size_type, size_type, size_type, size_type, boost::mpl::true_) { MTL_THROW(logic_error("Matrices cannot be used as sub-matrices!")); @@ -333,8 +333,8 @@ class dense2D /// (Copy) Assignment self& operator=(const self& src) { return self_assign(src, boost::mpl::true_()); } - -#else + +#else /// (Copy) Assignment self& operator=(typename detail::ref_on_stack::type src) { @@ -343,7 +343,7 @@ class dense2D #endif private: - // Already copied for lvalues -> data can be stolen (need non-const ref) + // Already copied for lvalues -> data can be stolen (need non-const ref) self& self_assign(self& src, boost::mpl::false_) { // Self-copy would be an indication of an error @@ -412,7 +412,7 @@ class dense2D #endif sub_matrix(*this,0,std::min(r,temp.num_rows()),0,std::min(c,temp.num_cols())) = sub_matrix(temp,0,std::min(r,temp.num_rows()),0,std::min(c,temp.num_cols())); - } else + } else *this = temp[irange(0, r)][irange(0, c)]; } } @@ -426,7 +426,7 @@ class dense2D { return r >= this->begin_row() && r < this->end_row() && c >= this->begin_col() && c < this->end_col(); } /// Constant access to element - const_reference operator() (size_t r, size_t c) const + const_reference operator() (size_t r, size_t c) const { MTL_DEBUG_THROW_IF(is_negative(r) || r >= this->num_rows() || is_negative(c) || c >= this->num_cols(), index_out_of_range()); return this->data[indexer(*this, r, c)]; @@ -436,8 +436,8 @@ class dense2D value_type& operator() (size_t r, size_t c) { MTL_DEBUG_THROW_IF(is_negative(r) || r >= this->num_rows() || is_negative(c) || c >= this->num_cols(), index_out_of_range()); - return this->data[indexer(*this, r, c)]; - } + return this->data[indexer(*this, r, c)]; + } // offset regarding c-style indices size_t c_offset(size_t r, size_t c) const @@ -464,23 +464,23 @@ class dense2D /// Whether data is stored in strides bool has_strided_data() const { return this->category != this->own; } - + protected: - + // Set ranges from begin_r to end_r and begin_c to end_c void set_ranges(size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { super::set_ranges(begin_r, end_r, begin_c, end_c); set_nnz(); } - + // Set ranges to a num_row x num_col matrix, keeps indexing void set_ranges(size_type num_rows, size_type num_cols) { - set_ranges(this->begin_row(), this->begin_row() + num_rows, + set_ranges(this->begin_row(), this->begin_row() + num_rows, this->begin_col(), this->begin_col() + num_cols); } - + public: indexer_type indexer; @@ -495,9 +495,9 @@ class dense2D protected: #endif - // Leading dimension is minor dimension in original matrix + // Leading dimension is minor dimension in original matrix // Opposed to other dims doesn't change in sub-matrices - size_type ldim; + size_type ldim; }; // dense2D @@ -562,7 +562,7 @@ namespace mtl { namespace traits { dense_el_cursor, complexity_classes::linear_cached> {}; - namespace detail + namespace detail { // complexity of dense row cursor depends on storage scheme // if orientation is row_major then complexity is cached_linear, otherwise linear @@ -584,13 +584,13 @@ namespace mtl { namespace traits { template struct range_generator > - : detail::all_rows_range_generator, + : detail::all_rows_range_generator, typename detail::dense2D_rc::type> {}; - - // For a cursor pointing to some row give the range of elements in this row + + // For a cursor pointing to some row give the range of elements in this row template - struct range_generator, glas::tag::row, 2> > { typedef dense2D matrix; @@ -605,7 +605,7 @@ namespace mtl { namespace traits { boost::is_same , dense_el_cursor , strided_dense_el_cursor - >::type type; + >::type type; private: @@ -627,7 +627,7 @@ namespace mtl { namespace traits { type end(cursor const& c) const { return dispatch(c, c.ref.end_col(), typename matrix::orientation()); - } + } type lower_bound(cursor const& c, size_type position) const { return dispatch(c, std::min(c.ref.end_col(), position), typename matrix::orientation()); @@ -635,27 +635,27 @@ namespace mtl { namespace traits { }; template - struct range_generator, glas::tag::row, 2> > - : range_generator, glas::tag::row, 2> > {}; template struct range_generator > - : detail::all_cols_range_generator, + : detail::all_cols_range_generator, typename detail::dense2D_cc::type> {}; - - // For a cursor pointing to some row give the range of elements in this row + + // For a cursor pointing to some row give the range of elements in this row template - struct range_generator, glas::tag::col, 2> > { typedef dense2D matrix; typedef typename matrix::size_type size_type; - typedef detail::sub_matrix_cursor cursor; + typedef detail::sub_matrix_cursor cursor; typedef typename detail::dense2D_cc::type complexity; static int const level = 1; @@ -663,7 +663,7 @@ namespace mtl { namespace traits { boost::is_same , dense_el_cursor , strided_dense_el_cursor - >::type type; + >::type type; private: type dispatch(cursor const& c, size_type row, col_major) const @@ -687,13 +687,13 @@ namespace mtl { namespace traits { type lower_bound(cursor const& c, size_type position) const { return dispatch(c, std::min(c.ref.end_row(), position), typename matrix::orientation()); - } + } }; template - struct range_generator, glas::tag::col, 2> > - : public range_generator, glas::tag::col, 2> > {}; @@ -710,12 +710,12 @@ namespace mtl { namespace traits { { static const bool value= false; }; - + template <> struct major_traversal { static const bool value= true; }; - + template <> struct major_traversal { static const bool value= true; @@ -733,7 +733,7 @@ namespace mtl { namespace traits { // if traverse first along major dimension then memory access is contiguous (otherwise strided) typedef typename boost::mpl::if_< - major_traversal + major_traversal , complexity_classes::linear_cached , complexity_classes::linear >::type complexity; @@ -741,18 +741,18 @@ namespace mtl { namespace traits { // if traverse first along major dimension use pointer otherwise strided iterator typedef typename boost::mpl::if_< - major_traversal + major_traversal , typename boost::mpl::if_c< - is_const + is_const , const value_type* , value_type* >::type , typename boost::mpl::if_c< - is_const + is_const , strided_dense_el_const_iterator , strided_dense_el_iterator >::type - >::type type; + >::type type; private: // if traverse first along major dim. then return address as pointer @@ -762,7 +762,7 @@ namespace mtl { namespace traits { return ma.elements() + ma.indexer(ma, row, col); // &ref[row][col]; } - // otherwise strided + // otherwise strided type dispatch(cursor const& c, size_type row, size_type col, complexity_classes::linear) const { // cast const away (is dirty and should be improved later (cursors must distinct constness)) @@ -774,7 +774,7 @@ namespace mtl { namespace traits { { return dispatch(c, c.key, c.ref.begin_col(), complexity()); } - + type end_dispatch(cursor const& c, glas::tag::row) const { return dispatch(c, c.key, c.ref.end_col(), complexity()); @@ -801,32 +801,32 @@ namespace mtl { namespace traits { type end(cursor const& c) const { return end_dispatch(c, OuterTag()); - } + } }; } // namespace detail - + template - struct range_generator, OuterTag, 2> > : public detail::dense2D_iterator_range_generator, false> {}; template - struct range_generator, OuterTag, 2> > : public detail::dense2D_iterator_range_generator, false> {}; template - struct range_generator, OuterTag, 2> > : public detail::dense2D_iterator_range_generator, true> {}; template - struct range_generator, OuterTag, 2> > : public detail::dense2D_iterator_range_generator, true> {}; @@ -845,12 +845,12 @@ namespace mtl { namespace matrix { { typedef dense2D matrix_type; // copy orientation, ignore index, set dimension to non-fixed and on_stack to false - typedef parameters para_type; + typedef parameters para_type; typedef dense2D sub_matrix_type; typedef sub_matrix_type const const_sub_matrix_type; typedef typename matrix_type::size_type size_type; - + sub_matrix_type operator()(matrix_type& matrix, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { return sub_matrix_type(matrix, dense2D_sub_ctor(), begin_r, end_r, begin_c, end_c); @@ -862,9 +862,9 @@ namespace mtl { namespace matrix { // To minimize code duplication, we use the non-const version sub_matrix_type tmp((*this)(const_cast(matrix), begin_r, end_r, begin_c, end_c)); return tmp; - } + } }; - + }} // mtl::matrix namespace mtl { @@ -872,7 +872,7 @@ namespace mtl { // Enable cloning of dense matrices template struct is_clonable< mtl::matrix::dense2D > : boost::mpl::true_ {}; - + } // namespace mtl @@ -882,8 +882,8 @@ namespace math { // Multiplicative identities of matrices template struct identity_t< mult >, mtl::matrix::dense2D > - : public std::binary_function< mult >, - mtl::matrix::dense2D, + : public std::binary_function< mult >, + mtl::matrix::dense2D, mtl::matrix::dense2D > { typedef mtl::matrix::dense2D matrix_type; @@ -895,7 +895,7 @@ namespace math { return tmp; } }; - + } // namespace math diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/diagonal_setup.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/diagonal_setup.hpp index 16142458..bcdd90b8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/diagonal_setup.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/diagonal_setup.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DIAGONAL_SETUP_INCLUDE @@ -22,7 +22,7 @@ namespace mtl { namespace matrix { /// Setup a matrix to a multiple of the unity matrix -/** Intended for sparse matrices but works also with dense matrices. +/** Intended for sparse matrices but works also with dense matrices. If the value is 0 the matrix is only zeroed out, whereby a sparse matrix will be empty after this operation, i.e. the zeros on the diagonal are not explicitly stored. @@ -34,7 +34,7 @@ template inline void diagonal_setup(Matrix& matrix, const Value& value) { using std::min; - if (num_rows(matrix) == 0 || num_cols(matrix) == 0) + if (num_rows(matrix) == 0 || num_cols(matrix) == 0) return; set_to_zero(matrix); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dimension.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dimension.hpp index 7acab089..e9584e3b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dimension.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/dimension.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DIMENSIONS_INCLUDE @@ -20,7 +20,7 @@ namespace mtl { -// dimension is a type for declaring matrix dimensions +// dimension is a type for declaring matrix dimensions // num_rows() and num_cols() return the number or rows and columns // is_static says whether it is declared at compile time or not @@ -40,9 +40,9 @@ namespace fixed // To have the same interface as fixed #ifndef NDEBUG /// Constructor does not need arguments but if given they are compared against the template arguments in debug mode - explicit dimensions(size_type r= Rows, size_type c= Cols) + explicit dimensions(size_type r= Rows, size_type c= Cols) { - assert(r == Rows); assert(c == Cols); + assert(r == Rows); assert(c == Cols); } #else explicit dimensions(size_type, size_type) {} @@ -58,17 +58,17 @@ namespace fixed /// Transposed dimension (type) typedef dimensions transposed_type; - transposed_type transpose() const - { - return transposed_type(); + transposed_type transpose() const + { + return transposed_type(); } }; /// Output of dimensions template - inline std::ostream& operator<< (std::ostream& stream, dimensions) + inline std::ostream& operator<< (std::ostream& stream, dimensions) { - return stream << R << 'x' << C; + return stream << R << 'x' << C; } } // namespace fixed @@ -80,22 +80,22 @@ namespace non_fixed { typedef std::size_t size_type; - /// Constructor + /// Constructor dimensions(size_type r= 0, size_type c= 0) : r(r), c(c) {} - + /// Assignment - dimensions& operator=(const dimensions& x) + dimensions& operator=(const dimensions& x) { - r= x.r; c= x.c; return *this; + r= x.r; c= x.c; return *this; } size_type num_rows() const { return r; } ///< Number of rows size_type num_cols() const { return c; } ///< Number of columns /// Transposed dimension typedef dimensions transposed_type; - transposed_type transpose() - { - return transposed_type(c, r); + transposed_type transpose() + { + return transposed_type(c, r); } /// To check whether dimensions are static @@ -105,9 +105,9 @@ namespace non_fixed }; /// Output of dimensions - inline std::ostream& operator<< (std::ostream& stream, dimensions d) + inline std::ostream& operator<< (std::ostream& stream, dimensions d) { - return stream << d.num_rows() << 'x' << d.num_cols(); + return stream << d.num_rows() << 'x' << d.num_cols(); } } // namespace non_fixed diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element.hpp index d88cfc2b..8edbf63c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element.hpp @@ -1,18 +1,18 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt - + #ifndef MTL_ELEMENT_INCLUDE #define MTL_ELEMENT_INCLUDE @@ -35,7 +35,7 @@ namespace mtl { namespace matrix { /// A class representing an element with ValType equals the type of the numeric values template -class element +class element { public: @@ -46,7 +46,7 @@ public: typedef ValType value_type; /// The type of a set of neighbors. - typedef std::vector > neighbor_collection_type; // trouble with Clang 4.2 w/o allocator + typedef std::vector > neighbor_collection_type; // trouble with Clang 4.2 w/o allocator /// An iterator over the neighbors of this element. typedef typename neighbor_collection_type::iterator neighbor_iterator; @@ -65,7 +65,7 @@ public: typedef mtl::matrix::dense2D matrix_type; /// The type of the index vector. - typedef mtl::vector::dense_vector index_type; + typedef mtl::vector::dense_vector index_type; /******************************************************************************* @@ -80,21 +80,21 @@ public: * p_values: a reference to the memory where the values may be stored. */ public: - element(int p_sequence_number, const index_type& p_indices, const matrix_type& p_values) - : m_indices(p_indices), + element(int p_sequence_number, const index_type& p_indices, const matrix_type& p_values) + : m_indices(p_indices), m_values(p_values), m_sequence_number(p_sequence_number) {} - element() + element() : m_sequence_number(-1) {} - element(const element_type& other) + element(const element_type& other) : m_sequence_number(-1) { *this = other; } /// Deep copy the given element. - void operator=(const element_type& other) + void operator=(const element_type& other) { m_sequence_number = other.m_sequence_number; m_neighbors = other.m_neighbors; @@ -126,12 +126,12 @@ public: inline index_type& get_indices() { return m_indices; } /// The actual number of non-zero values. - int nnz() const + int nnz() const { const value_type zero= math::zero(value_type()); int nbr_nz = 0; - for (int r = 0; r < nb_vars(); ++r) - for (int c = 0; c < nb_vars(); ++c) + for (int r = 0; r < nb_vars(); ++r) + for (int c = 0; c < nb_vars(); ++c) nbr_nz += get_values()(r,c) != zero; return nbr_nz; } @@ -147,8 +147,8 @@ public: /// Add new neighbors, max 6 at the time void add_neighbors(element* n1, element* n2= 0, element* n3= 0, - element* n4= 0, element* n5= 0, element* n6= 0) - { + element* n4= 0, element* n5= 0, element* n6= 0) + { m_neighbors.push_back(n1); if (n2) { m_neighbors.push_back(n2); @@ -165,7 +165,7 @@ public: ******************************************************************************/ /// The set of nodes that is incident to the element. - boost::unordered_set get_incident_nodes() const + boost::unordered_set get_incident_nodes() const { boost::unordered_set nodes(2 * get_nb_neighbors()); for(typename neighbor_collection_type::const_iterator neigh_it = m_neighbors.begin(); @@ -174,14 +174,14 @@ public: nodes.insert(neigh.get_indices().begin(), neigh.get_indices().end()); } // Remove the nodes of the element. - for( int i = 0; i < nb_vars(); ++i ) + for( int i = 0; i < nb_vars(); ++i ) nodes.erase( get_indices()(i) ); return nodes; } - /// Get the set of level-k neighbors, for a given k. - neighbor_set_type get_level_neighbors(const int level = 1) + /// Get the set of level-k neighbors, for a given k. + neighbor_set_type get_level_neighbors(const int level = 1) { neighbor_set_type result( get_nb_neighbors() * level ); @@ -202,7 +202,7 @@ public: * Manipulation ******************************************************************************/ public: - /// Permutes the rows and the columns of the element coefficient matrix along + /// Permutes the rows and the columns of the element coefficient matrix along /// with the indices such that the latter are sorted in ascending order. void sort_indices() { if(size(m_indices) == 0) { @@ -343,7 +343,7 @@ public: // values = new matrix_type(0,0); } // Update the neighborhood. - std::set, std::allocator > remove_neighs; // trouble with Clang 4.2 w/o allocator + std::set, std::allocator > remove_neighs; // trouble with Clang 4.2 w/o allocator for( neighbor_iterator neigh_it = m_neighbors.begin(); neigh_it != m_neighbors.end(); @@ -385,7 +385,7 @@ public: // Remove the neighbors we're no longer connected to. for(std::set::iterator it = remove_neighs.begin(); it != remove_neighs.end(); ++it) { const int seek_seq_nbr = *it; - for (std::size_t j = 0; j < m_neighbors.size(); ++j) + for (std::size_t j = 0; j < m_neighbors.size(); ++j) if (m_neighbors[j] != 0 && m_neighbors[j]->get_id() == seek_seq_nbr) { m_neighbors.erase( m_neighbors.begin()+j ); break; @@ -404,7 +404,7 @@ public: /// Absorbs the values of the given matrix with the given index. template< class Matrix, class Vector > - void absorb(Matrix& other_values, Vector& other_indices) + void absorb(Matrix& other_values, Vector& other_indices) { const value_type zero= math::zero(value_type()); #ifndef NDEBUG @@ -414,7 +414,7 @@ public: } assert(sorted); #endif - + const int other_idx_size = size( other_indices ); // Determine set of common indices. @@ -448,7 +448,7 @@ public: } } } - + /// Removes the numerical values from the element. void clear() { m_neighbors.clear(); @@ -479,7 +479,7 @@ public: /// Print an element to an output stream. template -OStream& operator<<(OStream& out, element& el) +OStream& operator<<(OStream& out, element& el) { out << "ID: " << el.get_id() << "\n"; if(el.nb_vars() > 0) { @@ -492,8 +492,8 @@ OStream& operator<<(OStream& out, element& el) out << "Indices: ()\n"; } out << "Neighbors: ("; - if (el.nb_vars() > 0) - for(int i = 0; i < el.get_nb_neighbors(); ++i) + if (el.nb_vars() > 0) + for(int i = 0; i < el.get_nb_neighbors(); ++i) out << el.get_neighbors()[i]->get_id() << (i+1 < el.get_nb_neighbors()? ", " : ")\n"); out << "Values: \n" << el.get_values(); return out; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_array.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_array.hpp index d2d3326c..2fb085ee 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_array.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_array.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ELEMENT_ARRAY_INCLUDE @@ -21,7 +21,7 @@ struct element_array_t explicit element_array_t(const Array& array, const Rows& rows, const Cols& cols) : array(array), rows(rows), cols(cols) {} - + const Array& array; const Rows& rows; const Cols& cols; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_matrix.hpp index fc21bff9..d29e1ca2 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ELEMENT_MATRIX_INCLUDE @@ -22,12 +22,12 @@ struct element_matrix_t explicit element_matrix_t(const Matrix& matrix, const Rows& rows, const Cols& cols) : matrix(matrix), rows(rows), cols(cols) {} - + const Matrix& matrix; const Rows& rows; const Cols& cols; }; - + template element_matrix_t diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_structure.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_structure.hpp index 9563d35a..cd40ac67 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_structure.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/element_structure.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // // Algorithm inspired by Nick Vannieuwenhoven, written by Cornelius Steinhardt @@ -97,7 +97,7 @@ namespace print { * A generic abstract base class for meshes. It describes the concept of a mesh. */ template< class ValueType > -class element_structure +class element_structure { public: @@ -118,7 +118,7 @@ public: /// Type of this class. typedef element_structure this_type; typedef this_type self; - + /// Standard constructor. element_structure(int total_elements= 0, int total_vars= 0, element_type* elements= 0) : m_total_elements(total_elements), m_total_vars(total_vars), @@ -141,7 +141,7 @@ public: element_structure(this_type const& other) : m_total_elements(other.m_total_elements), m_total_vars(other.m_total_vars), - m_elements(m_total_elements == 0 ? 0 : new element_type[m_total_elements]), + m_elements(m_total_elements == 0 ? 0 : new element_type[m_total_elements]), index_heap(0), value_heap(0) { typedef typename element_type::neighbor_collection_type neigh_coll_type; @@ -175,7 +175,7 @@ public: void make_compact() { assert(index_heap == 0); assert(value_heap == 0); // might be relaxed later - + int total_indices= 0, total_values= 0; for (int i= 0; i < m_total_elements; i++) { total_indices+= m_elements[i].nb_vars(); @@ -213,7 +213,7 @@ public: int get_total_vars() const { return m_total_vars; } /// Total number of non-zero values. - int get_total_nnz() const + int get_total_nnz() const { int nnz = 0; for(element_iterator it = element_begin(); it != element_end(); ++it) { @@ -230,7 +230,7 @@ public: #if 1 /// Writes the elements to the specified file. TODO at the moment very slow - void write_to_file(const std::string& filename) + void write_to_file(const std::string& filename) { //using namespace print; @@ -263,7 +263,7 @@ public: } } #endif - + int m_total_elements; ///< The total number of elements. int m_total_vars; ///< The total number of variables. element_type* m_elements; ///< The elements of the grid, stored consecutively. diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/ell_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/ell_matrix.hpp index d2955791..c45db411 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/ell_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/ell_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MATRIX_ELL_MATRIX_INCLUDE @@ -70,7 +70,7 @@ class ell_matrix void print_internal(OStream& os) const { # ifdef MTL_HAS_STD_OUTPUT_OPERATOR - os << "indices = " << indices << '\n'; + os << "indices = " << indices << '\n'; os << "values = " << data << '\n'; # endif } @@ -88,7 +88,7 @@ class ell_matrix std::vector& ref_minor() { return indices; } ///< Refer index vector [advanced] const std::vector& ref_data() const { return data; } ///< Refer data vector [advanced] std::vector& ref_data() { return data; } ///< Refer data vector [advanced] - + size_type stride() const { return my_stride; } /// Stride [advanced] size_type slots() const { return my_slots; } /// Slots, i.e. maximum number of entries per row/column @@ -112,9 +112,9 @@ class ell_matrix indices.resize(size); data.resize(size); } - template friend struct ell_matrix_inserter; + template friend struct ell_matrix_inserter; - std::vector data; + std::vector data; std::vector indices; size_type my_stride, my_slots; bool inserting; @@ -132,7 +132,7 @@ struct ell_matrix_inserter typedef compressed2D compressed_type; typedef wrapped_object wrapped_type; typedef compressed2D_inserter base_inserter; - + explicit ell_matrix_inserter(matrix_type& A, size_type slot_size = 5) : wrapped_type(num_rows(A), num_cols(A)), base_inserter(wrapped_type::wrapped_object_member, slot_size), @@ -146,7 +146,7 @@ struct ell_matrix_inserter this->finish(); const compressed_type& B= this->wrapped_object_member; // std::cout << "Finished insertion!\nA (compressed2D) is:\n" << B; - + size_type max_slots= 0; for (size_type i= 0; i < B.dim1(); ++i) { size_type s= this->starts[i+1] - this->starts[i]; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hermitian_view.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hermitian_view.hpp index 1c503296..bcc10ce7 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hermitian_view.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hermitian_view.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_HERMITIAN_VIEW_INCLUDE @@ -24,10 +24,10 @@ namespace mtl { namespace matrix { -template -struct hermitian_view +template +struct hermitian_view : private transposed_view, - public map_view, + public map_view, transposed_view > { typedef transposed_view trans_base; @@ -40,20 +40,20 @@ struct hermitian_view typedef typename OrientedCollection::orientation orientation; // Should not be needed because defined in Collection (bug in g++???) - hermitian_view(const Matrix& matrix) - : trans_base(const_cast(matrix)), - base(functor_type(), static_cast(*this)) + hermitian_view(const Matrix& matrix) + : trans_base(const_cast(matrix)), + base(functor_type(), static_cast(*this)) {} - + #if 0 hermitian_view(boost::shared_ptr p) : trans_base(p), base(functor_type(), static_cast(*this)) {} -#endif +#endif typename base::value_type operator()(size_type r, size_type c) const { return base::operator()(r, c); } - operations::bracket_proxy + operations::bracket_proxy operator[] (size_type r) const { return operations::bracket_proxy(*this, r); @@ -61,12 +61,12 @@ struct hermitian_view friend size_type inline num_rows(const self& A) { return num_rows((const base&)(A)); } friend size_type inline num_cols(const self& A) { return num_cols((const base&)(A)); } - - const_ref_type const_ref() const - { + + const_ref_type const_ref() const + { // make two statements because nvcc cannot handle ref.ref const transposed_view& r1= base::ref; - return r1.ref; + return r1.ref; } size_type nnz() const { return base::nnz(); } @@ -75,10 +75,10 @@ struct hermitian_view }; // If not defined ambigous between map_view and transposed_view -template +template inline std::size_t size(const hermitian_view& A) -{ - return num_rows(A) * num_rows(A); +{ + return num_rows(A) * num_rows(A); } // TBD submatrix of Hermitian (not trivial) @@ -93,31 +93,31 @@ namespace mtl { namespace traits { template struct row< mtl::matrix::hermitian_view > - : public row< mtl::matrix::map_view, + : public row< mtl::matrix::map_view, mtl::matrix::transposed_view > > {}; template struct col< mtl::matrix::hermitian_view > - : public col< mtl::matrix::map_view, + : public col< mtl::matrix::map_view, mtl::matrix::transposed_view > > {}; template struct const_value< mtl::matrix::hermitian_view > - : public const_value< mtl::matrix::map_view, + : public const_value< mtl::matrix::map_view, mtl::matrix::transposed_view > > {}; template struct range_generator< Tag, mtl::matrix::hermitian_view > - : public range_generator< Tag, mtl::matrix::map_view, + : public range_generator< Tag, mtl::matrix::map_view, mtl::matrix::transposed_view > > {}; template struct range_generator< tag::major, mtl::matrix::hermitian_view > - : public range_generator< tag::major, mtl::matrix::map_view, + : public range_generator< tag::major, mtl::matrix::map_view, mtl::matrix::transposed_view > > {}; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hessian_setup.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hessian_setup.hpp index 55ce0a53..45b74cd5 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hessian_setup.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/hessian_setup.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_HESSIAN_MATRIX_UTILITIES_INCLUDE @@ -30,9 +30,9 @@ void hessian_setup(Matrix& A, Value factor) { typedef typename Collection::value_type value_type; typedef typename Collection::size_type size_type; - + inserter ins(A, num_cols(A)); - + for (size_type r= 0; r < num_rows(A); r++) for (size_type c= 0; c < num_cols(A); c++) ins[r][c] << factor * (value_type(r) + value_type(c)); @@ -43,7 +43,7 @@ namespace impl { /* - Check matrix product C = A * B with: - A is MxN, B is NxL, C is MxL - - with matrices a_ij = i+j, b_ij = 2(i+j); + - with matrices a_ij = i+j, b_ij = 2(i+j); - c_ij = 1/3 N (1 - 3i - 3j + 6ij - 3N + 3iN + 3jN + 2N^2). */ @@ -53,27 +53,27 @@ namespace impl { { return 1.0/3.0 * N * (1.0 - 3*i - 3*j + 6*i*j - 3*N + 3*i*N + 3*j*N + 2*N*N); } - + template - inline bool similar_values(Value x, Value y) + inline bool similar_values(Value x, Value y) { using std::abs; using std::max; return abs(x - y) / max(abs(x), abs(y)) < 0.000001; } template - void inline check_entry(Matrix const& C, unsigned long r, unsigned long c, + void inline check_entry(Matrix const& C, unsigned long r, unsigned long c, unsigned long reduced_dim, double factor) { if (!entry_similar(C, r, c, factor * hessian_product_i_j(r, c, reduced_dim), 0.00001)) { - std::cerr << "Result in C[" << r << "][" << c << "] should be " + std::cerr << "Result in C[" << r << "][" << c << "] should be " << factor * hessian_product_i_j(r, c, reduced_dim) << " but is " << C[r][c] << "\n"; MTL_THROW(unexpected_result()); } } -} // impl +} // impl /// Check if matrix C is A * B with A and B set by hessian_setup diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity.hpp index 4380d5ac..83fc1950 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_IDENTITY_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity2D.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity2D.hpp index d1d22620..1a4d8ddc 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity2D.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/identity2D.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MATRIX_IDENTITY2D_INCLUDE @@ -27,7 +27,7 @@ struct identity2D /// Constructor for \p m by \p m matrix identity2D(std::size_t m) : m(m), n(m) {} - /// Constructor for \p m by \p n matrix + /// Constructor for \p m by \p n matrix identity2D(std::size_t m, std::size_t n) : m(m), n(n) {} /// Member function that realizes the multiplication @@ -40,7 +40,7 @@ struct identity2D if (size(w) == 0) w.change_dim(m); - if (m == n) + if (m == n) Assign::first_update(w, v); else if (m < n) Assign::first_update(w, v[irange(m)]); @@ -65,7 +65,7 @@ inline std::size_t num_cols(const identity2D& A) { return A.n; } ///< Number of }} // namespace mtl::matrix -namespace mtl { +namespace mtl { template <> struct Collection @@ -75,7 +75,7 @@ namespace mtl { }; namespace ashape { - template <> struct ashape_aux + template <> struct ashape_aux { typedef nonscal type; }; } } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/implicit_dense.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/implicit_dense.hpp index c16c9ceb..92264d5c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/implicit_dense.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/implicit_dense.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_IMPLICIT_DENSE_INCLUDE @@ -62,12 +62,12 @@ class implicit_dense Functor const& functor() const { return my_functor; } private: - Functor my_functor; + Functor my_functor; }; template -typename Functor::size_type inline size(const implicit_dense& A) -{ +typename Functor::size_type inline size(const implicit_dense& A) +{ return num_rows(A) * num_cols(A); } @@ -99,7 +99,7 @@ namespace mtl { namespace traits { template struct range_generator, glas::tag::row, 2> > + detail::sub_matrix_cursor, glas::tag::row, 2> > : detail::all_cols_in_row_range_generator, glas::tag::row, 2> > {}; @@ -110,39 +110,39 @@ namespace mtl { namespace traits { template struct range_generator, glas::tag::col, 2> > + detail::sub_matrix_cursor, glas::tag::col, 2> > : detail::all_rows_in_col_range_generator, glas::tag::col, 2> > {}; template struct range_generator > - : public range_generator > > + : public range_generator > > {}; template struct range_generator > - : public range_generator > > + : public range_generator > > {}; template struct range_generator > - : public range_generator > > + : public range_generator > > {}; template struct range_generator > - : public range_generator > > + : public range_generator > > {}; template struct range_generator > - : public range_generator > > + : public range_generator > > {}; template struct range_generator > - : public range_generator > > + : public range_generator > > {}; }} // mtl::traits @@ -173,7 +173,7 @@ class ones_functor size_type nr, nc; }; - + template class hilbert_functor { @@ -187,16 +187,16 @@ class hilbert_functor friend size_type inline num_rows(const self& A) { return A.nr; } friend size_type inline num_cols(const self& A) { return A.nc; } - result_type operator()(size_type r, size_type c) const - { - using math::reciprocal; - return reciprocal(Value(r + c + 1)); + result_type operator()(size_type r, size_type c) const + { + using math::reciprocal; + return reciprocal(Value(r + c + 1)); } private: size_type nr, nc; }; - + template class outer_product_functor { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/indirect.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/indirect.hpp index 2938e703..872cb5e7 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/indirect.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/indirect.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_INDIRECT_INCLUDE @@ -42,7 +42,7 @@ struct indirect friend size_type inline num_rows(const self& A) { return A.rows.size(); } ///< Number of rows friend size_type inline num_cols(const self& A) { return A.cols.size(); } ///< Number of colums - size_type nnz() const { return num_rows(*this) * num_cols(*this); } ///< Number of non-zeros + size_type nnz() const { return num_rows(*this) * num_cols(*this); } ///< Number of non-zeros size_type dim1() const { return rows.size(); } ///< Dimension 1 is equal to number of rows size_type dim2() const { return cols.size(); } ///< Dimension 2 is equal to number of columns @@ -55,7 +55,7 @@ struct indirect iset rows, cols; }; -template +template inline std::size_t size(const indirect& A) { return num_rows(A) * num_rows(A); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/inserter.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/inserter.hpp index 7e078959..ad211a17 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/inserter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/inserter.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_INSERTER_INCLUDE @@ -30,7 +30,7 @@ namespace mtl { namespace matrix { **/ template > -struct inserter +struct inserter : public mtl::detail::trivial_inserter { typedef mtl::detail::trivial_inserter base; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/laplacian_setup.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/laplacian_setup.hpp index 1bb7f145..7cb00aa2 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/laplacian_setup.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/laplacian_setup.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_LAPLACIAN_SETUP_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/lower.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/lower.hpp index da605485..dbb2cee8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/lower.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/lower.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_LOWER_INCLUDE @@ -25,7 +25,7 @@ namespace traits { } /// Lower triangular matrix -template +template typename traits::lower::type inline lower(const Matrix& A) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/make_fast_multi_vector_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/make_fast_multi_vector_expr.hpp index 1ea21773..802f4a6d 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/make_fast_multi_vector_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/make_fast_multi_vector_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MATRIX_MAKE_FAST_MULTI_VECTOR_EXPR_INCLUDE @@ -40,7 +40,7 @@ inline make_fast_multi_vector_expr(const mv_mv_minus_expr& expr) return type(make_fast_multi_vector_expr(expr.first), make_fast_multi_vector_expr(expr.second)); } -template +template typename mtl::traits::fast_multi_vector_expr< map_view >::type inline make_fast_multi_vector_expr(const map_view& expr) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/map_view.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/map_view.hpp index bd4476ff..e185d727 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/map_view.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/map_view.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAP_VIEW_INCLUDE @@ -48,9 +48,9 @@ namespace mtl { namespace matrix { namespace detail { namespace mtl { namespace matrix { -template -struct map_view - : public const_crtp_base_matrix< map_view, +template +struct map_view + : public const_crtp_base_matrix< map_view, typename Functor::result_type, typename Matrix::size_type >, public mat_expr< map_view > { @@ -59,7 +59,7 @@ struct map_view typedef Matrix other; typedef const Matrix& const_ref_type; typedef typename Matrix::orientation orientation; - + typedef typename Functor::result_type value_type; typedef typename Functor::result_type const_reference; @@ -72,18 +72,18 @@ struct map_view typedef typename boost::mpl::eval_if, detail::map_vector, dummy>::type vector_type; map_view (const Functor& functor, const other& ref) : functor(functor), ref(ref) {} - - map_view (const Functor& functor, boost::shared_ptr p) + + map_view (const Functor& functor, boost::shared_ptr p) : functor(functor), my_copy(p), ref(*p) {} - -#ifdef MTL_WITH_CPP11_MOVE + +#ifdef MTL_WITH_CPP11_MOVE map_view (self&& that) : functor(that.functor), my_copy(std::move(that.my_copy)), ref(that.ref) {} map_view (const self& that) : functor(that.functor), ref(that.ref) { assert(that.my_copy.use_count() == 0); } #endif value_type operator() (size_type r, size_type c) const - { + { return functor(ref(r, c)); } // for multi_vector, needs enable_if since only defined for multi_vector @@ -102,12 +102,12 @@ struct map_view size_type end_row() const { return ref.end_row(); } size_type begin_col() const { return ref.begin_col(); } size_type end_col() const { return ref.end_col(); } - + size_type nnz() const { return ref.nnz(); } - friend size_type inline num_rows(const self& A) + friend size_type inline num_rows(const self& A) { using mtl::matrix::num_rows; return num_rows(A.ref); } - friend size_type inline num_cols(const self& A) + friend size_type inline num_cols(const self& A) { using mtl::matrix::num_cols; return num_cols(A.ref); } template friend struct detail::map_value; @@ -117,8 +117,8 @@ struct map_view Functor functor; const other& ref; }; - -template + +template inline std::size_t size(const map_view& A) { return num_rows(A) * num_rows(A); } @@ -136,7 +136,7 @@ struct sub_matrix_t< mtl::matrix::map_view > typedef mtl::matrix::map_view const_sub_matrix_type; typedef typename view_type::size_type size_type; - const_sub_matrix_type operator()(view_type const& view, size_type begin_r, size_type end_r, + const_sub_matrix_type operator()(view_type const& view, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { typedef boost::shared_ptr pointer_type; @@ -145,7 +145,7 @@ struct sub_matrix_t< mtl::matrix::map_view > // Create a submatrix, whos address will be kept by map_view // Functor is copied from view pointer_type p(new ref_sub_type(sub_matrix(view.ref, begin_r, end_r, begin_c, end_c))); - return const_sub_matrix_type(view.functor, p); + return const_sub_matrix_type(view.functor, p); } }; @@ -158,14 +158,14 @@ namespace mtl { namespace traits { namespace detail { - template + template struct map_value { typedef typename Matrix::key_type key_type; typedef typename mtl::matrix::map_view::value_type value_type; - - map_value(mtl::matrix::map_view const& map_matrix) - : map_matrix(map_matrix), its_value(map_matrix.ref) + + map_value(mtl::matrix::map_view const& map_matrix) + : map_matrix(map_matrix), its_value(map_matrix.ref) {} value_type operator() (key_type const& key) const @@ -180,12 +180,12 @@ namespace mtl { namespace traits { - template + template struct mapped_row { typedef typename Matrix::key_type key_type; typedef typename Matrix::size_type size_type; - + explicit mapped_row(const mtl::matrix::map_view& view) : its_row(view.ref) {} explicit mapped_row(const mtl::matrix::banded_view& view) : its_row(view.ref) {} @@ -199,12 +199,12 @@ namespace mtl { namespace traits { }; - template + template struct mapped_col { typedef typename Matrix::key_type key_type; typedef typename Matrix::size_type size_type; - + mapped_col(const mtl::matrix::map_view& view) : its_col(view.ref) {} mapped_col(const mtl::matrix::banded_view& view) : its_col(view.ref) {} @@ -216,22 +216,22 @@ namespace mtl { namespace traits { protected: typename col::type its_col; }; - + } // namespace detail - - template + + template struct row > { typedef detail::mapped_row type; }; - template + template struct col > { typedef detail::mapped_col type; }; - template + template struct const_value > { typedef detail::map_value type; @@ -243,16 +243,16 @@ namespace mtl { namespace traits { // ================ // Use range_generator of original matrix - template + template struct range_generator > - : public detail::referred_range_generator, + : public detail::referred_range_generator, range_generator > {}; // To disambigue - template + template struct range_generator > - : public detail::referred_range_generator, + : public detail::referred_range_generator, range_generator > {}; @@ -273,12 +273,12 @@ struct scaled_view scaled_view(const Scaling& scaling, const Matrix& matrix) : base(functor_type(scaling), matrix) {} - + scaled_view(const Scaling& scaling, boost::shared_ptr p) : base(functor_type(scaling), p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE scaled_view (self&& that) : base(that) {} scaled_view (const self& that) : base(that) {} #endif @@ -292,7 +292,7 @@ struct rscaled_view typedef tfunctor::rscale functor_type; typedef map_view base; typedef rscaled_view self; - + rscaled_view(const Matrix& matrix, const RScaling& rscaling) : base(functor_type(rscaling),matrix) {} @@ -301,12 +301,12 @@ struct rscaled_view : base(functor_type(rscaling), p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE rscaled_view (self&& that) : base(that) {} rscaled_view (const self& that) : base(that) {} #endif }; - + // divide_by_view -- added by Hui Li template struct divide_by_view @@ -315,16 +315,16 @@ struct divide_by_view typedef tfunctor::divide_by functor_type; typedef map_view base; typedef divide_by_view self; - + divide_by_view(const Matrix& matrix,const Divisor& div) : base(functor_type(div), matrix) {} - + divide_by_view(boost::shared_ptr p, const Divisor& div) : base(functor_type(div), p) {} - -#ifdef MTL_WITH_CPP11_MOVE + +#ifdef MTL_WITH_CPP11_MOVE divide_by_view (self&& that) : base(that) {} divide_by_view (const self& that) : base(that) {} #endif @@ -341,7 +341,7 @@ struct conj_view conj_view(const Matrix& matrix) : base(functor_type(), matrix) {} conj_view(boost::shared_ptr p) : base(functor_type(), p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE conj_view (self&& that) : base(that) {} conj_view (const self& that) : base(that) {} #endif @@ -358,7 +358,7 @@ struct imag_view imag_view(const Matrix& matrix) : base(functor_type(), matrix) {} imag_view(boost::shared_ptr p) : base(functor_type(), p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE imag_view (self&& that) : base(that) {} imag_view (const self& that) : base(that) {} #endif @@ -375,7 +375,7 @@ struct negate_view negate_view(const Matrix& matrix) : base(functor_type(), matrix) {} negate_view(boost::shared_ptr p) : base(functor_type(), p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE negate_view (self&& that) : base(that) {} negate_view (const self& that) : base(that) {} #endif @@ -392,7 +392,7 @@ struct real_view real_view(const Matrix& matrix) : base(functor_type(), matrix) {} real_view(boost::shared_ptr p) : base(functor_type(), p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE real_view (self&& that) : base(that) {} real_view (const self& that) : base(that) {} #endif @@ -400,7 +400,7 @@ struct real_view template struct sub_matrix_t< mtl::matrix::scaled_view > - : public sub_matrix_t< mtl::matrix::map_view, + : public sub_matrix_t< mtl::matrix::map_view, Matrix> > {}; @@ -411,13 +411,13 @@ struct sub_matrix_t< mtl::matrix::conj_view > template struct sub_matrix_t< mtl::matrix::rscaled_view > - : public sub_matrix_t< mtl::matrix::map_view, + : public sub_matrix_t< mtl::matrix::map_view, Matrix> > {}; template struct sub_matrix_t< mtl::matrix::divide_by_view > - : public sub_matrix_t< mtl::matrix::map_view, + : public sub_matrix_t< mtl::matrix::map_view, Matrix> > {}; @@ -449,7 +449,7 @@ namespace mtl { namespace traits { template struct row< mtl::matrix::scaled_view > - : public row< mtl::matrix::map_view, + : public row< mtl::matrix::map_view, Matrix> > {}; @@ -460,20 +460,20 @@ struct row< mtl::matrix::conj_view > template struct row< mtl::matrix::rscaled_view > - : public row< mtl::matrix::map_view, + : public row< mtl::matrix::map_view, Matrix> > {}; template struct row< mtl::matrix::divide_by_view > - : public row< mtl::matrix::map_view, + : public row< mtl::matrix::map_view, Matrix> > {}; template struct col< mtl::matrix::scaled_view > - : public col< mtl::matrix::map_view, + : public col< mtl::matrix::map_view, Matrix> > {}; @@ -484,13 +484,13 @@ struct col< mtl::matrix::conj_view > template struct col< mtl::matrix::rscaled_view > - : public col< mtl::matrix::map_view, + : public col< mtl::matrix::map_view, Matrix> > {}; template struct col< mtl::matrix::divide_by_view > - : public col< mtl::matrix::map_view, + : public col< mtl::matrix::map_view, Matrix> > {}; @@ -500,7 +500,7 @@ struct col< mtl::matrix::divide_by_view > template struct const_value< mtl::matrix::scaled_view > - : public const_value< mtl::matrix::map_view, + : public const_value< mtl::matrix::map_view, Matrix> > {}; @@ -511,13 +511,13 @@ struct const_value< mtl::matrix::conj_view > template struct const_value< mtl::matrix::rscaled_view > - : public const_value< mtl::matrix::map_view, + : public const_value< mtl::matrix::map_view, Matrix> > {}; template struct const_value< mtl::matrix::divide_by_view > - : public const_value< mtl::matrix::map_view, + : public const_value< mtl::matrix::map_view, Matrix> > {}; @@ -527,7 +527,7 @@ struct const_value< mtl::matrix::divide_by_view > template struct range_generator< Tag, mtl::matrix::scaled_view > - : public range_generator< Tag, mtl::matrix::map_view, + : public range_generator< Tag, mtl::matrix::map_view, Matrix> > {}; @@ -538,13 +538,13 @@ struct range_generator< Tag, mtl::matrix::conj_view > template struct range_generator< Tag, mtl::matrix::rscaled_view > - : public range_generator< Tag, mtl::matrix::map_view, + : public range_generator< Tag, mtl::matrix::map_view, Matrix> > {}; template struct range_generator< Tag, mtl::matrix::divide_by_view > - : public range_generator< Tag, mtl::matrix::map_view, + : public range_generator< Tag, mtl::matrix::map_view, Matrix> > {}; @@ -552,7 +552,7 @@ struct range_generator< Tag, mtl::matrix::divide_by_view > template struct range_generator< tag::major, mtl::matrix::scaled_view > - : public range_generator< tag::major, mtl::matrix::map_view, + : public range_generator< tag::major, mtl::matrix::map_view, Matrix> > {}; @@ -563,13 +563,13 @@ struct range_generator< tag::major, mtl::matrix::conj_view > template struct range_generator< tag::major, mtl::matrix::rscaled_view > - : public range_generator< tag::major, mtl::matrix::map_view, + : public range_generator< tag::major, mtl::matrix::map_view, Matrix> > {}; template struct range_generator< tag::major, mtl::matrix::divide_by_view > - : public range_generator< tag::major, mtl::matrix::map_view, + : public range_generator< tag::major, mtl::matrix::map_view, Matrix> > {}; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mapped_inserter.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mapped_inserter.hpp index eda40cdc..c33128ac 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mapped_inserter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mapped_inserter.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_MAPPED_INSERTER_INCLUDE @@ -21,7 +21,7 @@ namespace mtl { namespace matrix { /// Inserter with shifted row and column indices /** The main work is performed by the underlying base inserter whose type is given as template argument. **/ -template +template class mapped_inserter { public: @@ -37,9 +37,9 @@ class mapped_inserter private: struct bracket_proxy { - bracket_proxy(BaseInserter& ref, Mapper& map, size_type row) + bracket_proxy(BaseInserter& ref, Mapper& map, size_type row) : ref(ref),map(map), row(row) {} - + proxy_type operator[](size_type col) { return proxy_type(ref, row, map.col(col)); } @@ -47,14 +47,14 @@ class mapped_inserter Mapper& map; size_type row; }; - + public: /// To be used in ins[r][c] << value; - bracket_proxy operator[] (size_type row) + bracket_proxy operator[] (size_type row) { return bracket_proxy(ins, map, map.row(row)); } /// To be used in ins(r, c) << value; - proxy_type operator() (size_type row, size_type col) + proxy_type operator() (size_type row, size_type col) { return proxy_type(ins, map.row(row),map.col(col)); } // update, modify and operator<< are used from BaseInserter @@ -65,7 +65,7 @@ private: }; template< typename BaseInserter, typename Mapper, typename Elt, typename Parameters > -mapped_inserter< BaseInserter, Mapper >& operator<<(mapped_inserter< BaseInserter, Mapper >& minserter, +mapped_inserter< BaseInserter, Mapper >& operator<<(mapped_inserter< BaseInserter, Mapper >& minserter, const compressed2D< Elt, Parameters >& rhs) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_expr.hpp index 0b9f26b4..600fbf51 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_EXPR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_asgn_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_asgn_expr.hpp index 22e366f5..84b0fef4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_asgn_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_asgn_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_MAT_MAT_ASGN_EXPR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_ele_times_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_ele_times_expr.hpp index e49e9ba5..704f66dd 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_ele_times_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_ele_times_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_MAT_ELE_TIMES_EXPR_INCLUDE @@ -23,7 +23,7 @@ namespace mtl { namespace matrix { template -struct mat_mat_ele_times_expr +struct mat_mat_ele_times_expr : public mat_mat_op_expr< E1, E2, mtl::sfunctor::times >, public mat_expr< mat_mat_ele_times_expr > { @@ -36,7 +36,7 @@ struct mat_mat_ele_times_expr typedef mtl::non_fixed::dimensions dim_type; typedef typename E1::key_type key_type; - + mat_mat_ele_times_expr( E1 const& v1, E2 const& v2 ) : op_base( v1, v2 ), crtp_base(*this), first(v1), second(v2) {} @@ -46,15 +46,15 @@ struct mat_mat_ele_times_expr }; template -std::size_t inline num_rows(const mat_mat_ele_times_expr& expr) +std::size_t inline num_rows(const mat_mat_ele_times_expr& expr) { return num_rows(expr.first); } template -std::size_t inline num_cols(const mat_mat_ele_times_expr& expr) +std::size_t inline num_cols(const mat_mat_ele_times_expr& expr) { return num_cols(expr.second); } template -std::size_t inline size(const mat_mat_ele_times_expr& expr) +std::size_t inline size(const mat_mat_ele_times_expr& expr) { return num_rows(expr) * num_cols(expr); } }} // Namespace mtl::matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_minus_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_minus_expr.hpp index 81600ac8..96ba833f 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_minus_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_minus_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_MAT_MINUS_EXPR_INCLUDE @@ -21,7 +21,7 @@ namespace mtl {namespace matrix { template -struct mat_mat_minus_expr +struct mat_mat_minus_expr : public mat_mat_op_expr< E1, E2, mtl::sfunctor::minus >, public mat_expr< mat_mat_minus_expr > { @@ -29,7 +29,7 @@ struct mat_mat_minus_expr typedef mat_expr< mat_mat_minus_expr > crtp_base; typedef E1 first_argument_type ; typedef E2 second_argument_type ; - + mat_mat_minus_expr( E1 const& v1, E2 const& v2 ) : op_base( v1, v2 ), crtp_base(*this), first(v1), second(v2) {} diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_op_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_op_expr.hpp index 737befe7..a8f62507 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_op_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_op_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_MAT_OP_EXPR_INCLUDE @@ -18,11 +18,11 @@ namespace mtl { namespace matrix { - + template struct mat_mat_op_expr - : public const_crtp_matrix_bracket< mat_mat_op_expr, - typename SFunctor::result_type, + : public const_crtp_matrix_bracket< mat_mat_op_expr, + typename SFunctor::result_type, typename E1::size_type > // : public mat_expr< mat_mat_op_expr > { @@ -38,9 +38,9 @@ struct mat_mat_op_expr typedef E1 first_argument_type ; typedef E2 second_argument_type ; - + mat_mat_op_expr( first_argument_type const& v1, second_argument_type const& v2 ) - : // expr_base( *this ), + : // expr_base( *this ), first( v1 ), second( v2 ) { #if 0 @@ -48,7 +48,7 @@ struct mat_mat_op_expr second.delay_assign(); #endif } - + void delay_assign() const {} void check_shape() const {} // consistency of shapes depend on operation @@ -71,7 +71,7 @@ struct mat_mat_op_expr template -typename mat_mat_op_expr::size_type +typename mat_mat_op_expr::size_type inline size(mat_mat_op_expr const& expr) { expr.check_shape(); @@ -79,7 +79,7 @@ inline size(mat_mat_op_expr const& expr) } template -typename mat_mat_op_expr::size_type +typename mat_mat_op_expr::size_type inline num_rows(mat_mat_op_expr const& expr) { expr.check_shape(); @@ -87,7 +87,7 @@ inline num_rows(mat_mat_op_expr const& expr) } template -typename mat_mat_op_expr::size_type +typename mat_mat_op_expr::size_type inline num_cols(mat_mat_op_expr const& expr) { expr.check_shape(); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_plus_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_plus_expr.hpp index d13b8f90..4418c9ad 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_plus_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_plus_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_MAT_PLUS_EXPR_INCLUDE @@ -20,7 +20,7 @@ namespace mtl { namespace matrix { template -struct mat_mat_plus_expr +struct mat_mat_plus_expr : public mat_mat_op_expr< E1, E2, mtl::sfunctor::plus >, public mat_expr< mat_mat_plus_expr > { @@ -28,7 +28,7 @@ struct mat_mat_plus_expr typedef mat_expr< mat_mat_plus_expr > crtp_base; typedef E1 first_argument_type ; typedef E2 second_argument_type ; - + mat_mat_plus_expr( E1 const& v1, E2 const& v2 ) : op_base( v1, v2 ), crtp_base(*this), first(v1), second(v2) {} @@ -40,7 +40,7 @@ struct mat_mat_plus_expr // Same as mat_mat_plus_expr for pair of dense matrix expressions // Future versions will probably provide more efficient implementations for it template -struct dmat_dmat_plus_expr +struct dmat_dmat_plus_expr : public mat_mat_op_expr< E1, E2, mtl::sfunctor::plus > { typedef mat_mat_op_expr< E1, E2, mtl::sfunctor::plus > base; @@ -48,7 +48,7 @@ struct dmat_dmat_plus_expr : base( v1, v2 ) {} }; - + template struct mv_mv_plus_expr : mat_mat_plus_expr diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_times_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_times_expr.hpp index 0722424d..a4323eeb 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_times_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_mat_times_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_MAT_TIMES_EXPR_INCLUDE @@ -35,7 +35,7 @@ namespace mtl { namespace matrix { template -struct mat_mat_times_expr +struct mat_mat_times_expr : public mat_mat_op_expr< E1, E2, mtl::sfunctor::times::value_type, typename Collection::value_type> >, public mat_expr< mat_mat_times_expr > { @@ -52,17 +52,17 @@ struct mat_mat_times_expr typedef typename Collection::value_type first_value_type; typedef typename Collection::value_type second_value_type; typedef typename Multiplicable::result_type result_value_type; - + #if 0 // Just an idea typedef typename boost::mpl::if_< boost::mpl::and_< boost::is_base_of::type> , boost::is_base_of::type> - > + > , compressed2D , dense2D > >::type evaluated_result_type; - + // Convert into matrix operator evaluated_result_type() const @@ -77,7 +77,7 @@ struct mat_mat_times_expr // To prevent that cout << A * B prints the element-wise product, suggestion by Hui Li // It is rather inefficient, esp. for multiple products (complexity increases with the number of arguments :-!) - // or sparse matrices. + // or sparse matrices. // Better compute your product first and print it then when compute time is an issue, // this is ONLY for convenience. result_value_type @@ -92,7 +92,7 @@ struct mat_mat_times_expr return sum; } - + result_value_type operator()(std::size_t r, std::size_t c) { @@ -104,15 +104,15 @@ struct mat_mat_times_expr }; template -std::size_t inline num_rows(const mat_mat_times_expr& expr) +std::size_t inline num_rows(const mat_mat_times_expr& expr) { return num_rows(expr.first); } template -std::size_t inline num_cols(const mat_mat_times_expr& expr) +std::size_t inline num_cols(const mat_mat_times_expr& expr) { return num_cols(expr.second); } template -std::size_t inline size(const mat_mat_times_expr& expr) +std::size_t inline size(const mat_mat_times_expr& expr) { return num_rows(expr) * num_cols(expr); } }} // Namespace mtl::matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_negate_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_negate_expr.hpp index eed94fca..ae40cf61 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_negate_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/mat_negate_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_NEGATE_EXPR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/morton_dense.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/morton_dense.hpp index f65a876a..7cdc3291 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/morton_dense.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/morton_dense.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MORTON_DENSE_INCLUDE @@ -46,10 +46,10 @@ struct morton_dense_key { typedef std::size_t size_type; typedef dilated_int dilated_row_t; - typedef dilated_int dilated_col_t; + typedef dilated_int dilated_col_t; typedef morton_dense_key self; - morton_dense_key(size_type my_row, size_type my_col) + morton_dense_key(size_type my_row, size_type my_col) : my_row(my_row), my_col(my_col), dilated_row(my_row), dilated_col(my_col) {} @@ -97,23 +97,23 @@ struct morton_dense_key } public: - size_type my_row, my_col; + size_type my_row, my_col; dilated_row_t dilated_row; - dilated_col_t dilated_col; + dilated_col_t dilated_col; }; template -struct morton_dense_el_cursor +struct morton_dense_el_cursor : public morton_dense_key { typedef std::size_t size_type; - typedef dilated_int dilated_col_t; + typedef dilated_int dilated_col_t; typedef morton_dense_el_cursor self; typedef morton_dense_key base; typedef base key_type; - morton_dense_el_cursor(size_type my_row, size_type my_col, size_type num_cols) - : base(my_row, my_col), num_cols(num_cols) + morton_dense_el_cursor(size_type my_row, size_type my_col, size_type num_cols) + : base(my_row, my_col), num_cols(num_cols) {} self& operator++ () @@ -141,7 +141,7 @@ protected: }; template -struct morton_dense_row_cursor +struct morton_dense_row_cursor : public morton_dense_key { typedef std::size_t size_type; @@ -149,7 +149,7 @@ struct morton_dense_row_cursor typedef morton_dense_key base; typedef base key_type; - morton_dense_row_cursor(size_type my_row, size_type my_col) + morton_dense_row_cursor(size_type my_row, size_type my_col) : base(my_row, my_col) {} @@ -159,7 +159,7 @@ struct morton_dense_row_cursor return *this; } - self& operator+=(int inc) + self& operator+=(int inc) { this->advance_row(inc); return *this; @@ -171,7 +171,7 @@ struct morton_dense_row_cursor return *this; } - self& operator-=(int dec) + self& operator-=(int dec) { this->advance_row(-dec); return *this; @@ -196,7 +196,7 @@ struct morton_dense_row_cursor }; template -struct morton_dense_col_cursor +struct morton_dense_col_cursor : public morton_dense_key { typedef std::size_t size_type; @@ -204,7 +204,7 @@ struct morton_dense_col_cursor typedef morton_dense_key base; typedef base key_type; - morton_dense_col_cursor(size_type my_row, size_type my_col) + morton_dense_col_cursor(size_type my_row, size_type my_col) : base(my_row, my_col) {} @@ -214,7 +214,7 @@ struct morton_dense_col_cursor return *this; } - self& operator+=(int inc) + self& operator+=(int inc) { this->advance_col(inc); return *this; @@ -226,7 +226,7 @@ struct morton_dense_col_cursor return *this; } - self& operator-=(int dec) + self& operator-=(int dec) { this->advance_col(-dec); return *this; @@ -262,7 +262,7 @@ struct morton_dense_row_const_iterator typedef typename Matrix::value_type value_type; typedef typename Matrix::size_type size_type; typedef utilities::const_iterator_adaptor base; - + morton_dense_row_const_iterator(const Matrix& matrix, size_type row, size_type col) : base(map_type(matrix), cursor_type(row, col)) {} @@ -280,7 +280,7 @@ struct morton_dense_row_iterator typedef typename Matrix::value_type value_type; typedef typename Matrix::size_type size_type; typedef utilities::iterator_adaptor base; - + morton_dense_row_iterator(Matrix& matrix, size_type row, size_type col) : base(map_type(matrix), cursor_type(row, col)) {} @@ -298,7 +298,7 @@ struct morton_dense_col_const_iterator typedef typename Matrix::value_type value_type; typedef typename Matrix::size_type size_type; typedef utilities::const_iterator_adaptor base; - + morton_dense_col_const_iterator(const Matrix& matrix, size_type row, size_type col) : base(map_type(matrix), cursor_type(row, col)) {} @@ -316,17 +316,17 @@ struct morton_dense_col_iterator typedef typename Matrix::value_type value_type; typedef typename Matrix::size_type size_type; typedef utilities::iterator_adaptor base; - + morton_dense_col_iterator(Matrix& matrix, size_type row, size_type col) - : base(map_type(matrix), cursor_type(row, col)) {} + : base(map_type(matrix), cursor_type(row, col)) {} }; -/// Dense Morton-order matrix +/// Dense Morton-order matrix template > -class morton_dense - : public base_sub_matrix, +class morton_dense + : public base_sub_matrix, public mtl::detail::contiguous_memory_block, public crtp_base_matrix< morton_dense, Elt, std::size_t >, public mat_expr< morton_dense > @@ -353,13 +353,13 @@ class morton_dense // also, morton indexer? typedef morton_dense_key key_type; - typedef morton_dense_el_cursor el_cursor_type; - + typedef morton_dense_el_cursor el_cursor_type; + typedef dilated_int dilated_row_t; - typedef dilated_int dilated_col_t; + typedef dilated_int dilated_col_t; protected: - + // ranges of rows and columns dilated_row_t my_begin_row, my_end_row; dilated_col_t my_begin_col, my_end_col; @@ -376,7 +376,7 @@ class morton_dense // Set ranges to a num_row x num_col matrix, keeps indexing void set_ranges(size_type num_rows, size_type num_cols) { - set_ranges(this->begin_row(), this->begin_row() + num_rows, + set_ranges(this->begin_row(), this->begin_row() + num_rows, this->begin_col(), this->begin_col() + num_cols); } @@ -395,50 +395,50 @@ class morton_dense } /// Construction from run-time dimension type - explicit morton_dense(mtl::non_fixed::dimensions d) + explicit morton_dense(mtl::non_fixed::dimensions d) : memory_base(memory_need(d.num_rows(), d.num_cols())) { init(d.num_rows(), d.num_cols()); } /// Construction of matrix of dimension \p num_rows by \p num_cols - morton_dense(size_type num_rows, size_type num_cols) + morton_dense(size_type num_rows, size_type num_cols) : memory_base(memory_need(num_rows, num_cols)) { init(num_rows, num_cols); } /// Construction of matrix with dimension \p d using pointer \p a to external data - explicit morton_dense(mtl::non_fixed::dimensions d, value_type* a) + explicit morton_dense(mtl::non_fixed::dimensions d, value_type* a) : memory_base(a, memory_need(d.num_rows(), d.num_cols())) - { + { set_ranges(d.num_rows(), d.num_cols()); } /// Construction of \p num_rows by \p num_cols matrix with pointer \p a to external data - explicit morton_dense(size_type num_rows, size_type num_cols, value_type* a) + explicit morton_dense(size_type num_rows, size_type num_cols, value_type* a) : memory_base(a, memory_need(num_rows, num_cols)) - { + { set_ranges(num_rows, num_cols); } /// Construction of matrix with static dimension using pointer \p a to external data - explicit morton_dense(value_type* a) + explicit morton_dense(value_type* a) : memory_base(a, memory_need(dim_type().num_rows(), dim_type().num_cols())) - { + { BOOST_ASSERT((dim_type::is_static)); set_ranges(dim_type().num_rows(), dim_type().num_cols()); } /// Copy constructor - morton_dense(const self& m) + morton_dense(const self& m) : super(m), memory_base(m) { set_ranges(m.num_rows(), m.num_cols()); } /// Clone constructor - explicit morton_dense(const self& m, clone_ctor) + explicit morton_dense(const self& m, clone_ctor) : memory_base(m, clone_ctor()) { init(m.num_rows(), m.num_cols()); @@ -447,7 +447,7 @@ class morton_dense /// Templated copy constructor template - explicit morton_dense(const MatrixSrc& src) + explicit morton_dense(const MatrixSrc& src) : memory_base(memory_need(dim_type().num_rows(), dim_type().num_cols())) { init(dim_type().num_rows(), dim_type().num_cols()); @@ -455,11 +455,11 @@ class morton_dense } #if defined(MTL_WITH_INITLIST) && defined(MTL_WITH_AUTO) && defined(MTL_WITH_RANGEDFOR) - /// Constructor for initializer list \p values + /// Constructor for initializer list \p values template morton_dense(std::initializer_list > values) : super(mtl::non_fixed::dimensions(values.size(), values.size()? values.begin()->size() : 0)), - memory_base(this->num_rows() * this->num_cols()) + memory_base(this->num_rows() * this->num_cols()) { init(this->num_rows(), this->num_cols()); *this= values; @@ -473,19 +473,19 @@ class morton_dense : memory_base(matrix.data, memory_need(end_r - begin_r, end_c - begin_c), true) // View constructor { matrix.check_ranges(begin_r, end_r, begin_c, end_c); - + if (begin_r >= end_r || begin_c >= end_c) { set_ranges(0, 0); return; } - + // Check whether sub-matrix is contigous memory block // by comparing the address of the last and the first element in the entire and the sub-matrix - MTL_DEBUG_THROW_IF(&matrix[end_r-1][end_c-1] - &matrix[begin_r][begin_c] + MTL_DEBUG_THROW_IF(&matrix[end_r-1][end_c-1] - &matrix[begin_r][begin_c] != &matrix[end_r-begin_r-1][end_c-begin_c-1] - &matrix[0][0], range_error("This sub-matrix cannot be used because it is split in memory")); // Check with David if this is a sufficient condition (it is a necessary at least) - + dilated_row_t dilated_row(begin_r); dilated_col_t dilated_col(begin_c); @@ -555,7 +555,7 @@ class morton_dense return *this; } #endif - + using assign_base::operator=; @@ -590,7 +590,7 @@ class morton_dense { this->my_nnz = this->num_rows() * this->num_cols(); } - + size_type memory_need(size_type rows, size_type cols) { dilated_row_t n_rows(rows - 1); @@ -605,7 +605,7 @@ class morton_dense swap(static_cast(matrix1), static_cast(matrix2)); } - template friend struct sub_matrix_t; + template friend struct sub_matrix_t; }; @@ -686,12 +686,12 @@ namespace mtl { namespace traits { template struct range_generator > - : detail::all_rows_range_generator, complexity_classes::linear_cached> + : detail::all_rows_range_generator, complexity_classes::linear_cached> {}; - // For a cursor pointing to some row give the range of elements in this row + // For a cursor pointing to some row give the range of elements in this row template - struct range_generator, glas::tag::row, 2> > { typedef morton_dense matrix; @@ -700,7 +700,7 @@ namespace mtl { namespace traits { typedef complexity_classes::linear_cached complexity; static int const level = 1; typedef morton_dense_col_cursor type; - + type begin(cursor const& c) const { return type(c.key, c.ref.begin_col()); @@ -716,20 +716,20 @@ namespace mtl { namespace traits { }; template - struct range_generator, glas::tag::row, 2> > - : range_generator, glas::tag::row, 2> > {}; template struct range_generator > - : detail::all_cols_range_generator, complexity_classes::linear_cached> + : detail::all_cols_range_generator, complexity_classes::linear_cached> {}; - // For a cursor pointing to some row give the range of elements in this row + // For a cursor pointing to some row give the range of elements in this row template - struct range_generator, glas::tag::col, 2> > { typedef morton_dense matrix; @@ -738,7 +738,7 @@ namespace mtl { namespace traits { typedef complexity_classes::linear_cached complexity; static int const level = 1; typedef morton_dense_row_cursor type; - + type begin(cursor const& c) { return type(c.ref.begin_row(), c.key); @@ -754,9 +754,9 @@ namespace mtl { namespace traits { }; template - struct range_generator, glas::tag::col, 2> > - : range_generator, glas::tag::col, 2> > {}; @@ -782,26 +782,26 @@ namespace mtl { namespace traits { typedef typename boost::mpl::if_< boost::is_same , typename boost::mpl::if_c< - is_const + is_const , morton_dense_col_const_iterator , morton_dense_col_iterator >::type , typename boost::mpl::if_c< - is_const + is_const , morton_dense_row_const_iterator , morton_dense_row_iterator >::type - >::type type; + >::type type; private: - typedef typename boost::mpl::if_c::type mref_type; + typedef typename boost::mpl::if_c::type mref_type; type begin_dispatch(cursor const& c, glas::tag::row) { return type(const_cast(c.ref), c.key, c.ref.begin_col()); } - + type end_dispatch(cursor const& c, glas::tag::row) { return type(const_cast(c.ref), c.key, c.ref.end_col()); @@ -827,32 +827,32 @@ namespace mtl { namespace traits { type end(cursor const& c) { return end_dispatch(c, OuterTag()); - } + } }; } // namespace detail - + template - struct range_generator, OuterTag, 2> > : public detail::morton_dense_iterator_range_generator, false> {}; template - struct range_generator, OuterTag, 2> > : public detail::morton_dense_iterator_range_generator, false> {}; template - struct range_generator, OuterTag, 2> > : public detail::morton_dense_iterator_range_generator, true> {}; template - struct range_generator, OuterTag, 2> > : public detail::morton_dense_iterator_range_generator, true> {}; @@ -874,7 +874,7 @@ namespace mtl { namespace matrix { typedef matrix_type sub_matrix_type; typedef matrix_type const const_sub_matrix_type; typedef typename matrix_type::size_type size_type; - + sub_matrix_type operator()(matrix_type& matrix, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { return sub_matrix_type(matrix, morton_dense_sub_ctor(), begin_r, end_r, begin_c, end_c); @@ -886,9 +886,9 @@ namespace mtl { namespace matrix { // To minimize code duplication, we use the non-const version sub_matrix_type tmp((*this)(const_cast(matrix), begin_r, end_r, begin_c, end_c)); return tmp; - } + } }; - + }} // mtl::matrix namespace mtl { @@ -898,7 +898,7 @@ namespace mtl { // Enable cloning of dense matrices template struct is_clonable< matrix::morton_dense > : boost::mpl::true_ {}; - + } // namespace mtl #endif // MTL_MORTON_DENSE_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector.hpp index 45a78b87..d27a4c22 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_MULTI_VECTOR_INCLUDE @@ -33,7 +33,7 @@ namespace mtl { namespace matrix { - + // Might need to be defined later struct multi_vector_key {}; @@ -41,9 +41,9 @@ struct multi_vector_key {}; template class multi_vector : public base_matrix::value_type, parameters<> >, - public crtp_base_matrix< multi_vector, typename Collection::value_type, + public crtp_base_matrix< multi_vector, typename Collection::value_type, typename Collection::size_type>, - public mat_expr< multi_vector > + public mat_expr< multi_vector > { typedef base_matrix::value_type, parameters<> > super; @@ -72,7 +72,7 @@ class multi_vector data[i]= Vector(num_rows); master= 0; } - + void setup_data(size_type num_rows, size_type num_cols, boost::mpl::true_) { master= new Vector(num_rows * num_cols); @@ -122,7 +122,7 @@ class multi_vector /// Change dimension, can keep old data void change_dim(size_type r, size_type c) { - if (r == super::num_rows() && c == super::num_cols()) return; + if (r == super::num_rows() && c == super::num_cols()) return; super::change_dim(r, c); data.change_dim(c); change_dim(r, c, mtl::traits::is_composable_vector()); @@ -137,7 +137,7 @@ class multi_vector void self_assignment(const self& src, boost::mpl::true_) { *master= *src.master; } - /// Copy constructor + /// Copy constructor /** Explicitly needed now. **/ self& operator=(const self& src) { @@ -147,13 +147,13 @@ class multi_vector } // Todo: multi_vector with other matrix expressions - /// Assign multi_vector and expressions thereof, general matrices currently not allowed + /// Assign multi_vector and expressions thereof, general matrices currently not allowed template typename boost::enable_if_c::value && !mtl::traits::is_fast_multi_vector_expr::value, self&>::type operator=(const Src& src) { - MTL_THROW_IF((mtl::matrix::num_rows(src) != super::num_rows() + MTL_THROW_IF((mtl::matrix::num_rows(src) != super::num_rows() || mtl::matrix::num_cols(src) != super::num_cols()), incompatible_size()); for (std::size_t i= 0, n= super::num_cols(); i < n; ++i) vector(i)= src.vector(i); @@ -171,14 +171,14 @@ class multi_vector } template - typename boost::enable_if_c::value + typename boost::enable_if_c::value && !mtl::traits::is_multi_vector_expr::value, self&>::type operator=(const Src& src) { assign_base::operator=(src); return *this; } - + /// Assign scalar template typename boost::enable_if, self&>::type @@ -202,7 +202,7 @@ class multi_vector inline friend const Vector& make_fast_multi_vector_expr(const self& mv) { assert(mv.master); return *mv.master; } inline friend Vector& make_fast_multi_vector_expr(self& mv) { assert(mv.master); return *mv.master; } - protected: + protected: mtl::vector::dense_vector > data; Vector* master; }; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector_range.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector_range.hpp index 94048f8f..9a71fd94 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector_range.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/multi_vector_range.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_MULTI_VECTOR_RANGE_INCLUDE @@ -42,7 +42,7 @@ class multi_vector_range /// Size as defined by number of rows times columns friend size_type size(const self& A) { return num_rows(A) * num_cols(A); } - protected: + protected: const multi_vector& ref; const irange r; }; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/operators.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/operators.hpp index aaf155b5..a46ce837 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/operators.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/operators.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_OPERATORS_INCLUDE @@ -30,7 +30,7 @@ inline mat_mat_plus_expr operator+ (const mat_expr& e1, const mat_expr& e2) { // do not add matrices with inconsistent value types - MTL_STATIC_ASSERT((boost::is_same::type, + MTL_STATIC_ASSERT((boost::is_same::type, typename ashape::ashape::type>::value), "Matrices have not consistent algebraic shape (i.e. nested types)."); return mat_mat_plus_expr(static_cast(e1), static_cast(e2)); } @@ -58,7 +58,7 @@ inline dmat_dmat_plus_expr operator+ (const dmat_expr& e1, const dmat_expr& e2) { // do not add matrices with inconsistent value types - MTL_STATIC_ASSERT((boost::is_same::type, + MTL_STATIC_ASSERT((boost::is_same::type, typename ashape::ashape::type>::value), "Matrices have not consistent algebraic shape (i.e. nested types)."); return dmat_dmat_plus_expr(static_cast(e1), static_cast(e2)); } @@ -70,7 +70,7 @@ inline mat_mat_minus_expr operator- (const mat_expr& e1, const mat_expr& e2) { // do not add matrices with inconsistent value types - MTL_STATIC_ASSERT((boost::is_same::type, + MTL_STATIC_ASSERT((boost::is_same::type, typename ashape::ashape::type>::value), "Matrices have not consistent algebraic shape (i.e. nested types)."); return mat_mat_minus_expr(static_cast(e1), static_cast(e2)); } @@ -88,7 +88,7 @@ inline mat_mat_ele_times_expr ele_prod(const mat_expr& e1, const mat_expr& e2) { // do not multiply matrices element-wise with inconsistent value types - MTL_STATIC_ASSERT((boost::is_same::type, + MTL_STATIC_ASSERT((boost::is_same::type, typename ashape::ashape::type>::value), "Matrices do not have consistent algebraic shape (i.e. nested types)."); return mat_mat_ele_times_expr(static_cast(e1), static_cast(e2)); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/parameter.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/parameter.hpp index 552eaf54..8e699002 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/parameter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/parameter.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_PARAMETERS_INCLUDE @@ -26,12 +26,12 @@ namespace mtl { namespace matrix { \sa \ref matrix_parameters \sa \ref tuning_fsize \sa \ref tuning_sizetype **/ -template ::value, typename SizeType= std::size_t> -struct parameters +struct parameters { typedef Orientation orientation; typedef Index index; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/permutation.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/permutation.hpp index 77f7ad1b..14d17c31 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/permutation.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/permutation.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_PERMUTATION_INCLUDE @@ -22,7 +22,7 @@ namespace mtl { namespace matrix { namespace traits { //\ Return type of mtl::matrix::permutation - // Only for completeness + // Only for completeness template struct permutation { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/poisson2D_dirichlet.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/poisson2D_dirichlet.hpp index 4698b0ea..44940905 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/poisson2D_dirichlet.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/poisson2D_dirichlet.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MATRIX_POISSON2D_DIRICHLET_INCLUDE @@ -40,30 +40,30 @@ struct poisson2D_dirichlet int kmax= i * n + nb; for (int k= i * n + 1; k < kmax; k+= 4) { typename Collection::value_type const v0= v[k], v1= v[k+1], v2= v[k+2], v3= v[k+3]; - Assign::apply(w[k], 4 * v0 - v[k-n] - v[k+n] - v[k-1] - v1); - Assign::apply(w[k+1], 4 * v1 - v[k-n+1] - v[k+n+1] - v0 - v2); - Assign::apply(w[k+2], 4 * v2 - v[k-n+2] - v[k+n+2] - v1 - v3); - Assign::apply(w[k+3], 4 * v3 - v[k-n+3] - v[k+n+3] - v2 - v[k+4]); + Assign::apply(w[k], 4 * v0 - v[k-n] - v[k+n] - v[k-1] - v1); + Assign::apply(w[k+1], 4 * v1 - v[k-n+1] - v[k+n+1] - v0 - v2); + Assign::apply(w[k+2], 4 * v2 - v[k-n+2] - v[k+n+2] - v1 - v3); + Assign::apply(w[k+3], 4 * v3 - v[k-n+3] - v[k+n+3] - v2 - v[k+4]); } - for (int j= nb, k= i * n + j; j < n-1; j++, k++) - Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k+n] - v[k-1] - v[k+1]); + for (int j= nb, k= i * n + j; j < n-1; j++, k++) + Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k+n] - v[k-1] - v[k+1]); } - + // Upper border - for (int j= 1; j < n-1; j++) + for (int j= 1; j < n-1; j++) Assign::apply(w[j], 4 * v[j] - v[j+n] - v[j-1] - v[j+1]); // Lower border - for (int j= 1, k= (m-1) * n + j; j < n-1; j++, k++) - Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k-1] - v[k+1]); - + for (int j= 1, k= (m-1) * n + j; j < n-1; j++, k++) + Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k-1] - v[k+1]); + // Left border for (int i= 1, k= n; i < m-1; i++, k+= n) - Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k+n] - v[k+1]); + Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k+n] - v[k+1]); // Right border for (int i= 1, k= n+n-1; i < m-1; i++, k+= n) - Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k+n] - v[k-1]); + Assign::apply(w[k], 4 * v[k] - v[k-n] - v[k+n] - v[k-1]); // Corners Assign::apply(w[0], 4 * v[0] - v[1] - v[n]); @@ -86,7 +86,7 @@ inline std::size_t num_cols(const poisson2D_dirichlet& A) { return A.s; } ///< N }} // namespace mtl::matrix -namespace mtl { +namespace mtl { template <> struct Collection @@ -96,7 +96,7 @@ namespace mtl { }; namespace ashape { - template <> struct ashape_aux + template <> struct ashape_aux { typedef nonscal type; }; } } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder.hpp index 2a659848..5f515871 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_REORDER_INCLUDE @@ -22,10 +22,10 @@ namespace mtl { namespace matrix { - + namespace traits { - /// Return type of mtl::matrix::reorder + /// Return type of mtl::matrix::reorder template struct reorder { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_matrix_rows.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_matrix_rows.hpp index bbc6f87b..23fbb7d4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_matrix_rows.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_matrix_rows.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_REORDER_MATRIX_ROWS_INCLUDE @@ -28,19 +28,19 @@ Matrix reorder_matrix_rows(const ReorderVector& v, const Matrix& A) { using mtl::size; - typename mtl::traits::col::type col(A); - typename mtl::traits::const_value::type value(A); - typedef typename mtl::traits::range_generator::type cursor_type; + typename mtl::traits::col::type col(A); + typename mtl::traits::const_value::type value(A); + typedef typename mtl::traits::range_generator::type cursor_type; typedef typename mtl::traits::range_generator::type icursor_type; typedef typename mtl::Collection::size_type size_type; - + Matrix B(size(v), num_cols(A)); - + inserter ins(B, size_type(B.nnz() / num_cols(B) * 1.2)); - + for (std::size_t i= 0; i < size(v); i++) { - cursor_type cursor(v[i], A); // go to row given by reorder - for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) + cursor_type cursor(v[i], A); // go to row given by reorder + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) ins[i][col(*icursor)] << value(*icursor); } return B; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_ref.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_ref.hpp index 94aa8e5f..9e0e865d 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_ref.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/reorder_ref.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_REORDER_REF_INCLUDE @@ -36,7 +36,7 @@ void reorder_ref(const ReorderVector& v, Matrix& A, std::size_t cols= 0) std::size_t s= mtl::size(v), my_max= std::size_t(*std::max_element(&v[0], &v[0] + s)) + 1; - if (cols == 0) + if (cols == 0) cols= my_max; else MTL_THROW_IF(my_max > cols, range_error("Too large value in reorder vector")); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/shifted_inserter.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/shifted_inserter.hpp index 4878a602..478955b0 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/shifted_inserter.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/shifted_inserter.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_SHIFTED_INSERTER_INCLUDE @@ -21,7 +21,7 @@ namespace mtl { namespace matrix { /// Inserter with shifted row and column indices /** The main work is performed by the underlying base inserter whose type is given as template argument. **/ -template +template class shifted_inserter { public: @@ -45,21 +45,21 @@ class shifted_inserter struct bracket_proxy { bracket_proxy(BaseInserter& ref, size_type row, size_type col_offset) : ref(ref), row(row), col_offset(col_offset) {} - + proxy_type operator[](size_type col) { return proxy_type(ref, row, col+col_offset); } BaseInserter& ref; size_type row, col_offset; }; - + public: /// To be used in ins[r][c] << value; - bracket_proxy operator[] (size_type row) - { return bracket_proxy(ins, row+row_offset, col_offset); } + bracket_proxy operator[] (size_type row) + { return bracket_proxy(ins, row+row_offset, col_offset); } /// To be used in ins(r, c) << value; - proxy_type operator() (size_type row, size_type col) + proxy_type operator() (size_type row, size_type col) { return proxy_type(ins, row+row_offset, col+col_offset); } // update, modify and operator<< are used from BaseInserter diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/sparse_banded.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/sparse_banded.hpp index 07d7184b..011ccf2a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/sparse_banded.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/sparse_banded.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MATRIX_SPARSE_BANDED_INCLUDE @@ -54,7 +54,7 @@ class sparse_banded typedef crtp_matrix_assign assign_base; /// Construct matrix of dimension \p nr by \p nc - explicit sparse_banded(size_type nr= 0, size_type nc= 0) + explicit sparse_banded(size_type nr= 0, size_type nc= 0) : super(non_fixed::dimensions(nr, nc)), data(0), inserting(false) {} @@ -69,7 +69,7 @@ class sparse_banded void check(size_type MTL_DEBUG_ARG(r), size_type MTL_DEBUG_ARG(c)) const { check(); - MTL_DEBUG_THROW_IF(is_negative(r) || r >= this->num_rows() + MTL_DEBUG_THROW_IF(is_negative(r) || r >= this->num_rows() || is_negative(c) || c >= this->num_cols(), index_out_of_range()); } @@ -82,7 +82,7 @@ class sparse_banded } /// Change dimension to \p r by \p c; deletes all entries - void change_dim(size_type r, size_type c) + void change_dim(size_type r, size_type c) { make_empty(); super::change_dim(r, c); @@ -107,7 +107,7 @@ class sparse_banded /// L-value reference of stored matrix entry /** To be used with care; in debug mode, exception is thrown if entry is not found **/ - value_type& lvalue(size_type r, size_type c) + value_type& lvalue(size_type r, size_type c) { utilities::maybe o= offset(r, c); MTL_DEBUG_THROW_IF(!o, runtime_error("Entry doesn't exist.")); @@ -178,7 +178,7 @@ struct sparse_banded_inserter struct bracket_proxy { bracket_proxy(self& ref, size_type row) : ref(ref), row(row) {} - + proxy_type operator[](size_type col) { return proxy_type(ref, row, col); } self& ref; @@ -191,7 +191,7 @@ struct sparse_banded_inserter // empty vector and entry at the end diagonals.push_back(std::vector(num_rows(A), Value(0))); A.bands.push_back(dia); - + for (size_type i= diagonals.size() - 1; i > dia_band; i--) { swap(diagonals[i-1], diagonals[i]); swap(A.bands[i-1], A.bands[i]); @@ -200,7 +200,7 @@ struct sparse_banded_inserter public: /// Construct inserter for matrix \p A; second argument for slot_size ignored - sparse_banded_inserter(matrix_type& A, size_type) : A(A) + sparse_banded_inserter(matrix_type& A, size_type) : A(A) { MTL_THROW_IF(A.inserting, runtime_error("Two inserters on same matrix")); MTL_THROW_IF(A.data, runtime_error("Inserter does not support modifications yet.")); @@ -234,7 +234,7 @@ struct sparse_banded_inserter template void modify(size_type row, size_type col, Value val) { - MTL_DEBUG_THROW_IF(is_negative(row) || row >= num_rows(A) || is_negative(col) || col >= num_cols(A), + MTL_DEBUG_THROW_IF(is_negative(row) || row >= num_rows(A) || is_negative(col) || col >= num_cols(A), index_out_of_range()); const band_size_type dia= col - row; const size_type dia_band= A.find_dia(dia); @@ -264,8 +264,8 @@ struct sparse_banded_key typedef std::size_t size_t; typedef sparse_banded_key self; typedef mtl::matrix::sparse_banded matrix_type; - - explicit sparse_banded_key(const matrix_type& A, size_t offset) + + explicit sparse_banded_key(const matrix_type& A, size_t offset) : A(A), offset(offset) {} bool operator== (sparse_banded_key const& other) const { return offset == other.offset; } @@ -277,14 +277,14 @@ struct sparse_banded_key // Cursor over every element template -struct sparse_banded_cursor +struct sparse_banded_cursor : public sparse_banded_key { typedef sparse_banded_key base; typedef mtl::matrix::sparse_banded matrix_type; typedef sparse_banded_cursor self; - explicit sparse_banded_cursor(const matrix_type& A, size_t offset) + explicit sparse_banded_cursor(const matrix_type& A, size_t offset) : base(A, offset) {} self& operator++() { ++this->offset; return *this; } @@ -322,7 +322,7 @@ namespace mtl { namespace traits { {}; template - struct range_generator, glas::tag::row, 2> > { typedef typename Parameters::size_type size_type; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_lower.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_lower.hpp index 18e2ef93..c1ae9c38 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_lower.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_lower.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_STRICT_LOWER_INCLUDE @@ -25,7 +25,7 @@ namespace traits { } /// Strict lower triangular matrix -template +template typename traits::strict_lower::type inline strict_lower(const Matrix& A) { @@ -33,7 +33,7 @@ inline strict_lower(const Matrix& A) } /// Triangle-lower starting at off-diagonoal \p d (for compatibility with matlib) -template +template typename traits::strict_lower::type inline tril(const Matrix& A, long d= 0) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_upper.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_upper.hpp index 096115eb..1fd1454a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_upper.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/strict_upper.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_STRICT_UPPER_INCLUDE @@ -27,7 +27,7 @@ namespace traits { } /// Strict upper triangle matrix -template +template typename traits::strict_upper::type inline strict_upper(const Matrix& A) { @@ -35,7 +35,7 @@ inline strict_upper(const Matrix& A) } /// Triangle-upper starting at off-diagonoal \p d (for compatibility with matlib) -template +template typename traits::strict_upper::type inline triu(const Matrix& A, long d= 0) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/transposed_view.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/transposed_view.hpp index 348b8e06..cc4d9095 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/transposed_view.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/transposed_view.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_TRANSPOSED_VIEW_INCLUDE @@ -31,13 +31,13 @@ namespace mtl { namespace matrix { -template -struct transposed_view +template +struct transposed_view : public boost::mpl::if_< boost::is_const - , const_crtp_base_matrix< const transposed_view, + , const_crtp_base_matrix< const transposed_view, typename Matrix::value_type, typename Matrix::size_type > - , crtp_base_matrix< transposed_view, + , crtp_base_matrix< transposed_view, typename Matrix::value_type, typename Matrix::size_type > >::type, public matrix::mat_expr< transposed_view > @@ -68,10 +68,10 @@ struct transposed_view transposed_view (ref_type ref) : ref(ref) {} - + transposed_view (const boost::shared_ptr& p) : my_copy(p), ref(*p) {} -#ifdef MTL_WITH_CPP11_MOVE +#ifdef MTL_WITH_CPP11_MOVE transposed_view (self&& that) : my_copy(std::move(that.my_copy)), ref(that.ref) {} transposed_view (const self& that) : ref(that.ref) { assert(that.my_copy.use_count() == 0); } #endif @@ -84,30 +84,30 @@ struct transposed_view size_type dim1() const { return ref.dim2(); } size_type dim2() const { return ref.dim1(); } - - dim_type dimensions() const + + dim_type dimensions() const { return ref.dimensions().transpose(); } size_type begin_row() const { return ref.begin_col(); } - size_type end_row() const { return ref.end_col(); } + size_type end_row() const { return ref.end_col(); } size_type begin_col() const { return ref.begin_row(); } size_type end_col() const { return ref.end_row(); } size_type nnz() const { return ref.nnz(); } - friend size_type inline num_rows(const self& A) + friend size_type inline num_rows(const self& A) { using mtl::matrix::num_cols; return num_cols(A.ref); } - friend size_type inline num_cols(const self& A) + friend size_type inline num_cols(const self& A) { using mtl::matrix::num_rows; return num_rows(A.ref); } protected: boost::shared_ptr my_copy; public: ref_type ref; }; - -template + +template inline std::size_t size(const transposed_view& A) -{ - return num_rows(A.ref) * num_rows(A.ref); +{ + return num_rows(A.ref) * num_rows(A.ref); } // ========== @@ -124,7 +124,7 @@ struct sub_matrix_t< transposed_view > typedef transposed_view::sub_matrix_type> sub_matrix_type; typedef transposed_view::const_sub_matrix_type> const_sub_matrix_type; typedef typename matrix_type::size_type size_type; - + sub_matrix_type operator()(matrix_type& A, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { typedef typename sub_matrix_t::sub_matrix_type ref_sub_type; @@ -133,10 +133,10 @@ struct sub_matrix_t< transposed_view > // Submatrix of referred matrix, colums and rows interchanged // Create a submatrix, whos address will be kept by transposed_view pointer_type p(new ref_sub_type(sub_matrix(A.ref, begin_c, end_c, begin_r, end_r))); - return sub_matrix_type(p); + return sub_matrix_type(p); } - - const_sub_matrix_type operator()(matrix_type const& A, size_type begin_r, size_type end_r, + + const_sub_matrix_type operator()(matrix_type const& A, size_type begin_r, size_type end_r, size_type begin_c, size_type end_c) { typedef typename sub_matrix_t::const_sub_matrix_type ref_sub_type; @@ -145,7 +145,7 @@ struct sub_matrix_t< transposed_view > // Submatrix of referred matrix, colums and rows interchanged // Create a submatrix, whos address will be kept by transposed_view pointer_type p(new ref_sub_type(sub_matrix(A.ref, begin_c, end_c, begin_r, end_r))); - return const_sub_matrix_type(p); + return const_sub_matrix_type(p); } }; @@ -157,13 +157,13 @@ namespace mtl { namespace traits { namespace detail { - template + template struct transposed_row { typedef typename Matrix::key_type key_type; typedef typename Matrix::size_type size_type; - - transposed_row(mtl::matrix::transposed_view const& transposed_matrix) + + transposed_row(mtl::matrix::transposed_view const& transposed_matrix) : its_col(transposed_matrix.ref) {} size_type operator() (key_type const& key) const @@ -176,13 +176,13 @@ namespace mtl { namespace traits { }; - template + template struct transposed_col { typedef typename Matrix::key_type key_type; typedef typename Matrix::size_type size_type; - - transposed_col(mtl::matrix::transposed_view const& transposed_matrix) + + transposed_col(mtl::matrix::transposed_view const& transposed_matrix) : its_row(transposed_matrix.ref) {} size_type operator() (key_type const& key) const @@ -193,29 +193,29 @@ namespace mtl { namespace traits { protected: typename row::type>::type its_row; }; - + } // namespace detail - - template + + template struct row > { typedef detail::transposed_row type; }; - template + template struct col > { typedef detail::transposed_col type; }; - template + template struct const_value > { typedef mtl::detail::const_value_from_other > type; }; - template + template struct value > { typedef mtl::detail::value_from_other > type; @@ -247,12 +247,12 @@ namespace mtl { namespace traits { }; // If considered range_generator for Matrix isn't supported, i.e. has infinite complexity - // then define as unsupported for transposed view + // then define as unsupported for transposed view // (range_transposer_impl wouldn't compile in this case) template struct range_transposer : boost::mpl::if_< - boost::is_same::type>::complexity, + boost::is_same::type>::complexity, complexity_classes::infinite> , range_generator , range_transposer_impl @@ -284,7 +284,7 @@ namespace mtl { namespace traits { : detail::range_transposer {}; - + }} // namespace mtl::traits diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/upper.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/upper.hpp index 8b7dafc5..49fa10d4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/upper.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/upper.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_UPPER_INCLUDE @@ -28,7 +28,7 @@ namespace traits { } /// Upper triangular matrix -template +template typename traits::upper::type inline upper(const Matrix& A) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/view_ref.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/view_ref.hpp index ec5e2623..a7ea070b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/view_ref.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/matrix/view_ref.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MATRIX_VIEW_REF_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/mtl.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/mtl.hpp index 35271678..500551fd 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/mtl.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/mtl.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MTL_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/mtl_fwd.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/mtl_fwd.hpp index f47d4b67..a5d5563b 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/mtl_fwd.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/mtl_fwd.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MTL_FWD_INCLUDE @@ -15,7 +15,7 @@ /// Main name space for %Matrix Template Library namespace mtl { - + template struct lazy_assign; template struct row_mat_cvec_index_evaluator; @@ -59,11 +59,11 @@ namespace mtl { template class dense2D; - template + template typename dense2D::size_type num_cols(const dense2D& matrix); - template + template typename dense2D::size_type num_rows(const dense2D& matrix); - template + template typename dense2D::size_type size(const dense2D& matrix); template class morton_dense; @@ -79,12 +79,12 @@ namespace mtl { template class compressed2D; - template + template typename compressed2D::size_type num_cols(const compressed2D& matrix); - template + template typename compressed2D::size_type num_rows(const compressed2D& matrix); - template - // typename compressed2D::size_type + template + // typename compressed2D::size_type std::size_t size(const compressed2D& matrix); @@ -100,13 +100,13 @@ namespace mtl { template struct ell_matrix_inserter; template struct inserter; - template class shifted_inserter; + template class shifted_inserter; template class multi_vector; template class multi_vector_range; template class element; template class element_structure; - template class implicit_dense; + template class implicit_dense; template class ones_functor; template class ones_matrix; template class hilbert_functor; @@ -115,7 +115,7 @@ namespace mtl { template class outer_product_matrix; template struct transposed_view; - + template struct mat_expr; template struct dmat_expr; template struct smat_expr; @@ -155,7 +155,7 @@ namespace mtl { //using matrix::coordinate2D; //using matrix::multi_vector; //using matrix::transposed_view; - + template struct mat_cvec_times_expr; /// Namespace for vectors and views and %operations exclusively on vectors @@ -188,7 +188,7 @@ namespace mtl { template struct rvec_mat_times_expr; template struct vec_const_ref_expr; - template class unrolled1; + template class unrolled1; template struct reduction_index_evaluator; template struct dot_index_evaluator; @@ -199,7 +199,7 @@ namespace mtl { template inline void fill(dense_vector& vector, const Value2& value); - + template typename dense_vector::size_type inline size(const dense_vector& vector); @@ -207,7 +207,7 @@ namespace mtl { template typename dense_vector::size_type inline num_rows(const dense_vector& vector); - + template typename dense_vector::size_type inline num_cols(const dense_vector& vector); @@ -215,7 +215,7 @@ namespace mtl { template std::size_t size(const strided_vector_ref& v); - template + template std::size_t size(const map_view& v); template @@ -250,7 +250,7 @@ namespace mtl { namespace non_fixed { struct dimension; } - + } //using vector::dense_vector; @@ -317,10 +317,10 @@ namespace mtl { template struct ColumnInMatrix; template struct RowInMatrix; - template typename traits::range_generator::type + template typename traits::range_generator::type begin(Collection const& c); - - template typename traits::range_generator::type + + template typename traits::range_generator::type end(Collection const& c); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjoint.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjoint.hpp index 6851abdb..05856aa8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjoint.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjoint.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ADJOINT_INCLUDE @@ -32,7 +32,7 @@ namespace traits { /// Adjoint linear operator, typically Hermitian transposed template -typename traits::adjoint::type +typename traits::adjoint::type inline adjoint(const LinOp& A) { return traits::adjoint()(A); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjust_cursor.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjust_cursor.hpp index 127f531b..3127ba58 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjust_cursor.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/adjust_cursor.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DETAIL_ADJUST_CURSOR_INCLUDE @@ -17,10 +17,10 @@ namespace mtl { namespace detail { template void inline adjust_cursor(Size diff, Cursor& c, tag::dense) { c+= diff; } - + template void inline adjust_cursor(Size diff, Cursor& c, tag::sparse) {} - + }} // namespace mtl::detail diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_each_nonzero.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_each_nonzero.hpp index a17d02f5..4761941a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_each_nonzero.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_each_nonzero.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ASSIGN_EACH_NONZERO_INCLUDE @@ -36,20 +36,20 @@ namespace mtl { namespace matrix { - /// Assign the result of \p f(i) to each non-zero i in non-constant matrix \p A + /// Assign the result of \p f(i) to each non-zero i in non-constant matrix \p A template inline void assign_each_nonzero(Matrix& m, const Functor& f) { vampir_trace<3008> tracer; - typename mtl::traits::value::type value(m); + typename mtl::traits::value::type value(m); typedef typename mtl::traits::range_generator::type cursor_type; typedef typename mtl::traits::range_generator::type icursor_type; - for (cursor_type cursor = begin(m), cend = end(m); cursor != cend; ++cursor) - for (icursor_type icursor = begin(cursor), icend = end(cursor); + for (cursor_type cursor = begin(m), cend = end(m); cursor != cend; ++cursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) - value(*icursor, f(value(*icursor))); + value(*icursor, f(value(*icursor))); } } // namespace matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_mode.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_mode.hpp index 1887f4ef..63c37442 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_mode.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/assign_mode.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ASSIGN_MODE_INCLUDE @@ -144,7 +144,7 @@ struct times_sum template static void set_empty(T& x, const U&) { - x= T(0); + x= T(0); } template @@ -180,7 +180,7 @@ struct divide_sum static void set_empty(T& x, const U& y) { MTL_DEBUG_THROW_IF(y == U(0), division_by_zero()); - x= T(0); + x= T(0); } template diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/bin_op_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/bin_op_expr.hpp index 2fac2b37..eabbda10 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/bin_op_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/bin_op_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_BIN_OP_EXPR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cholesky.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cholesky.hpp index ce11965e..af6f7e08 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cholesky.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cholesky.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CHOLESKY_INCLUDE @@ -30,15 +30,15 @@ namespace with_bracket { // ============================================================================ // Generic Cholesky factorization and operands for Cholesky on with submatrices // ============================================================================ - - template < typename Matrix > + + template < typename Matrix > void cholesky_base (Matrix & matrix) { vampir_trace<5001> tracer; typedef typename Collection::size_type size_type; for (size_type k = 0; k < matrix.num_cols(); k++) { matrix[k][k] = sqrt (matrix[k][k]); - + for (size_type i = k + 1; i < matrix.num_rows(); i++) { matrix[i][k] /= matrix[k][k]; typename Collection::value_type d = matrix[i][k]; @@ -48,34 +48,34 @@ namespace with_bracket { } } } - - - template < typename MatrixSW, typename MatrixNW > + + + template < typename MatrixSW, typename MatrixNW > void tri_solve_base(MatrixSW & SW, const MatrixNW & NW) { vampir_trace<5002> tracer; typedef typename Collection::size_type size_type; for (size_type k = 0; k < NW.num_rows (); k++) { - + for (size_type i = 0; i < SW.num_rows (); i++) { SW[i][k] /= NW[k][k]; typename MatrixSW::value_type d = SW[i][k]; - + for (size_type j = k + 1; j < SW.num_cols (); j++) SW[i][j] -= d * NW[j][k]; } } } - + // Lower(SE) -= SW * SW^T - template < typename MatrixSE, typename MatrixSW > + template < typename MatrixSE, typename MatrixSW > void tri_schur_base(MatrixSE & SE, const MatrixSW & SW) { vampir_trace<5003> tracer; typedef typename Collection::size_type size_type; for (size_type k = 0; k < SW.num_cols (); k++) - + for (size_type i = 0; i < SE.num_rows (); i++) { typename MatrixSW::value_type d = SW[i][k]; for (size_type j = 0; j <= i; j++) @@ -89,7 +89,7 @@ namespace with_bracket { { vampir_trace<5004> tracer; typedef typename Collection::size_type size_type; - for (size_type k = 0; k < NW.num_cols (); k++) + for (size_type k = 0; k < NW.num_cols (); k++) for (size_type i = 0; i < NE.num_rows (); i++) { typename MatrixNW::value_type d = NW[i][k]; for (size_type j = 0; j < NE.num_cols (); j++) @@ -101,19 +101,19 @@ namespace with_bracket { // ====================== // Corresponding functors // ====================== - + struct cholesky_base_t { - template < typename Matrix > + template < typename Matrix > void operator() (Matrix & matrix) { cholesky_base(matrix); } }; - + struct tri_solve_base_t { - template < typename MatrixSW, typename MatrixNW > + template < typename MatrixSW, typename MatrixNW > void operator() (MatrixSW & SW, const MatrixNW & NW) { tri_solve_base(SW, NW); @@ -122,7 +122,7 @@ namespace with_bracket { struct tri_schur_base_t { - template < typename MatrixSE, typename MatrixSW > + template < typename MatrixSE, typename MatrixSW > void operator() (MatrixSE & SE, const MatrixSW & SW) { tri_schur_base(SE, SW); @@ -149,7 +149,7 @@ namespace with_iterator { // CURRENTLY NOT SUPPORTED -- CAUSES SEGFAULT, e.g. with icc 11.0 in r8536 !!!! // ============================================================================ - template < typename Matrix > + template < typename Matrix > void cholesky_base (Matrix& matrix) { vampir_trace<5001> tracer; @@ -159,16 +159,16 @@ namespace with_iterator { typedef tag::iter::all all_it; typedef typename Collection::value_type value_type; - typedef typename range_generator::type cur_type; - typedef typename range_generator::type iter_type; + typedef typename range_generator::type cur_type; + typedef typename range_generator::type iter_type; typedef typename range_generator::type rcur_type; - typedef typename range_generator::type riter_type; - + typedef typename range_generator::type riter_type; + size_type k= 0; for (cur_type kb= begin(matrix), kend= end(matrix); kb != kend; ++kb, ++k) { - iter_type ib= begin(kb), iend= end(kb); + iter_type ib= begin(kb), iend= end(kb); ib+= k; // points now to matrix[k][k] value_type root= sqrt (*ib); @@ -188,8 +188,8 @@ namespace with_iterator { } } - - template < typename MatrixSW, typename MatrixNW > + + template < typename MatrixSW, typename MatrixNW > void tri_solve_base(MatrixSW & SW, const MatrixNW & NW) { vampir_trace<5002> tracer; @@ -199,21 +199,21 @@ namespace with_iterator { typedef tag::iter::all all_it; typedef tag::const_iter::all all_cit; - typedef typename range_generator::type ccur_type; - typedef typename range_generator::type citer_type; + typedef typename range_generator::type ccur_type; + typedef typename range_generator::type citer_type; typedef typename range_generator::type rcur_type; - typedef typename range_generator::type riter_type; + typedef typename range_generator::type riter_type; - for (size_type k = 0; k < NW.num_rows (); k++) + for (size_type k = 0; k < NW.num_rows (); k++) for (size_type i = 0; i < SW.num_rows (); i++) { typename MatrixSW::value_type d = SW[i][k] /= NW[k][k]; rcur_type sw_i= begin(SW); sw_i+= i; // row i riter_type it1= begin(sw_i); it1+= k+1; // SW[i][k+1] - riter_type it1end= end(sw_i); - + riter_type it1end= end(sw_i); + ccur_type nw_k= begin(NW); nw_k+= k; // column k citer_type it2= begin(nw_k); it2+= k+1; // NW[k+1][k] @@ -221,10 +221,10 @@ namespace with_iterator { *it1 = *it1 - d * *it2; } } - + // Lower(SE) -= SW * SW^T - template < typename MatrixSE, typename MatrixSW > + template < typename MatrixSE, typename MatrixSW > void tri_schur_base(MatrixSE & SE, const MatrixSW & SW) { vampir_trace<5003> tracer; @@ -234,11 +234,11 @@ namespace with_iterator { typedef tag::iter::all all_it; typedef tag::const_iter::all all_cit; - typedef typename range_generator::type ccur_type; - typedef typename range_generator::type citer_type; + typedef typename range_generator::type ccur_type; + typedef typename range_generator::type citer_type; typedef typename range_generator::type rcur_type; - typedef typename range_generator::type riter_type; + typedef typename range_generator::type riter_type; for (size_type k = 0; k < SW.num_cols (); k++) for (size_type i = 0; i < SE.num_rows (); i++) { @@ -267,13 +267,13 @@ namespace with_iterator { typedef tag::iter::all all_it; typedef tag::const_iter::all all_cit; - typedef typename range_generator::type ccur_type; - typedef typename range_generator::type citer_type; + typedef typename range_generator::type ccur_type; + typedef typename range_generator::type citer_type; typedef typename range_generator::type rcur_type; - typedef typename range_generator::type riter_type; + typedef typename range_generator::type riter_type; - for (size_type k = 0; k < NW.num_cols (); k++) + for (size_type k = 0; k < NW.num_cols (); k++) for (size_type i = 0; i < NE.num_rows (); i++) { typename MatrixNW::value_type d = NW[i][k]; #if 0 @@ -293,19 +293,19 @@ namespace with_iterator { // ====================== // Corresponding functors // ====================== - + struct cholesky_base_t { - template < typename Matrix > + template < typename Matrix > void operator() (Matrix & matrix) { cholesky_base(matrix); } }; - + struct tri_solve_base_t { - template < typename MatrixSW, typename MatrixNW > + template < typename MatrixSW, typename MatrixNW > void operator() (MatrixSW & SW, const MatrixNW & NW) { tri_solve_base(SW, NW); @@ -314,7 +314,7 @@ namespace with_iterator { struct tri_schur_base_t { - template < typename MatrixSE, typename MatrixSW > + template < typename MatrixSE, typename MatrixSW > void operator() (MatrixSE & SE, const MatrixSW & SW) { tri_schur_base(SE, SW); @@ -344,25 +344,25 @@ struct recursive_cholesky_visitor_t { typedef BaseTest base_test; - template < typename Recursator > + template < typename Recursator > bool is_base(const Recursator& recursator) const { return base_test()(recursator); } - template < typename Matrix > + template < typename Matrix > void cholesky_base(Matrix & matrix) const { CholeskyBase()(matrix); } - template < typename MatrixSW, typename MatrixNW > + template < typename MatrixSW, typename MatrixNW > void tri_solve_base(MatrixSW & SW, const MatrixNW & NW) const { TriSolveBase()(SW, NW); } - template < typename MatrixSE, typename MatrixSW > + template < typename MatrixSE, typename MatrixSW > void tri_schur_base(MatrixSE & SE, const MatrixSW & SW) const { TriSchur()(SE, SW); @@ -385,7 +385,7 @@ namespace detail { template < typename MatrixNE, typename MatrixNW, typename MatrixSW > void operator()(MatrixNE & NE, const MatrixNW & NW, const MatrixSW & SW) { - transposed_view trans_sw(const_cast(SW)); + transposed_view trans_sw(const_cast(SW)); MatrixMult()(NW, trans_sw, NE); } }; @@ -394,14 +394,14 @@ namespace detail { namespace with_bracket { - typedef recursive_cholesky_visitor_t, cholesky_base_t, tri_solve_base_t, - tri_schur_base_t, schur_update_base_t > + typedef recursive_cholesky_visitor_t, cholesky_base_t, tri_solve_base_t, + tri_schur_base_t, schur_update_base_t > recursive_cholesky_base_visitor_t; } #if 0 namespace with_iterator { - typedef recursive_cholesky_visitor_t, + typedef recursive_cholesky_visitor_t, cholesky_base_t, tri_solve_base_t, tri_schur_base_t, schur_update_base_t> recursive_cholesky_base_visitor_t; } @@ -428,21 +428,21 @@ namespace with_recursator { if (vis.is_base(E)) { typedef typename Visitor::base_test base_test; typedef typename base_case_matrix::type matrix_type; - - matrix_type base_E(base_case_cast(E.get_value())), + + matrix_type base_E(base_case_cast(E.get_value())), base_W(base_case_cast(W.get_value())), base_N(base_case_cast(N.get_value())); vis.schur_update_base(base_E, base_W, base_N); } else{ schur_update( E.north_east(),W.north_west() ,N.south_west() , vis); schur_update( E.north_east(), W.north_east(), N.south_east(), vis); - + schur_update(E.north_west() , W.north_east(), N.north_east(), vis); schur_update(E.north_west() ,W.north_west() ,N.north_west() , vis); - + schur_update(E.south_west() ,W.south_west() ,N.north_west() , vis); schur_update(E.south_west() , W.south_east(), N.north_east(), vis); - + schur_update( E.south_east(), W.south_east(), N.south_east(), vis); schur_update( E.south_east(),W.south_west() ,N.south_west() , vis); } @@ -458,16 +458,16 @@ namespace with_recursator { if (S.is_empty()) return; - if (vis.is_base(S)) { + if (vis.is_base(S)) { typedef typename Visitor::base_test base_test; typedef typename base_case_matrix::type matrix_type; - - matrix_type base_S(base_case_cast(S.get_value())), + + matrix_type base_S(base_case_cast(S.get_value())), base_N(base_case_cast(N.get_value())); vis.tri_solve_base(base_S, base_N); } else{ - + tri_solve(S.north_west() ,N.north_west(), vis); schur_update( S.north_east(),S.north_west() ,N.south_west(), vis); tri_solve( S.north_east(), N.south_east(), vis); @@ -480,7 +480,7 @@ namespace with_recursator { template void tri_schur(Recursator E, Recursator W, Visitor vis) - { + { using namespace recursion; vampir_trace<5007> tracer; @@ -490,12 +490,12 @@ namespace with_recursator { if (vis.is_base(W)) { typedef typename Visitor::base_test base_test; typedef typename base_case_matrix::type matrix_type; - - matrix_type base_E(base_case_cast(E.get_value())), + + matrix_type base_E(base_case_cast(E.get_value())), base_W(base_case_cast(W.get_value())); vis.tri_schur_base(base_E, base_W); - } else{ - + } else{ + schur_update(E.south_west(), W.south_west(), W.north_west(), vis); schur_update(E.south_west(), W.south_east(), W.north_east(), vis); tri_schur( E.south_east() , W.south_east(), vis); @@ -515,12 +515,12 @@ namespace with_recursator { if (recursator.is_empty()) return; - if (vis.is_base (recursator)){ + if (vis.is_base (recursator)){ typedef typename Visitor::base_test base_test; typedef typename base_case_matrix::type matrix_type; - + matrix_type base_matrix(base_case_cast(recursator.get_value())); - vis.cholesky_base (base_matrix); + vis.cholesky_base (base_matrix); } else { cholesky(recursator.north_west(), vis); tri_solve( recursator.south_west(), recursator.north_west(), vis); @@ -528,7 +528,7 @@ namespace with_recursator { cholesky( recursator.south_east(), vis); } } - + } // namespace with_recursator @@ -546,8 +546,8 @@ struct recursive_cholesky_t void operator()(Matrix& matrix, Visitor vis) { apply(matrix, vis, typename mtl::traits::category::type()); - } - + } + private: // If the matrix is not sub-divisible then take backup function template @@ -589,21 +589,21 @@ void fill_matrix_for_cholesky(Matrix& matrix) typedef typename Collection::size_type size_type; typedef typename Collection::value_type value_type; - value_type x= 1.0; - for (size_type i= 0; i < num_rows(matrix); i++) + value_type x= 1.0; + for (size_type i= 0; i < num_rows(matrix); i++) for (size_type j= 0; j <= i; j++) if (i != j) { - matrix[i][j]= x; matrix[j][i]= x; - x+= 1.0; + matrix[i][j]= x; matrix[j][i]= x; + x+= 1.0; } - + for (size_type i= 0; i < num_rows(matrix); i++) { value_type rowsum= 0.0; for (size_type j=0; j : boost::mpl::true_ {}; + is_clonable : boost::mpl::true_ {}; \endcode **/ template typename boost::enable_if, T>::type -clone(const T& x) -{ +clone(const T& x) +{ vampir_trace<3004> tracer; // std::cout << "Cloning clone function.\n"; - return T(x, clone_ctor()); + return T(x, clone_ctor()); } template typename boost::disable_if, T>::type -clone(const T& x) -{ +clone(const T& x) +{ // std::cout << "Not cloning clone function.\n"; - return x; + return x; } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/column_in_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/column_in_matrix.hpp index c86dfc62..839ba522 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/column_in_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/column_in_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_COLUMN_IN_MATRIX_INCLUDE @@ -29,7 +29,7 @@ struct ColumnInMatrix }; template -struct ColumnInMatrix > +struct ColumnInMatrix > { typedef mtl::matrix::dense2D ref_type; typedef typename ref_type::size_type size_type; @@ -40,8 +40,8 @@ struct ColumnInMatrix > typedef typename boost::mpl::if_c< aligned - , vector::dense_vector > - , vector::strided_vector_ref > + , vector::dense_vector > + , vector::strided_vector_ref > >::type type; static inline type apply(ref_type& A, const irange& row_range, size_type col) @@ -67,11 +67,11 @@ struct ColumnInMatrix > static inline Return dispatch(Ref& A, const irange& row_range, size_type col, boost::mpl::false_) { return Return(vector_size(A, row_range), &A[row_range.start()][col], num_cols(A)); - } + } }; template -struct ColumnInMatrix > +struct ColumnInMatrix > { typedef mtl::matrix::dense2D const ref_type; typedef mtl::matrix::dense2D ref2_type; @@ -83,7 +83,7 @@ struct ColumnInMatrix > typedef typename boost::mpl::if_c< aligned , vector::dense_vector > // TODO needs constification !!! - , vector::strided_vector_ref > + , vector::strided_vector_ref > >::type type; static inline type apply(ref_type& A, const irange& row_range, size_type col) @@ -91,7 +91,7 @@ struct ColumnInMatrix > return ColumnInMatrix::template dispatch(A, row_range, col, boost::mpl::bool_()); } }; - + } // namespace mtl #endif // MTL_COLUMN_IN_MATRIX_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_factors.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_factors.hpp index ab3f944f..c41c7ad4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_factors.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_factors.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_COMPUTE_FACTORS_INCLUDE @@ -19,7 +19,7 @@ namespace mtl { namespace operation { // Default is to just refer to the expression template -struct compute_one_factor +struct compute_one_factor { typedef const Expr& type; typedef const Expr& const_reference; @@ -30,24 +30,24 @@ struct compute_one_factor }; template -struct compute_one_factor > +struct compute_one_factor > { typedef Result type; typedef const Result& const_reference; - compute_one_factor(const matrix::mat_mat_times_expr& src) + compute_one_factor(const matrix::mat_mat_times_expr& src) : value(src.first * src.second) {} type value; }; template -struct compute_one_factor > +struct compute_one_factor > { typedef Result type; typedef const Result& const_reference; - compute_one_factor(const matrix::mat_mat_ele_times_expr& src) + compute_one_factor(const matrix::mat_mat_ele_times_expr& src) : value(ele_prod(src.first, src.second)) {} type value; @@ -61,7 +61,7 @@ struct compute_factors {}; template struct compute_factors > { - compute_factors(const matrix::mat_mat_times_expr& src) + compute_factors(const matrix::mat_mat_times_expr& src) : first_factor(src.first), second_factor(src.second), first(first_factor.value), second(second_factor.value) {} @@ -77,7 +77,7 @@ struct compute_factors > template struct compute_factors > { - compute_factors(const matrix::mat_mat_ele_times_expr& src) + compute_factors(const matrix::mat_mat_ele_times_expr& src) : first(src.first), second_factor(src.second), second(second_factor.value) {} diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_summand.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_summand.hpp index 156a9bc6..43f9869c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_summand.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/compute_summand.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL__OPERATION_COMPUTE_SUMMAND_INCLUDE @@ -22,7 +22,7 @@ namespace mtl { namespace operation { /// Compute a summand in an expression /** For instance matrix vector products are transformed into mult function calls when assigned to a column vector. Adding such a vector to other vector expressions - requires to compute (evaluate) the summand first and then add the resulting + requires to compute (evaluate) the summand first and then add the resulting vector. The current implementation assumes that the result of the operation can be represented by the multiplied column vector. This is for instance wrong when the matrix is complex and the vector real. To handle this is signifantly @@ -44,7 +44,7 @@ struct compute_summand< mat_cvec_times_expr > { typedef CVector type; - compute_summand(const mat_cvec_times_expr& expr) + compute_summand(const mat_cvec_times_expr& expr) : value(num_rows(expr.first)) #ifndef NDEBUG // might be helpful, e.g. for generating AST , first(expr.first), second(expr.second) @@ -60,14 +60,14 @@ struct compute_summand< mat_cvec_times_expr > const CVector& second; #endif }; - + /// Specialization for matrix vector products template struct compute_summand< vector::mat_cvec_multiplier > { typedef CVector type; - compute_summand(const vector::mat_cvec_multiplier& expr) + compute_summand(const vector::mat_cvec_multiplier& expr) : value(num_rows(expr.A)) { vampir_trace<3005> tracer; @@ -76,7 +76,7 @@ struct compute_summand< vector::mat_cvec_multiplier > CVector value; }; - + }} // namespace mtl::operation #endif // MTL__OPERATION_COMPUTE_SUMMAND_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/conj.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/conj.hpp index 4316da42..5d6820f4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/conj.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/conj.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CONJ_INCLUDE @@ -78,7 +78,7 @@ namespace sfunctor { {}; } // namespace sfunctor - + namespace vector { /// Conjugate of an vector @@ -88,7 +88,7 @@ namespace sfunctor { { return conj_view(v); } - } + } namespace matrix { @@ -99,7 +99,7 @@ namespace sfunctor { { static const unsigned code= mtl::traits::view_toggle_conj >::value; typedef typename mtl::traits::compose_view::type>::type type; - + static inline type apply(const Matrix& A) { return type(view_ref(A)); @@ -115,7 +115,7 @@ namespace sfunctor { { return detail::conj_trait::apply(A); } - } + } namespace scalar { @@ -137,7 +137,7 @@ namespace sfunctor { /// Conjugate of vector, matrix, or scalar using vector::conj; - using matrix::conj; + using matrix::conj; using scalar::conj; // using std::conj; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copy.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copy.hpp index c32b8298..508617b6 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copy.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copy.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_COPY_INCLUDE @@ -38,23 +38,23 @@ #include namespace mtl { - + namespace detail { - // Set Destination matrix to zero when source is sparse + // Set Destination matrix to zero when source is sparse // (otherwise everything is overwritten anyway) template inline void zero_with_sparse_src(MatrixDest& dest, tag::flat) { set_to_zero(dest); } - + template - inline void zero_with_sparse_src(MatrixDest&, tag::universe) {} + inline void zero_with_sparse_src(MatrixDest&, tag::universe) {} // Adapt inserter size to operation template struct copy_inserter_size {}; - + // Specialization for store template struct copy_inserter_size< operations::update_store > @@ -73,7 +73,7 @@ namespace mtl { static inline int apply(const MatrixSrc& src, const MatrixDest& dest) { return int((src.nnz() + dest.nnz()) * 1.2 / dest.dim1()); } }; - + // Specialization for plus and minus template struct copy_inserter_size< operations::update_plus > : sum_of_sizes {}; template struct copy_inserter_size< operations::update_minus > : sum_of_sizes {}; @@ -88,21 +88,21 @@ namespace mtl { MTL_THROW_IF(num_rows(src) != num_rows(dest) || num_cols(src) != num_cols(dest), incompatible_size()); if (with_reset) - detail::zero_with_sparse_src(dest, traits::sparsity_flatcat()); - - typename traits::row::type row(src); - typename traits::col::type col(src); - typename traits::const_value::type value(src); + detail::zero_with_sparse_src(dest, traits::sparsity_flatcat()); + + typename traits::row::type row(src); + typename traits::col::type col(src); + typename traits::const_value::type value(src); typedef typename traits::range_generator::type cursor_type; // std::cout << "Slot size is " << detail::copy_inserter_size::apply(src, dest) << "\n"; matrix::inserter ins(dest, detail::copy_inserter_size::apply(src, dest)); - for (cursor_type cursor = mtl::begin(src), cend = mtl::end(src); + for (cursor_type cursor = mtl::begin(src), cend = mtl::end(src); cursor != cend; ++cursor) { // std::cout << dest << '\n'; - + typedef typename traits::range_generator::type icursor_type; - for (icursor_type icursor = mtl::begin(cursor), icend = mtl::end(cursor); + for (icursor_type icursor = mtl::begin(cursor), icend = mtl::end(cursor); icursor != icend; ++icursor) { //std::cout << "in " << row(*icursor) << ", " << col(*icursor) << " insert " << value(*icursor) << '\n'; ins(row(*icursor), col(*icursor)) << value(*icursor); } @@ -171,18 +171,18 @@ namespace mtl { dest.data[jd++]= sref.data[j++]; } first= inc_wo_over(first); - last= inc_wo_over(last); + last= inc_wo_over(last); } } - + /// Copy matrix \p src into matrix \p dest template inline void matrix_copy(const MatrixSrc& src, MatrixDest& dest) { gen_matrix_copy< operations::update_store >(src, dest, true); } - + /// Add matrix \p src to matrix \p dest in copy-like style template @@ -190,14 +190,14 @@ namespace mtl { { gen_matrix_copy< operations::update_plus >(src, dest, false); } - + /// Subtract matrix \p src from matrix \p dest in copy-like style template inline void matrix_copy_minus(const MatrixSrc& src, MatrixDest& dest) { gen_matrix_copy< operations::update_minus >(src, dest, false); } - + /// Multiply matrix \p src element-wise with matrix \p dest in copy-like style template inline void matrix_copy_ele_times(const MatrixSrc& src, MatrixDest& dest) @@ -205,12 +205,12 @@ namespace mtl { vampir_trace<3001> tracer; MTL_THROW_IF(num_rows(src) != num_rows(dest) || num_cols(src) != num_cols(dest), incompatible_size()); - typename traits::row::type row(dest); - typename traits::col::type col(dest); - typename traits::value::type value(dest); + typename traits::row::type row(dest); + typename traits::col::type col(dest); + typename traits::value::type value(dest); typedef typename traits::range_generator::type cursor_type; typedef typename traits::range_generator::type icursor_type; - + for (cursor_type cursor = begin(dest), cend = end(dest); cursor != cend; ++cursor) for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) value(*icursor, value(*icursor) * src[row(*icursor)][col(*icursor)]); @@ -220,7 +220,7 @@ namespace mtl { crop(dest); } - + template inline void copy(const MatrixSrc& src, tag::flat, MatrixDest& dest, tag::flat) // inline void copy(const MatrixSrc& src, tag::matrix_expr, MatrixDest& dest, tag::matrix) @@ -228,7 +228,7 @@ namespace mtl { return matrix_copy(src, dest); } - + template inline void gen_vector_copy(const VectorSrc& src, VectorDest& dest, bool with_reset) @@ -244,23 +244,23 @@ namespace mtl { if (with_reset) detail::zero_with_sparse_src(dest, typename traits::category::type()); - - typename traits::index::type index(src); - typename traits::const_value::type value(src); + + typename traits::index::type index(src); + typename traits::const_value::type value(src); typedef typename traits::range_generator::type cursor_type; - for (cursor_type cursor = begin(src), cend = end(src); + for (cursor_type cursor = begin(src), cend = end(src); cursor != cend; ++cursor) Updater()(dest[index(*cursor)], value(*cursor)); } - + /// Copy vector \p src into vector \p dest template inline void vector_copy(const VectorSrc& src, VectorDest& dest) { gen_vector_copy< operations::update_store >(src, dest, true); } - + /// Add vector \p src to vector \p dest in copy-like style template @@ -268,18 +268,18 @@ namespace mtl { { gen_vector_copy< operations::update_plus >(src, dest, false); } - + /// Subtract vector \p src from vector \p dest in copy-like style template inline void vector_copy_minus(const VectorSrc& src, VectorDest& dest) { gen_vector_copy< operations::update_minus >(src, dest, false); } - - + + template - inline void copy(const VectorSrc& src, tag::flat, VectorDest& dest, tag::flat) + inline void copy(const VectorSrc& src, tag::flat, VectorDest& dest, tag::flat) { return vector_copy(src, dest); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copysign.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copysign.hpp index 6281f894..22cffd97 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copysign.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/copysign.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_COPYSIGN_INCLUDE @@ -35,7 +35,7 @@ namespace sfunctor { } }; - // This specialization is questionable and thus subject to elimination + // This specialization is questionable and thus subject to elimination template struct copysign, Value2> { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/crop.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/crop.hpp index 9c90dea2..a38b8471 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/crop.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/crop.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CROP_INCLUDE @@ -41,7 +41,7 @@ namespace mtl { x.crop(); return x; } } - + using vector::crop; using matrix::crop; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cross.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cross.hpp index e75cd7e8..bdfc84d9 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cross.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cross.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_VECTOR_CROSS_INCLUDE @@ -41,10 +41,10 @@ inline cross(const Vector1& v1, const Vector2& v2) { vampir_trace<2002> tracer; MTL_THROW_IF((size(v1) != 3 && size(v1) != 7 ) || size(v1) != size(v2), incompatible_size()); - + typename detail::cross_result::type result(size(v1)); - if (size(v1) == 3) + if (size(v1) == 3) for (unsigned i= 0; i < 3; i++) { unsigned k= (i+1) % 3, l= (i+2) % 3; result[i]= v1[k] * v2[l] - v1[l] * v2[k]; @@ -59,7 +59,7 @@ inline cross(const Vector1& v1, const Vector2& v2) k= (i+4) % 7, l= (i+5) % 7; result[i]+= v1[k] * v2[l] - v1[l] * v2[k]; - } + } return result; } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cuppen.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cuppen.hpp index ccb95202..2337d9df 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cuppen.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cuppen.hpp @@ -45,8 +45,8 @@ void inline cuppen_inplace(Matrix& A, Matrix& Q, Vector& lambda) size_type nrows= num_rows(A); MTL_THROW_IF(nrows != num_cols(A), matrix_not_square()); - const value_type zero= 0, one= 1; - + const value_type zero= 0, one= 1; + if (nrows == 1){ lambda[0]= A[0][0]; Q= one; @@ -79,14 +79,14 @@ void inline cuppen_inplace(Matrix& A, Matrix& Q, Vector& lambda) sort(diag, perm); // CONQUER, start with eq. (3.0.2) using rows (not columns) - v[till_m]= b < zero ? Vector(-trans(Q1[m-1][iall])) : trans(Q1[m-1][iall]); + v[till_m]= b < zero ? Vector(-trans(Q1[m-1][iall])) : trans(Q1[m-1][iall]); v[from_m]= trans(Q2[0][iall]); // permutation on v - mtl::matrix::traits::permutation<>::type P= mtl::matrix::permutation(perm); + mtl::matrix::traits::permutation<>::type P= mtl::matrix::permutation(perm); Vector v1(P * v); - - lambda= secular(v1, diag, abs(b)); // solve secular equation + + lambda= secular(v1, diag, abs(b)); // solve secular equation // std::cout << "lambda is " << lambda << "\ndiag is " << diag << '\n'; //Lemma 3.0.2 ... calculate eigenvectors @@ -95,7 +95,7 @@ void inline cuppen_inplace(Matrix& A, Matrix& Q, Vector& lambda) for (size_type j= 0; j < size(diag); ++j) MTL_DEBUG_THROW_IF (diag[j] == lambda[i], logic_error("Can't compute eigenvector, probably due to double eigenvalue.")); Vector li(nrows, lambda[i]), lambda_i(ele_quot(v1, diag - li)); - Q_tilde[iall][i]= lambda_i / two_norm(lambda_i); // normalized eigenvector in Matrix Q + Q_tilde[iall][i]= lambda_i / two_norm(lambda_i); // normalized eigenvector in Matrix Q } Q= Q0 * P * Q_tilde; @@ -104,10 +104,10 @@ void inline cuppen_inplace(Matrix& A, Matrix& Q, Vector& lambda) for (size_type i = 0; i < nrows; i++) { // Vector qi(Q[iall][i]); // Todo: find out valgrind complains about the memory of qi for reasons inexplicable Vector qi(nrows); - for (size_type j= 0; j < nrows; j++) + for (size_type j= 0; j < nrows; j++) qi[j]= Q[j][i]; - std::cout << "q[" << i << "] = " << qi << ", lambda[i] = " << lambda[i] + std::cout << "q[" << i << "] = " << qi << ", lambda[i] = " << lambda[i] << ", diff = " << two_norm(Vector(A*qi - lambda[i]*qi)) << ", A*qi = " << Vector(A*qi) << ", li*qi = " << Vector(lambda[i]*qi) << '\n'; itl::basic_iteration iter(1.0, 20, 1e-5, 1e-5); fsm(A, qi, lambda[i], 0.1, iter); @@ -115,7 +115,7 @@ void inline cuppen_inplace(Matrix& A, Matrix& Q, Vector& lambda) Q[iall][i]= qi; } #endif - } + } } /// Eigenvalues of triangle matrix A with Cuppen's divide and conquer algorithm diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cursor_pseudo_dot.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cursor_pseudo_dot.hpp index 2d9fd080..19a486e8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cursor_pseudo_dot.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/cursor_pseudo_dot.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_CURSOR_PSEUDO_DOT_INCLUDE @@ -23,7 +23,7 @@ namespace functor { struct cursor_pseudo_dot_block { static unsigned const offset= MaxDepth - Depth; - + void operator() (Cursor1 i1, Prop1& prop1, Cursor2 i2, Prop2& prop2, Value& s0, Value& s1, Value& s2, Value& s3, Value& s4, Value& s5, Value& s6, Value& s7) @@ -42,14 +42,14 @@ namespace functor { struct cursor_pseudo_dot_block { static unsigned const offset= MaxDepth - 1; - + void operator() (Cursor1 i1, Prop1& prop1, Cursor2 i2, Prop2& prop2, Value& s0, Value&, Value&, Value&, Value&, Value&, Value&, Value&) { s0+= prop1(*(i1 + offset)) * prop2(*(i2 + offset)); } - }; + }; template struct cursor_pseudo_dot_t @@ -58,7 +58,7 @@ namespace functor { { using math::zero; Value ref, my_zero(zero(ref)), - s0= my_zero, s1= my_zero, s2= my_zero, s3= my_zero, + s0= my_zero, s1= my_zero, s2= my_zero, s3= my_zero, s4= my_zero, s5= my_zero, s6= my_zero, s7= my_zero; std::size_t size= end1 - i1, blocks= size / MaxDepth, blocked_size= blocks * MaxDepth; @@ -74,8 +74,8 @@ namespace functor { return s0; } }; - -} // namespace functor + +} // namespace functor template Value cursor_pseudo_dot(Cursor1 i1, Cursor1 end1, Prop1 prop1, Cursor2 i2, Prop2 prop2, Value) diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/diagonal.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/diagonal.hpp index 01b60db8..9769e689 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/diagonal.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/diagonal.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DIAGONAL_INCLUDE @@ -42,7 +42,7 @@ namespace mtl { return D; } - } + } namespace matrix { @@ -62,7 +62,7 @@ namespace mtl { v[i]= A[i][i]; return v; } - } + } } // namespace mtl diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/div_result.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/div_result.hpp index df0c785a..b388f0a6 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/div_result.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/div_result.hpp @@ -20,9 +20,9 @@ template < typename Op1, typename Op2, typename DivOp > struct div_result_aux {} /// Result type for dividing Op1 by Op2 /** Can be used in enable-if-style as type is only defined when appropriate **/ template < typename Op1, typename Op2 > -struct div_result - : public div_result_aux < Op1, Op2, typename ashape::div_op::type, - typename ashape::ashape::type >::type > +struct div_result + : public div_result_aux < Op1, Op2, typename ashape::div_op::type, + typename ashape::ashape::type >::type > {}; /// Divide column vector by scalar diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by.hpp index a1200677..1bfe43f6 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by.hpp @@ -16,31 +16,31 @@ #include namespace mtl { namespace tfunctor { - + // AlgebraicCategory is by default tag::scalar template struct divide_by { typedef typename Multiplicable::result_type result_type; - + explicit divide_by(const Value2& v2) : v2(v2) {} - + result_type operator() (const Value1& v1) const { return v1 / v2; } private: - Value2 v2; + Value2 v2; }; - - + + template struct divide_by { typedef matrix::divide_by_view result_type; - + explicit divide_by(const Value2& v2) : v2(v2) {} - + result_type operator() (const Matrix& matrix) const { return result_type(matrix, v2); @@ -48,15 +48,15 @@ namespace mtl { namespace tfunctor { private: Value2 v2; }; - + template struct divide_by { typedef vector::divide_by_view result_type; - + explicit divide_by(const Value2& v2) : v2(v2) {} - + result_type operator() (const Vector& vector) const { return result_type(vector, v2); @@ -65,9 +65,9 @@ namespace mtl { namespace tfunctor { Value2 v2; }; - + } // namespace tfunctor - + namespace matrix { @@ -88,7 +88,7 @@ namespace vector { return tfunctor::divide_by::type>(value2)(value1); } } - + } // namespace mtl #endif // MTL_DIVIDE_BY_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by_inplace.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by_inplace.hpp index f2a3e4f3..4a0bfc1a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by_inplace.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/divide_by_inplace.hpp @@ -17,8 +17,8 @@ namespace mtl { - - + + /// Divide collection \p c (from right) by scalar factor \p alpha; \p c is altered template void divide_by_inplace(Coll& c, const Factor& alpha, tag::scalar) @@ -26,15 +26,15 @@ namespace mtl { // assign_each_nonzero(c, boost::lambda::_1 / alpha); assign_each_nonzero(c, tfunctor::divide_by::value_type, Factor>(alpha)); } - + /// Divide collection \p c (from right) by factor \p alpha; \p c is altered template void divide_by_inplace(Collection& c, const Factor& alpha) { divide_by_inplace(c, alpha, typename traits::category::type()); } - - + + } // namespace mtl #endif // MTL_DIVIDE_BY_INPLACE_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dmat_dmat_mult.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dmat_dmat_mult.hpp index ee612860..920a747a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dmat_dmat_mult.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dmat_dmat_mult.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DMAT_DMAT_MULT_INCLUDE @@ -51,7 +51,7 @@ namespace mtl { // ===================================================== // Generic matrix product with cursors and property maps // ===================================================== - + // To allow 5th parameter, is ignored // This is the bottom line of dmat_dmat_mult implementations. @@ -59,13 +59,13 @@ namespace mtl { // so that we disabled the backup functor by default. // If some type has no cursor, one can still use a backup functor (whatever this may be). template + typename Backup= no_op> struct gen_cursor_dmat_dmat_mult_ft { void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { apply(A, B, C, traits::flatcat1(), traits::flatcat1()); - } + } private: void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, tag::universe, tag::universe) @@ -88,7 +88,7 @@ private: typedef typename traits::range_generator::type a_cur_type; typedef typename traits::range_generator::type c_cur_type; - + typedef typename traits::range_generator::type b_cur_type; typedef typename traits::range_generator::type c_icur_type; @@ -96,12 +96,12 @@ private: typedef typename traits::range_generator::type b_icur_type; #ifndef NDEBUG - typename traits::row::type row_a(A); - typename traits::col::type col_a(A); - typename traits::row::type row_b(B); - typename traits::col::type col_b(B); - typename traits::row::type row_c(C); - typename traits::col::type col_c(C); + typename traits::row::type row_a(A); + typename traits::col::type col_a(A); + typename traits::row::type row_b(B); + typename traits::col::type col_b(B); + typename traits::row::type row_c(C); + typename traits::col::type col_c(C); #else # undef MTL_DEBUG_DMAT_DMAT_MULT // doesn't work with NDEBUG #endif @@ -111,19 +111,19 @@ private: a_value_type a_value(A); b_value_type b_value(B); c_value_type c_value(C); - + a_cur_type ac= begin(A), aend= end(A); for (c_cur_type cc= begin(C); ac != aend; ++ac, ++cc) { - + b_cur_type bc= begin(B), bend= end(B); - for (c_icur_type cic= begin(cc); bc != bend; ++bc, ++cic) { - + for (c_icur_type cic= begin(cc); bc != bend; ++bc, ++cic) { + typename MatrixC::value_type c_tmp(c_value(*cic)); #ifdef MTL_DEBUG_DMAT_DMAT_MULT std::cout << "Calculating C[" << row_c(*cic) << "][" << col_c(*cic) << "], initial value is " << c_tmp << "\n"; #endif - a_icur_type aic= begin(ac), aiend= end(ac); + a_icur_type aic= begin(ac), aiend= end(ac); for (b_icur_type bic= begin(bc); aic != aiend; ++aic, ++bic) { #ifdef MTL_DEBUG_DMAT_DMAT_MULT std::cout << "Updating with A[" << row_a(*aic) << "][" << col_a(*aic) << "] /* value is " @@ -141,7 +141,7 @@ private: } c_value(*cic, c_tmp); } - } + } } }; @@ -162,15 +162,15 @@ struct gen_cursor_dmat_dmat_mult_t // Generic matrix product with iterators // ===================================== -template > +template > struct gen_dmat_dmat_mult_ft { void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { apply(A, B, C, traits::flatcat1(), traits::flatcat1()); - } + } private: void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, tag::universe, tag::universe) @@ -184,13 +184,13 @@ private: vampir_trace<4002> tracer; // std::cout << "Canonical iterator\n"; using namespace tag; - using traits::range_generator; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type c_cur_type; - typedef typename range_generator::type b_cur_type; - typedef typename range_generator::type c_icur_type; - typedef typename range_generator::type a_icur_type; - typedef typename range_generator::type b_icur_type; + using traits::range_generator; + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type c_cur_type; + typedef typename range_generator::type b_cur_type; + typedef typename range_generator::type c_icur_type; + typedef typename range_generator::type a_icur_type; + typedef typename range_generator::type b_icur_type; if (Assign::init_to_zero) set_to_zero(C); @@ -198,22 +198,22 @@ private: for (c_cur_type cc= mtl::begin(C); ac != aend; ++ac, ++cc) { b_cur_type bc= mtl::begin(B), bend= mtl::end(B); - for (c_icur_type cic= mtl::begin(cc); bc != bend; ++bc, ++cic) { - + for (c_icur_type cic= mtl::begin(cc); bc != bend; ++bc, ++cic) { + typename MatrixC::value_type c_tmp(*cic); - a_icur_type aic= mtl::begin(ac), aiend= mtl::end(ac); + a_icur_type aic= mtl::begin(ac), aiend= mtl::end(ac); for (b_icur_type bic= mtl::begin(bc); aic != aiend; ++aic, ++bic) { Assign::update(c_tmp, *aic * *bic); } *cic= c_tmp; } } - } + } }; template > + typename Backup= gen_cursor_dmat_dmat_mult_t > struct gen_dmat_dmat_mult_t { template @@ -230,7 +230,7 @@ Unrolling matrix product with dimensions that are not multiples of blocks 1. Do with optimization: C_nw += A_nw * B_nw - - wherby the matrix dimensions of sub-matrices are the largest multiples of block sizes + - wherby the matrix dimensions of sub-matrices are the largest multiples of block sizes smaller or equal to the matrix dimensions of the original matrix @@ -243,14 +243,14 @@ The inner loop can be unrolled arbitrarily. So, we can simplify 1. Do with optimization: C_nw += A_n * B_w - - wherby the matrix dimensions of sub-matrices are the largest multiples of block sizes + - wherby the matrix dimensions of sub-matrices are the largest multiples of block sizes smaller or equal to the matrix dimensions of the original matrix 2. Do with optimization only in inner loop C_ne += A_n * B_e C_s += A_s * B - + */ @@ -281,26 +281,26 @@ struct gen_tiling_dmat_dmat_mult_block typedef gen_tiling_dmat_dmat_mult_block next_t; template - static inline void apply(Value& tmp00, Value& tmp01, Value& tmp02, Value& tmp03, Value& tmp04, - Value& tmp05, Value& tmp06, Value& tmp07, Value& tmp08, Value& tmp09, - Value& tmp10, Value& tmp11, Value& tmp12, Value& tmp13, Value& tmp14, Value& tmp15, + static inline void apply(Value& tmp00, Value& tmp01, Value& tmp02, Value& tmp03, Value& tmp04, + Value& tmp05, Value& tmp06, Value& tmp07, Value& tmp08, Value& tmp09, + Value& tmp10, Value& tmp11, Value& tmp12, Value& tmp13, Value& tmp14, Value& tmp15, ValueA *begin_a, SizeA& ari, ValueB *begin_b, SizeB& bci) { tmp00+= begin_a[ base::index0 * ari ] * begin_b[ base::index1 * bci ]; - next_t::apply(tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, - tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp00, - begin_a, ari, begin_b, bci); + next_t::apply(tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, + tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp00, + begin_a, ari, begin_b, bci); } template - static inline void update(Value& tmp00, Value& tmp01, Value& tmp02, Value& tmp03, Value& tmp04, - Value& tmp05, Value& tmp06, Value& tmp07, Value& tmp08, Value& tmp09, + static inline void update(Value& tmp00, Value& tmp01, Value& tmp02, Value& tmp03, Value& tmp04, + Value& tmp05, Value& tmp06, Value& tmp07, Value& tmp08, Value& tmp09, Value& tmp10, Value& tmp11, Value& tmp12, Value& tmp13, Value& tmp14, Value& tmp15, MatrixC& C, SizeC i, SizeC k) { Assign::update(C(i + base::index0, k + base::index1), tmp00); - next_t::update(tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, - tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp00, + next_t::update(tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, + tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp00, C, i, k); } }; @@ -312,17 +312,17 @@ struct gen_tiling_dmat_dmat_mult_block typedef meta_math::loop2 base; template - static inline void apply(Value& tmp00, Value&, Value&, Value&, Value&, - Value&, Value&, Value&, Value&, Value&, - Value&, Value&, Value&, Value&, Value&, Value&, + static inline void apply(Value& tmp00, Value&, Value&, Value&, Value&, + Value&, Value&, Value&, Value&, Value&, + Value&, Value&, Value&, Value&, Value&, Value&, ValueA *begin_a, SizeA& ari, ValueB *begin_b, SizeB& bci) { tmp00+= begin_a[ base::index0 * ari ] * begin_b[ base::index1 * bci ]; } template - static inline void update(Value& tmp00, Value&, Value&, Value&, Value&, - Value&, Value&, Value&, Value&, Value&, + static inline void update(Value& tmp00, Value&, Value&, Value&, Value&, + Value&, Value&, Value&, Value&, Value&, Value&, Value&, Value&, Value&, Value&, Value&, MatrixC& C, SizeC i, SizeC k) { @@ -334,17 +334,17 @@ struct gen_tiling_dmat_dmat_mult_block template > struct gen_tiling_dmat_dmat_mult_ft { MTL_STATIC_ASSERT((Tiling1 * Tiling2 <= 16), "Tile (Tiling1 * Tiling2) cannot be larger than 16."); - + void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { apply(A, B, C, traits::layout_flatcat(), traits::layout_flatcat()); - } - + } + private: void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, tag::universe, tag::universe) { @@ -373,7 +373,7 @@ private: k_max= num_cols(C), k_block= Tiling2 * (k_max / Tiling2); size_t ari= &A(1, 0) - &A(0, 0), // how much is the offset of A's entry increased by incrementing row aci= &A(0, 1) - &A(0, 0), bri= &B(1, 0) - &B(0, 0), bci= &B(0, 1) - &B(0, 0); - + // C_nw += A_nw * B_nw for (size_type i= 0; i < i_block; i+= Tiling1) for (size_type k= 0; k < k_block; k+= Tiling2) { @@ -385,11 +385,11 @@ private: const typename MatrixB::value_type *begin_b= &B(0, k); for (; begin_a != end_a; begin_a+= aci, begin_b+= bri) - block::apply(tmp00, tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, - tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, - begin_a, ari, begin_b, bci); - block::update(tmp00, tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, - tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, + block::apply(tmp00, tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, + tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, + begin_a, ari, begin_b, bci); + block::update(tmp00, tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, tmp08, tmp09, + tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, C, i, k); } @@ -421,7 +421,7 @@ private: template > struct gen_tiling_dmat_dmat_mult_t { @@ -442,16 +442,16 @@ struct gen_tiling_dmat_dmat_mult_t // ================================= -template > struct gen_tiling_44_dmat_dmat_mult_ft { void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { apply(A, B, C, traits::layout_flatcat(), traits::layout_flatcat()); - } - + } + private: void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, tag::universe, tag::universe) { @@ -554,7 +554,7 @@ private: } }; -template > struct gen_tiling_44_dmat_dmat_mult_t { @@ -576,16 +576,16 @@ struct gen_tiling_44_dmat_dmat_mult_t // ================================= -template > struct gen_tiling_22_dmat_dmat_mult_ft { void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { apply(A, B, C, traits::layout_flatcat(), traits::layout_flatcat()); - } - + } + private: void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, tag::universe, tag::universe) { @@ -662,7 +662,7 @@ private: } }; -template > struct gen_tiling_22_dmat_dmat_mult_t { @@ -722,19 +722,19 @@ namespace wrec { } // namespace wrec -template , - typename Assign= assign::assign_sum, + typename Assign= assign::assign_sum, typename Backup= gen_dmat_dmat_mult_t > struct gen_recursive_dmat_dmat_mult_t { template void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { - apply(A, B, C, traits::flatcat1(), + apply(A, B, C, traits::flatcat1(), traits::flatcat1(), traits::flatcat1()); - } - + } + private: // If one matrix is not sub-divisible then take backup function template @@ -745,7 +745,7 @@ private: // Only if matrix is sub-divisible, otherwise backup template - void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, + void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, tag::flat, tag::flat, tag::flat) { vampir_trace<4007> tracer; @@ -754,13 +754,13 @@ private: // Make sure that mult functor of basecase has appropriate assign mode (in all nestings) // i.e. replace assign::assign_sum by assign::plus_sum including backup functor - + using matrix::recursator; recursator rec_a(A); recursator rec_b(B); recursator rec_c(C); equalize_depth(rec_a, rec_b, rec_c); - + wrec::gen_dmat_dmat_mult_t() (rec_a, rec_b, rec_c); } }; @@ -774,14 +774,14 @@ private: // Here only general definition that calls backup function // Special implementations needed in other files, which are included at the end -template > struct gen_platform_dmat_dmat_mult_ft : public Backup {}; -template > struct gen_platform_dmat_dmat_mult_t { @@ -798,7 +798,7 @@ struct gen_platform_dmat_dmat_mult_t // ================================== -template > struct gen_blas_dmat_dmat_mult_ft : public Backup @@ -811,7 +811,7 @@ namespace detail { // Transform from assign representation to BLAS double inline dgemm_alpha(assign::assign_sum) { return 1.0; } - double inline dgemm_alpha(assign::plus_sum) { return 1.0; } + double inline dgemm_alpha(assign::plus_sum) { return 1.0; } double inline dgemm_alpha(assign::minus_sum) { return -1.0; } // Transform from assign representation to BLAS @@ -820,32 +820,32 @@ namespace detail { double inline dgemm_beta(assign::minus_sum) { return 1.0; } template - void inline xgemm(const dense2D& A, const dense2D& B, + void inline xgemm(const dense2D& A, const dense2D& B, dense2D& C, Function f, Assign) { vampir_trace<4008> tracer; // std::cout << "use generic BLAS\n"; int m= num_rows(A), n= num_cols(B), k= num_cols(A), lda= A.get_ldim(), ldb= B.get_ldim(), ldc= C.get_ldim(); Value alpha= dgemm_alpha(Assign()), beta= dgemm_beta(Assign()); - char a_trans= traits::is_row_major::value ? 'T' : 'N', + char a_trans= traits::is_row_major::value ? 'T' : 'N', b_trans= traits::is_row_major::value ? 'T' : 'N'; if (traits::is_row_major::value) { // C^T= B^T * A^T - a_trans= 'T' + 'N' - a_trans; b_trans= 'T' + 'N' - b_trans; - f(&b_trans, &a_trans, &n /* col(B) */, &m /* row(A) */, &k /* col(A)=row(B) */, + a_trans= 'T' + 'N' - a_trans; b_trans= 'T' + 'N' - b_trans; + f(&b_trans, &a_trans, &n /* col(B) */, &m /* row(A) */, &k /* col(A)=row(B) */, &alpha, &B[0][0], &ldb, &A[0][0], &lda, &beta, &C[0][0], &ldc); - } else + } else f(&a_trans, &b_trans, &m, &n, &k, &alpha, &A[0][0], &lda, &B[0][0], &ldb, &beta, &C[0][0], &ldc); } } // detail - + template -struct gen_blas_dmat_dmat_mult_ft, dense2D, +struct gen_blas_dmat_dmat_mult_ft, dense2D, dense2D, Assign, Backup> { - void operator()(const dense2D& A, const dense2D& B, + void operator()(const dense2D& A, const dense2D& B, dense2D& C) { detail::xgemm(A, B, C, MTL_BLAS_NAME(sgemm), Assign()); @@ -853,10 +853,10 @@ struct gen_blas_dmat_dmat_mult_ft, dense2D, }; template -struct gen_blas_dmat_dmat_mult_ft, dense2D, +struct gen_blas_dmat_dmat_mult_ft, dense2D, dense2D, Assign, Backup> { - void operator()(const dense2D& A, const dense2D& B, + void operator()(const dense2D& A, const dense2D& B, dense2D& C) { detail::xgemm(A, B, C, MTL_BLAS_NAME(dgemm), Assign()); @@ -865,10 +865,10 @@ struct gen_blas_dmat_dmat_mult_ft, dense2D template -struct gen_blas_dmat_dmat_mult_ft, ParaA>, dense2D, ParaB>, +struct gen_blas_dmat_dmat_mult_ft, ParaA>, dense2D, ParaB>, dense2D, ParaC>, Assign, Backup> { - void operator()(const dense2D, ParaA>& A, const dense2D, ParaB>& B, + void operator()(const dense2D, ParaA>& A, const dense2D, ParaB>& B, dense2D, ParaC>& C) { detail::xgemm(A, B, C, MTL_BLAS_NAME(cgemm), Assign()); @@ -877,10 +877,10 @@ struct gen_blas_dmat_dmat_mult_ft, ParaA>, dense2D -struct gen_blas_dmat_dmat_mult_ft, ParaA>, dense2D, ParaB>, +struct gen_blas_dmat_dmat_mult_ft, ParaA>, dense2D, ParaB>, dense2D, ParaC>, Assign, Backup> { - void operator()(const dense2D, ParaA>& A, const dense2D, ParaB>& B, + void operator()(const dense2D, ParaA>& A, const dense2D, ParaB>& B, dense2D, ParaC>& C) { detail::xgemm(A, B, C, MTL_BLAS_NAME(zgemm), Assign()); @@ -891,7 +891,7 @@ struct gen_blas_dmat_dmat_mult_ft, ParaA>, dense2D< #endif // MTL_HAS_BLAS -template > struct gen_blas_dmat_dmat_mult_t : public Backup @@ -914,11 +914,11 @@ struct size_switch_dmat_dmat_mult_t template void operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) { - const bool all_static= traits::is_static::value && traits::is_static::value + const bool all_static= traits::is_static::value && traits::is_static::value && traits::is_static::value; apply(A, B, C, boost::mpl::bool_()); } - + private: // Decided at run time template @@ -934,7 +934,7 @@ struct size_switch_dmat_dmat_mult_t template void apply(MatrixA const& A, MatrixB const& B, MatrixC& C, boost::mpl::true_) { - const bool is_small= mtl::static_size::value <= SizeLimit || mtl::static_size::value <= SizeLimit + const bool is_small= mtl::static_size::value <= SizeLimit || mtl::static_size::value <= SizeLimit || mtl::static_size::value <= SizeLimit; typename boost::mpl::if_c::type()(A, B, C); } @@ -989,7 +989,7 @@ struct fully_unroll_dmat_dmat_mult_init_block }; -template struct fully_unroll_dmat_dmat_mult_block : public meta_math::loop3 @@ -1002,7 +1002,7 @@ struct fully_unroll_dmat_dmat_mult_block { Assign::update(C(base::index1, base::index2), A(base::index1, base::index0) * B(base::index0, base::index2)); next_t::apply(A, B, C); - } + } }; template @@ -1015,10 +1015,10 @@ struct fully_unroll_dmat_dmat_mult_block > struct fully_unroll_fixed_size_dmat_dmat_mult_t { @@ -1042,20 +1042,20 @@ struct fully_unroll_fixed_size_dmat_dmat_mult_t template typename boost::enable_if_c::value != 0 && static_size::value != 0>::type operator()(MatrixA const& A, MatrixB const& B, MatrixC& C) - { + { vampir_trace<1002> tracer; typedef typename static_num_rows::type size_type; - static const size_type rows_c= static_num_rows::value, cols_c= static_num_cols::value, + static const size_type rows_c= static_num_rows::value, cols_c= static_num_cols::value, cols_a= static_num_cols::value; // corresponds to C= A[all][0] * B[0][all]; - fully_unroll_dmat_dmat_mult_init_block<1, rows_c, 1, cols_c, Assign>::apply(A, B, C); + fully_unroll_dmat_dmat_mult_init_block<1, rows_c, 1, cols_c, Assign>::apply(A, B, C); // corresponds to C+= A[all][1:] * B[1:][all]; if necessary typedef fully_unroll_dmat_dmat_mult_block<2, cols_a, 1, rows_c, 1, cols_c, Assign> f2; typedef typename boost::mpl::if_c<(cols_a > 1), f2, noop>::type f3; f3::apply(A, B, C); } -}; +}; } // namespace mtl diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dot.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dot.hpp index 029cfa4a..cccc3caa 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dot.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/dot.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_DOT_INCLUDE @@ -24,12 +24,12 @@ #include #include -namespace mtl { +namespace mtl { namespace vector { namespace detail { - + // Result type of dot product template struct dot_result @@ -58,18 +58,18 @@ namespace mtl { } namespace sfunctor { - + template struct dot_aux : public meta_math::loop1 { typedef meta_math::loop1 base; typedef dot_aux next_t; - + template - static inline void - apply(Value& tmp00, Value& tmp01, Value& tmp02, Value& tmp03, Value& tmp04, - Value& tmp05, Value& tmp06, Value& tmp07, + static inline void + apply(Value& tmp00, Value& tmp01, Value& tmp02, Value& tmp03, Value& tmp04, + Value& tmp05, Value& tmp06, Value& tmp07, const Vector1& v1, const Vector2& v2, Size i, ConjOpt conj_opt) { // vampir_trace<9901> tracer; @@ -84,10 +84,10 @@ namespace mtl { struct dot_aux { typedef meta_math::loop1 base; - + template - static inline void - apply(Value& tmp00, Value&, Value&, Value&, Value&, Value&, Value&, Value&, + static inline void + apply(Value& tmp00, Value&, Value&, Value&, Value&, Value&, Value&, Value&, const Vector1& v1, const Vector2& v2, Size i, ConjOpt conj_opt) { tmp00+= conj_opt(v1[ i + base::index0 ]) * v2[ i + base::index0 ]; @@ -108,8 +108,8 @@ namespace mtl { vampir_trace<2003> tracer; MTL_THROW_IF(mtl::size(v1) != mtl::size(v2), incompatible_size()); typedef typename detail::dot_result::type value_type; - -# ifdef MTL_WITH_OPENMP + +# ifdef MTL_WITH_OPENMP value_type dummy, z= math::zero(dummy), result= z; typedef typename mtl::traits::omp_size_type::size_type>::type size_type; size_type i_max= mtl::size(v1), i_block= Unroll * (i_max / Unroll); @@ -128,7 +128,7 @@ namespace mtl { #pragma omp critical result+= ((tmp00 + tmp01) + (tmp02 + tmp03)) + ((tmp04 + tmp05) + (tmp06 + tmp07)); } - for (size_type i= i_block; i < i_max; i++) + for (size_type i= i_block; i < i_max; i++) result+= conj_opt(v1[i]) * v2[i]; return result; @@ -138,11 +138,11 @@ namespace mtl { value_type dummy, z= math::zero(dummy), tmp00= z, tmp01= z, tmp02= z, tmp03= z, tmp04= z, tmp05= z, tmp06= z, tmp07= z; size_type i_max= mtl::size(v1), i_block= Unroll * (i_max / Unroll); - + for (size_type i= 0; i < i_block; i+= Unroll) dot_aux<1, Unroll>::apply(tmp00, tmp01, tmp02, tmp03, tmp04, tmp05, tmp06, tmp07, v1, v2, i, conj_opt); - - for (size_type i= i_block; i < i_max; i++) + + for (size_type i= i_block; i < i_max; i++) tmp00+= conj_opt(v1[i]) * v2[i]; return ((tmp00 + tmp01) + (tmp02 + tmp03)) + ((tmp04 + tmp05) + (tmp06 + tmp07)); # endif @@ -173,7 +173,7 @@ namespace mtl { dot_class(const Vector1& v1, const Vector2& v2) : v1(v1), v2(v2) {} operator result_type() const { return sfunctor::dot::apply(v1, v2, ConjOpt()); } - + const Vector1& v1; const Vector2& v2; }; @@ -185,11 +185,11 @@ namespace mtl { dot_class(const Vector1& v1, const Vector2& v2) : v1(v1), v2(v2) {} operator result_type() const { return dot_simple(v1, v2, ConjOpt()); } - + const Vector1& v1; const Vector2& v2; }; - + /// Lazy dot product /** It is automatically evaluated when (implicitly) converted to result_type which doesn't work in template expressions. Can be used for source-to-source transformations. **/ @@ -257,7 +257,7 @@ namespace mtl { } // namespace vector - + using vector::dot; using vector::dot_real; using vector::lazy_dot; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue.hpp index afb3632f..96e3e17c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. // // Author Marc Hartung @@ -33,15 +33,15 @@ namespace mtl { namespace matrix { /** Not yet tested for complex matrices. **/ template class eigenvalue_solver { - + typedef typename Collection::value_type value_type; - typedef typename Collection::size_type size_type; - + typedef typename Collection::size_type size_type; + public: - + /** \brief Constructor needs a sqare-matrix as input * \param MTL-Matrix type - * + * */ eigenvalue_solver(const Matrix& IN) : ncols(num_cols(IN)), nrows(num_rows(IN)) { zero= math::zero(IN[0][0]); @@ -49,28 +49,28 @@ public: R = hessenberg(IN); I = Matrix(ncols,nrows); I = one; - + //Standartwert Initialisierung: - + maxIteration = 20*ncols*ncols; eps = 1.0e-8; } - - + + /** \brief Changes the zero-tolerance * \param value_type of allowed distance to zero */ void setTolerance(value_type in) { eps = in; } - + /** \brief Changes the number of allowed iterations * \param size_type variable of maximum allowed iterations - */ + */ void setMaxIteration(size_type in) { maxIteration = in; } - + /** \brief Starts the calculation of eigenvalues. */ void calc() { @@ -83,7 +83,7 @@ public: singleCont = std::abs(R[i][i-1])+1; compCont = getComplex2x2EW(i) + 1; while( allIt < maxIteration && std::abs(R[i][i-1])>eps) { - if(isRealEW(i)) { + if(isRealEW(i)) { if(std::abs(R[i][i-1])> of eigenvalues - */ - dense_vector > get_eigenvalues() + */ + dense_vector > get_eigenvalues() { using mtl::conj; dense_vector > res(ncols, 0.0); @@ -134,37 +134,37 @@ public: } if(i==0) { // zur Vermeidung von Zugriffsfehler res[0] = R[0][0]; - } + } return res; } - - - + + + private: Matrix R, I; size_type ncols, nrows, maxIteration; value_type zero, one, eps; - - + + bool isRealEW(size_type k) { if(std::abs(sqrt(square(R[k-1][k-1]+R[k][k])/4.0+R[k-1][k]*R[k][k-1]-R[k-1][k-1]*R[k][k])) >= 0.0) { return true; } return false; } - + /** \brief Calculates real eigenvalues of a 2x2-matrix defined by col/row k arround the diagonal of the input-matrix - * + * * First entry of the pair is the eigenvalue closer to the (kxk)-entry (Wilkinson-shift for single shifting) */ std::pair get2x2EW(const size_type k) { std::pair res; value_type front, back, comparator; - + front = (R[k-1][k-1]+R[k][k])/2.0; back = sqrt(square(R[k-1][k-1]+R[k][k])/4.0+R[k-1][k]*R[k][k-1]-R[k-1][k-1]*R[k][k]); comparator = R[k][k]-front; - + if( std::abs(comparator-back) < std::abs(comparator+back) ) { res.first = front+back; res.second = front-back; @@ -175,10 +175,10 @@ private: } return res; } - - + + /** \brief Calculates a complex eigenvalue of a 2x2-matrix defined by col/row k arround the diagonal of the input-matrix - * + * */ std::complex getComplex2x2EW(const size_type k) { std::complex res; @@ -187,39 +187,39 @@ private: res += (R[k-1][k-1]+R[k][k])/2.0; return res; } - + /** \brief Performes a double shift for submatrix defined by range r */ - - void doubleShift(irange r) + + void doubleShift(irange r) { using mtl::conj; value_type s,t; - + if(isRealEW(r.finish()-1)) { std::pair ews = get2x2EW(r.finish()-1); s = ews.first+ews.second; t = ews.first*ews.second; - } + } else { std::complex ew = getComplex2x2EW(r.finish()-1); s = 2.0*ew.real(); t = std::abs(ew*conj(ew)); } - + Matrix RIter(R[r][r]*R[r][r] - s*R[r][r] + t*I[r][r]); - + qr_givens_solver QR(RIter); QR.setTolerance(eps); QR.calc(); - + RIter = R[r][r]; R[r][r] = (QR.getQ()) * RIter * trans(QR.getQ()); - + } - - - + + + /** \brief Performes a single shift for submatrix defined by range r */ void singleShift(irange r) { @@ -228,13 +228,13 @@ private: sh = R[r.finish()-1][r.finish()-1]; } Matrix RIter(R[r][r] - sh*I[r][r]); //Shift wird abgezogen - + qr_givens_solver QR(RIter); //QR-Zerlegung QR.setTolerance(eps); QR.calc(); - + R[r][r] = ((QR.getR())*trans(QR.getQ())) + sh*I[r][r]; //QR-Iteration mit dem Rückshift - + } }; @@ -248,7 +248,7 @@ inline eigenvalues(const Matrix& A) eigenvalue_solver s(A); s.calc(); return s.get_eigenvalues(); -} +} }} // namespace mtl::matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue_symmetric.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue_symmetric.hpp index ef1f6f14..aa261125 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue_symmetric.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/eigenvalue_symmetric.hpp @@ -73,13 +73,13 @@ inline qr_sym_imp(const Matrix& A) h11= H[N-1][N-1]; //reduction, residuum and watch for breakdown - if(abs(h10) < tol * abs(h11 + h00)) - N--; - if (N < 2) + if(abs(h10) < tol * abs(h11 + h00)) + N--; + if (N < 2) break; - + // Wilkinson_shift - beta= (h00 - h11) / two; + beta= (h00 - h11) / two; mu = h11 + (beta != zero ? beta - signum(beta) * sqrt(beta * beta + h10 * h10) : -h10); a= H[0][0] - mu, b= H[1][0]; @@ -87,7 +87,7 @@ inline qr_sym_imp(const Matrix& A) for (size_type k = 0; k < N - 1; k++) { givens(H, a, b).trafo(k); if (k < N - 2) - a= H[k+1][k], b= H[k+2][k]; + a= H[k+1][k], b= H[k+2][k]; } } return diagonal(H); @@ -126,7 +126,7 @@ inline eigenvalue_symmetric(const Matrix& A, typename Collection::size_t return qr_algo(A, itMax == 0 ? num_rows(A) : itMax); } -#else +#else /// Calculation of eigenvalues of symmetric matrix A template @@ -145,7 +145,7 @@ inline eigenvalue_symmetric(const Matrix& A, typename Collection::size_t /// Calculation of eigenvalues of symmetric matrix A template mtl::vector::dense_vector::value_type, vector::parameters<> > -inline eigenvalue_symmetric(const Matrix& A, +inline eigenvalue_symmetric(const Matrix& A, typename Collection::size_type itMax= 0) { vampir_trace<5012> tracer; @@ -167,7 +167,7 @@ mtl::vector::dense_vector::value_type, vector::param inline eigenvalue_symmetric(const Matrix& A) { return eigenvalue_symmetric(A, 0); -} +} }} // namespace mtl::matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/element_structure_algorithms.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/element_structure_algorithms.hpp index 905192cd..f478a710 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/element_structure_algorithms.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/element_structure_algorithms.hpp @@ -26,7 +26,7 @@ void greedy_extract_element_structure(Element_struct& es, Matrix& M , std::stri typedef typename element_type::index_type index_type; typedef typename element_type::matrix_type matrix_type; // typedef typename element_type::neighbor_iterator neigh_iterator; - + #if 0 // Sparse matrices typedef glas::compressed_sparse_structure sparse_structure; @@ -40,7 +40,7 @@ void greedy_extract_element_structure(Element_struct& es, Matrix& M , std::stri std::vector row_start(M.ref_major()); std::vector col_idx(M.ref_minor()); std::vector values(M.data); - + const value_type ZERO = value_type(0); const usint nb_rows = num_rows( M ); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry1D.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry1D.hpp index fbeb44bc..1df0d43f 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry1D.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry1D.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ENTRY1D_INCLUDE @@ -28,7 +28,7 @@ namespace mtl { } template - inline typename Collection::value_type& + inline typename Collection::value_type& entry1D(Vector& v, typename Collection::size_type i) { return v[i]; @@ -41,13 +41,13 @@ namespace mtl { inline Vector& entry1D(multi_vector& A, typename Collection::size_type i) { return A.vector(i); - } + } template inline Vector const& entry1D(const multi_vector& A, typename Collection::size_type i) { return A.vector(i); - } + } } } // namespace mtl diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry_similar.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry_similar.hpp index eea2fee2..dbd81de4 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry_similar.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/entry_similar.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_ENTRY_SIMILAR_INCLUDE @@ -22,20 +22,20 @@ namespace mtl { namespace matrix { - + template - bool inline entry_similar(const Matrix& A, typename Collection::size_type i, + bool inline entry_similar(const Matrix& A, typename Collection::size_type i, typename Collection::size_type j, const Value& v, const Value& eps, tag::universe) { using std::abs; return abs(A[i][j] - v) <= eps; - } + } /// Compares A[i][j] with \p v returns false if larger than eps /** Function works on distributed matrices where only one process tests and the other return true. The functions enables writing tests that work in parallel (and all other platforms). **/ template - bool inline entry_similar(const Matrix& A, typename Collection::size_type i, + bool inline entry_similar(const Matrix& A, typename Collection::size_type i, typename Collection::size_type j, const Value& v, const Value& eps) { return entry_similar(A, i, j, v, eps, typename mtl::traits::category::type()); @@ -46,18 +46,18 @@ namespace mtl { namespace vector { template - bool inline entry_similar(const Vector& x, typename Collection::size_type i, + bool inline entry_similar(const Vector& x, typename Collection::size_type i, const Value& v, const Value& eps, tag::universe) { using std::abs; return abs(x[i] - v) <= eps; - } + } /// Compares x[i] with \p v returns false if larger than eps /** Function works on distributed matrices where only one process tests and the other return true. The functions enables writing tests that work in parallel (and all other platforms). **/ template - bool inline entry_similar(const Vector& x, typename Collection::size_type i, + bool inline entry_similar(const Vector& x, typename Collection::size_type i, const Value& v, const Value& eps) { return entry_similar(x, i, v, eps, typename mtl::traits::category::type()); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/evaluate_lazy.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/evaluate_lazy.hpp index cb54c22d..cf50e711 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/evaluate_lazy.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/evaluate_lazy.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_EVALUATE_LAZY_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/extended_complex.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/extended_complex.hpp index 2b79001c..0fa0adab 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/extended_complex.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/extended_complex.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_OPERATION_EXTENDED_COMPLEX_INCLUDE @@ -56,16 +56,16 @@ inline operator+(const complex& x, const complex& y) // =========== namespace detail { - + // To avoid stupid warnings on unary - for unsigned int specialize it template typename boost::disable_if, T>::type - inline negate_helper(const T& x) + inline negate_helper(const T& x) { return -x; } template typename boost::enable_if, T>::type - inline negate_helper(const T& x) + inline negate_helper(const T& x) { return T(0) - x; } } @@ -134,7 +134,7 @@ inline operator/(const T& x, const complex& y) { typedef typename mtl::traits::extended_complex::type type; type r(x); - return r/= type(real(y), imag(y)); + return r/= type(real(y), imag(y)); } template @@ -151,10 +151,10 @@ inline operator/(const complex& x, const complex& y) { typedef typename mtl::traits::extended_complex::type type; type r(real(x), imag(x)); - return r/= type(real(y), imag(y)); + return r/= type(real(y), imag(y)); } - + // ========== // Comparison // ========== diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fill.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fill.hpp index 28a5434c..234c0c33 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fill.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fill.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_FILL_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/frobenius_norm.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/frobenius_norm.hpp index 021bc546..33ae154f 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/frobenius_norm.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/frobenius_norm.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_FROBENIUS_NORM_INCLUDE @@ -34,7 +34,7 @@ inline frobenius_norm(const Matrix& matrix) vampir_trace<3010> tracer; using std::sqrt; using std::abs; using math::zero; namespace traits = mtl::traits; - typename traits::const_value::type value(matrix); + typename traits::const_value::type value(matrix); typedef typename Collection::value_type value_type; typedef typename RealMagnitude::type real_type; @@ -43,8 +43,8 @@ inline frobenius_norm(const Matrix& matrix) typedef typename traits::range_generator::type cursor_type; typedef typename traits::range_generator::type icursor_type; - for (cursor_type cursor = begin(matrix), cend = end(matrix); cursor != cend; ++cursor) - for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) + for (cursor_type cursor = begin(matrix), cend = end(matrix); cursor != cend; ++cursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) sum+= squared_abs(value(*icursor)); return sqrt(sum); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fuse.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fuse.hpp index ecc3e93a..734057ce 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fuse.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fuse.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_FUSE_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_expr.hpp index 99bb92c9..da84d43f 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_FUSED_EXPR_INCLUDE @@ -22,45 +22,45 @@ namespace mtl { -/// Expression template for fusing other expression +/// Expression template for fusing other expression template struct fused_expr { typedef boost::mpl::and_, traits::forward_index_evaluatable > forward; typedef boost::mpl::and_, traits::backward_index_evaluatable > backward; - fused_expr(T& first, U& second) - : first(first), second(second), delayed_assign(false) + fused_expr(T& first, U& second) + : first(first), second(second), delayed_assign(false) { first.delay_assign(); second.delay_assign(); } - + ~fused_expr() { if (!delayed_assign) eval(forward(), backward()); } - void delay_assign() const { delayed_assign= true; } + void delay_assign() const { delayed_assign= true; } template void forward_eval_loop(const TT& const_first_eval, const UU& const_second_eval, boost::mpl::false_) - { + { vampir_trace<6001> tracer; // hope there is a more elegant way; copying the arguments causes errors due to double destructor evaluation - TT& first_eval= const_cast(const_first_eval); + TT& first_eval= const_cast(const_first_eval); UU& second_eval= const_cast(const_second_eval); - MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); + MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); for (std::size_t i= 0, s= size(first_eval); i < s; i++) { first_eval(i); second_eval(i); - } + } } template void forward_eval_loop(const TT& const_first_eval, const UU& const_second_eval, boost::mpl::true_) - { + { vampir_trace<6002> tracer; // hope there is a more elegant way; copying the arguments causes errors due to double destructor evaluation - TT& first_eval= const_cast(const_first_eval); + TT& first_eval= const_cast(const_first_eval); UU& second_eval= const_cast(const_second_eval); - MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); + MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); const std::size_t s= size(first_eval), sb= s >> 2 << 2; @@ -87,17 +87,17 @@ struct fused_expr #endif // Currently lazy evaluation is only available on vector expressions, might change in the future // std::cout << "Forward evaluation\n"; - forward_eval_loop(index_evaluator(first), index_evaluator(second), to_unroll()); + forward_eval_loop(index_evaluator(first), index_evaluator(second), to_unroll()); } template void backward_eval_loop(const TT& const_first_eval, const UU& const_second_eval, boost::mpl::false_) - { + { vampir_trace<6003> tracer; // hope there is a more elegant way; copying the arguments causes errors due to double destructor evaluation - TT& first_eval= const_cast(const_first_eval); + TT& first_eval= const_cast(const_first_eval); UU& second_eval= const_cast(const_second_eval); - MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); + MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); for (std::size_t i= size(first_eval); i-- > 0; ) { // std::cout << "i is " << i << "\n"; @@ -107,12 +107,12 @@ struct fused_expr template void backward_eval_loop(const TT& const_first_eval, const UU& const_second_eval, boost::mpl::true_) - { + { vampir_trace<6004> tracer; // hope there is a more elegant way; copying the arguments causes errors due to double destructor evaluation - TT& first_eval= const_cast(const_first_eval); + TT& first_eval= const_cast(const_first_eval); UU& second_eval= const_cast(const_second_eval); - MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); + MTL_DEBUG_THROW_IF(mtl::vector::size(first_eval) != mtl::vector::size(second_eval), incompatible_size()); std::size_t s= size(first_eval), i= s-1, m= s % 4; for (; m; m--) { @@ -137,9 +137,9 @@ struct fused_expr // Sequential evaluation void eval(boost::mpl::false_, boost::mpl::false_) - { + { // std::cout << "Non-fused evaluation\n"; - evaluate_lazy(first); evaluate_lazy(second); + evaluate_lazy(first); evaluate_lazy(second); } T& first; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_index_evaluator.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_index_evaluator.hpp index 9c8f1513..c43756a9 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_index_evaluator.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/fused_index_evaluator.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_FUSED_INDEX_EVALUATOR_INCLUDE @@ -20,11 +20,11 @@ namespace mtl { namespace vector { template struct fused_index_evaluator { - fused_index_evaluator(T& first, U& second) + fused_index_evaluator(T& first, U& second) : first(index_evaluator(first)), second(index_evaluator(second)) {} template - void at(std::size_t i) + void at(std::size_t i) { first.template at(i); second.template at(i); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/givens.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/givens.hpp index 228f541a..76d468b0 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/givens.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/givens.hpp @@ -41,7 +41,7 @@ class givens { using std::abs; value_type zero= math::zero(a), one= math::one(b), t; - + if ( b == zero ) { c= one; s= zero; } else if ( abs(b) > abs(a) ) { @@ -67,9 +67,9 @@ class givens { irange r(k,k+2); // trans(H[r][ind])*= G; H[ind][r]*= G; // most compact form but does not work yet - + Matrix col_block(H[r][iall]), col_perm(trans(G) * col_block); - H[r][iall]= col_perm; + H[r][iall]= col_perm; Matrix row_perm(H[iall][r] * G); H[iall][r]= row_perm; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hermitian.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hermitian.hpp index a1460d26..c4c714fc 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hermitian.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hermitian.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_HERMITIAN_INCLUDE @@ -20,7 +20,7 @@ #include #include -namespace mtl { +namespace mtl { // vector version to be done @@ -33,7 +33,7 @@ namespace mtl { { static const unsigned code= mtl::traits::view_toggle_hermitian >::value; typedef typename mtl::traits::compose_view::type>::type result_type; - + static inline result_type apply(const Matrix& A) { return result_type(view_ref(A)); @@ -41,7 +41,7 @@ namespace mtl { }; } // namespace detail - + /// Return hermitian of matrix A template typename mtl::traits::enable_if_matrix::result_type >::type diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hessenberg.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hessenberg.hpp index 9408752e..f9952eae 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hessenberg.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/hessenberg.hpp @@ -126,7 +126,7 @@ Matrix inline hessenberg(const Matrix& A) Matrix H(nrows,ncols); H= hessenberg_factors(A); - + // H= bands(hessenberg_factors(A), -nrows, -1); // set (doubly) strict lower triangle to zero for(size_type row = 2; row < nrows; row++){ @@ -165,7 +165,7 @@ Matrix inline hessenberg_q(const Matrix& A) // std::cout<< "w=" << w << "\n"; for(size_type k = 1; k < size(v); k++) v[k]= A[nrows-k][i]; - + magnitude_type beta= two / abs(dot(v, v)); // abs: x+0i -> x if (beta != two) { //trans(Vector)*Matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/householder.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/householder.hpp index d435b2b7..ddb3e7da 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/householder.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/householder.hpp @@ -26,8 +26,8 @@ namespace mtl { namespace vector { -/// Computes Householder vector v and scalar b for vector \p y -/** such that identity_matrix(size(y))-b*v*v' projects the vector y +/// Computes Householder vector v and scalar b for vector \p y +/** such that identity_matrix(size(y))-b*v*v' projects the vector y to a positive multiple of the first unit vector. **/ template std::pair::value_type, parameters<> >, typename Collection::value_type> @@ -41,7 +41,7 @@ inline householder(Vector& y) Vector v(y); v[0]= one; - irange tail(1, imax); + irange tail(1, imax); value_type s( dot(v[tail], v[tail]) ), b, v0; //evaluation of v and b @@ -53,11 +53,11 @@ inline householder(Vector& y) b= 2 * v0 * v0 / (s + v0 * v0); // 2* complex??????? v/= v0; // normalization of the first entry } - + return std::make_pair(v,b); } -/// Computes Householder vector for vector \p y +/// Computes Householder vector for vector \p y /** More stable Householder transformation, also for non-square matrices. **/ template typename mtl::vector::dense_vector::value_type, parameters<> > @@ -74,7 +74,7 @@ inline householder_s(Vector& y) if(u[0] < 0){ s= -1; } else { - s= 1; + s= 1; } u[0]= u[0] + s * nu; u/= sqrt( dot(u, u) ); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/imag.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/imag.hpp index 53eefea2..ac0dd326 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/imag.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/imag.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_IMAG_INCLUDE @@ -71,7 +71,7 @@ namespace vector { { return imag_view(v); } -} +} namespace matrix { @@ -82,7 +82,7 @@ namespace matrix { { return imag_view(v); } -} +} } // namespace mtl diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/index_evaluator.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/index_evaluator.hpp index 41ef939f..2ebbd3e8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/index_evaluator.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/index_evaluator.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_INDEX_EVALUATOR_INCLUDE @@ -33,7 +33,7 @@ namespace mtl { /// Overloaded function that maps from lazy expressions to the according index-wise evaluation classes template -typename boost::enable_if, mtl::traits::is_vector >, +typename boost::enable_if, mtl::traits::is_vector >, mtl::vector::vec_vec_aop_expr >::type inline index_evaluator(lazy_assign& lazy) { @@ -41,7 +41,7 @@ inline index_evaluator(lazy_assign& lazy) } template -typename boost::enable_if, mtl::traits::is_scalar >, +typename boost::enable_if, mtl::traits::is_scalar >, mtl::vector::vec_scal_aop_expr >::type inline index_evaluator(lazy_assign& lazy) { @@ -55,7 +55,7 @@ inline index_evaluator(lazy_assign(lazy.first, lazy.second.v); } -template mtl::vector::dot_index_evaluator inline index_evaluator(lazy_assign, Assign>& lazy) diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/infinity_norm.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/infinity_norm.hpp index b0fb07df..6fcf34cd 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/infinity_norm.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/infinity_norm.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_INFINITY_NORM_INCLUDE @@ -45,7 +45,7 @@ namespace mtl { The norms are defined as \f$|v|_\infty=\max_i |v_i|\f$. - Vector norms are unrolled 8-fold by default. + Vector norms are unrolled 8-fold by default. An n-fold unrolling can be generated with infinity_norm(x). The maximum for n is 8 (it might be increased later). **/ @@ -62,16 +62,16 @@ namespace mtl { } namespace matrix { - - // Ignore unrolling for matrices + + // Ignore unrolling for matrices template typename mtl::traits::enable_if_matrix::value_type>::type>::type inline infinity_norm(const Matrix& matrix) { vampir_trace<3011> tracer; using mtl::impl::max_of_sums; - typename mtl::traits::row::type row(matrix); - return max_of_sums(matrix, mtl::traits::is_row_major::orientation>(), + typename mtl::traits::row::type row(matrix); + return max_of_sums(matrix, mtl::traits::is_row_major::orientation>(), row, num_rows(matrix)); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/inv.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/inv.hpp index f71b0481..e1bf872e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/inv.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/inv.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_INV_INCLUDE @@ -38,7 +38,7 @@ namespace traits { typedef typename Collection::value_type value_type; typedef ::mtl::matrix::dense2D type; }; - + } // traits /// Invert upper triangular matrix @@ -48,7 +48,7 @@ void inv_upper(Matrix const& A, MatrixOut& Inv) vampir_trace<5019> tracer; typedef typename Collection::value_type value_type; typedef typename Collection::size_type size_type; - + const size_type N= num_rows(A); MTL_DEBUG_THROW_IF(num_cols(A) != N, matrix_not_square()); MTL_DEBUG_THROW_IF(N != num_rows(Inv) || num_cols(A) != num_cols(Inv), incompatible_size()); @@ -65,7 +65,7 @@ void inv_upper(Matrix const& A, MatrixOut& Inv) /// Invert upper triangular matrix template -inline typename traits::inv::type +inline typename traits::inv::type inv_upper(Matrix const& A) { typedef typename Collection::size_type size_type; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/invert_diagonal.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/invert_diagonal.hpp index ca828298..87d42a02 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/invert_diagonal.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/invert_diagonal.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_INVERT_DIAGONAL_INCLUDE @@ -30,15 +30,15 @@ inline void invert_diagonal(Matrix& A) using math::reciprocal; namespace traits = mtl::traits; - typename traits::row::type row(A); - typename traits::col::type col(A); - typename traits::value::type value(A); + typename traits::row::type row(A); + typename traits::col::type col(A); + typename traits::value::type value(A); typedef typename traits::range_generator::type cursor_type; typedef typename traits::range_generator::type icursor_type; - - for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) - for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) + + for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) if (row(*icursor) == col(*icursor)) value(*icursor, reciprocal(value(*icursor))); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/iota.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/iota.hpp index aca39ca0..174dec32 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/iota.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/iota.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_VECTOR_IOTA_INCLUDE @@ -17,7 +17,7 @@ #include namespace mtl { namespace vector { - + /// Assigns sequentially increasing values to %vector v template void iota(Vector& v, const typename Collection::value_type offset= 0) diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/is_negative.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/is_negative.hpp index 88653b90..ef596381 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/is_negative.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/is_negative.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_IS_NEGATIVE_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy.hpp index 34ece755..ad1a53fd 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_LAZY_INCLUDE @@ -24,15 +24,15 @@ struct lazy_t lazy_t(T& data) : data(data) {} template - lazy_assign operator=(const U& other) + lazy_assign operator=(const U& other) { return lazy_assign(data, other); } template - lazy_assign operator+=(const U& other) + lazy_assign operator+=(const U& other) { return lazy_assign(data, other); } template - lazy_assign operator-=(const U& other) + lazy_assign operator-=(const U& other) { return lazy_assign(data, other); } T& data; @@ -40,12 +40,12 @@ struct lazy_t /// Do not compute or assign x immediately but delay it until explicitly performed template -inline lazy_t lazy(T& x) +inline lazy_t lazy(T& x) { return lazy_t(x); } /// Do not compute or assign x immediately but delay it until explicitly performed template -inline lazy_t lazy(const T& x) +inline lazy_t lazy(const T& x) { return lazy_t(x); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy_assign.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy_assign.hpp index f0173e72..649385d1 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy_assign.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lazy_assign.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_LAZY_ASSIGN_INCLUDE @@ -22,8 +22,8 @@ struct lazy_assign { typedef Assign assign_type; - lazy_assign(T& first, const U& second) : first(first), second(second) {} - void delay_assign() const {} + lazy_assign(T& first, const U& second) : first(first), second(second) {} + void delay_assign() const {} T& first; const U& second; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/left_scale_inplace.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/left_scale_inplace.hpp index 29da77a6..fa6cb0e6 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/left_scale_inplace.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/left_scale_inplace.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_LEFT_SCALE_INPLACE_INCLUDE @@ -30,7 +30,7 @@ namespace mtl { template inline Coll& left_scale_inplace(const Factor& alpha, tag::scalar, Coll& c) { - vampir_trace<3014> tracer; + vampir_trace<3014> tracer; assign_each_nonzero(c, tfunctor::scale::value_type>(alpha)); return c; @@ -39,15 +39,15 @@ namespace mtl { template inline Collection& left_scale_inplace(const Factor& alpha, tag::matrix, Collection& c) { - vampir_trace<3014> tracer; + vampir_trace<3014> tracer; Collection tmp(alpha * c); swap(tmp, c); return c; } } - + namespace matrix { - + /// Scale matrix \p c from left with scalar or matrix factor \p alpha; \p c is altered template typename mtl::traits::enable_if_matrix::type @@ -58,7 +58,7 @@ namespace mtl { } namespace vector { - + /// Scale vector \p c from left with scalar or matrix factor \p alpha; \p c is altered template typename mtl::traits::enable_if_vector::type diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/look_at_each_nonzero.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/look_at_each_nonzero.hpp index 9f20bbd3..e30aefe5 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/look_at_each_nonzero.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/look_at_each_nonzero.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_FOR_EACH_NONZERO_INCLUDE @@ -26,7 +26,7 @@ namespace mtl { namespace vector { - /// Perform \p f(v[i]) on each non-zero i in constant vector \p v; thus the must keep the result in its state + /// Perform \p f(v[i]) on each non-zero i in constant vector \p v; thus the must keep the result in its state template inline void look_at_each_nonzero(const Vector& v, Functor& f) { @@ -36,14 +36,14 @@ namespace mtl { f(*i); } - /// Perform \p f(v[i], i) on each non-zero i in constant vector \p v; thus the must keep the result in its state + /// Perform \p f(v[i], i) on each non-zero i in constant vector \p v; thus the must keep the result in its state template - typename mtl::traits::enable_if_vector::type // to be called for vectors only + typename mtl::traits::enable_if_vector::type // to be called for vectors only inline look_at_each_nonzero_pos(const Vector& v, Functor& f) { vampir_trace<2008> tracer; - typename mtl::traits::index::type index(v); - typename mtl::traits::const_value::type value(v); + typename mtl::traits::index::type index(v); + typename mtl::traits::const_value::type value(v); typedef typename traits::range_generator::type iterator; for (iterator i= begin(v), iend= end(v); i != iend; ++i) @@ -54,37 +54,37 @@ namespace mtl { namespace matrix { - /// Perform a potentially mutating \p f(A[i][j]) on each non-zero entry in matrix \p A + /// Perform a potentially mutating \p f(A[i][j]) on each non-zero entry in matrix \p A template inline void look_at_each_nonzero(const Matrix& A, Functor& f) { vampir_trace<3016> tracer; - typename mtl::traits::const_value::type value(A); + typename mtl::traits::const_value::type value(A); typedef typename mtl::traits::range_generator::type cursor_type; typedef typename mtl::traits::range_generator::type icursor_type; - for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) - for (icursor_type icursor = begin(cursor), icend = end(cursor); + for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) f(value(*icursor)); } - /// Perform a potentially mutating \p f(A[i][j], make_pair(i, j)) on each non-zero entry in matrix \p A + /// Perform a potentially mutating \p f(A[i][j], make_pair(i, j)) on each non-zero entry in matrix \p A template typename mtl::traits::enable_if_matrix::type // to be called for matrices only inline look_at_each_nonzero_pos(const Matrix& A, Functor& f) { vampir_trace<3017> tracer; - typename mtl::traits::row::type row(A); - typename mtl::traits::col::type col(A); - typename mtl::traits::const_value::type value(A); + typename mtl::traits::row::type row(A); + typename mtl::traits::col::type col(A); + typename mtl::traits::const_value::type value(A); typedef typename mtl::traits::range_generator::type cursor_type; typedef typename mtl::traits::range_generator::type icursor_type; - for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) - for (icursor_type icursor = begin(cursor), icend = end(cursor); + for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) f(value(*icursor), std::make_pair(row(*icursor), col(*icursor))); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lower_trisolve.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lower_trisolve.hpp index d42ba9ce..68f0b576 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lower_trisolve.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lower_trisolve.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_LOWER_TRISOLVE_INCLUDE @@ -47,13 +47,13 @@ namespace detail { typedef typename Collection::size_type size_type; typedef typename OrientedCollection::orientation my_orientation; typedef typename mtl::traits::category::type my_category; - typedef typename mtl::traits::range_generator::type a_cur_type; // row or col depending on Matrix - typedef typename mtl::traits::range_generator::type a_icur_type; + typedef typename mtl::traits::range_generator::type a_cur_type; // row or col depending on Matrix + typedef typename mtl::traits::range_generator::type a_icur_type; /// Construction from matrix \p A lower_trisolve_t(const Matrix& A) : A(A), value_a(A), col_a(A), row_a(A) { MTL_THROW_IF(num_rows(A) != num_cols(A), matrix_not_square()); } - + template struct generic_version : boost::mpl::int_<(mtl::traits::is_row_major::value ? 0 : 2) @@ -78,7 +78,7 @@ namespace detail { template void operator()(const VectorIn& v, VectorOut& w) const { vampir_trace<5022> tracer; apply(v, w, version()); } - + private: template @@ -87,7 +87,7 @@ namespace detail { template Value lower_trisolve_diavalue(const Value& v, tag::inverse_diagonal) const - { return v; } + { return v; } template int dia_inc(Tag) { return 0; } int dia_inc(tag::unit_diagonal) { return 1; } @@ -96,8 +96,8 @@ namespace detail { template void apply(const VectorIn& v, VectorOut& w, boost::mpl::int_<1>) const { - using namespace tag; - a_cur_type ac= begin(A), aend= end(A); + using namespace tag; + a_cur_type ac= begin(A), aend= end(A); for (size_type r= 0; ac != aend; ++r, ++ac) { a_icur_type aic= begin(ac), aiend= CompactStorage ? end(ac) : lower_bound(ac, r); typename Collection::value_type rr= v[r]; @@ -113,8 +113,8 @@ namespace detail { template void apply(const VectorIn& v, VectorOut& w, boost::mpl::int_<2>) const { - using namespace tag; - a_cur_type ac= begin(A), aend= end(A); + using namespace tag; + a_cur_type ac= begin(A), aend= end(A); for (size_type r= 0; ac != aend; ++r, ++ac) { a_icur_type aic= begin(ac), aiend= CompactStorage ? end(ac) : lower_bound(ac, r+1); MTL_THROW_IF(aic == aiend, missing_diagonal()); @@ -130,15 +130,15 @@ namespace detail { } w[r]= rr * lower_trisolve_diavalue(dia, DiaTag()); } - } + } // Generic column-major unit_diagonal template void apply(const VectorIn& v, VectorOut& w, boost::mpl::int_<3>) const { - using namespace tag; + using namespace tag; w= v; - a_cur_type ac= begin(A), aend= end(A); + a_cur_type ac= begin(A), aend= end(A); for (size_type r= 0; ac != aend; ++r, ++ac) { a_icur_type aic= CompactStorage ? begin(ac) : lower_bound(ac, r+1), aiend= end(ac); typename Collection::value_type rr= w[r]; @@ -156,7 +156,7 @@ namespace detail { { using namespace tag; w= v; - a_cur_type ac= begin(A), aend= end(A); + a_cur_type ac= begin(A), aend= end(A); for (size_type r= 0; ac != aend; ++r, ++ac) { a_icur_type aic= CompactStorage ? begin(ac) : lower_bound(ac, r), aiend= end(ac); MTL_DEBUG_THROW_IF(aic == aiend || row_a(*aic) != r, missing_diagonal()); @@ -177,7 +177,7 @@ namespace detail { if (num_rows(A) == 0) return; size_type j1= A.ref_major()[1]; for (size_type r= 0, rend= num_rows(A); r != rend; ++r) { - size_type j0= j1; + size_type j0= j1; j1= A.ref_major()[r+1]; typename Collection::value_type rr= v[r]; for (; j0 != j1; ++j0) { @@ -186,7 +186,7 @@ namespace detail { } w[r]= rr; } - } + } // Tuning for IC_0 and similar using compressed2D row-major compact with explicitly stored diagonal (possibly already inverted) template @@ -206,11 +206,11 @@ namespace detail { } w[r]= rr * lower_trisolve_diavalue(dia, DiaTag()); } - } + } const Matrix& A; - typename mtl::traits::const_value::type value_a; - typename mtl::traits::col::type col_a; + typename mtl::traits::const_value::type value_a; + typename mtl::traits::col::type col_a; typename mtl::traits::row::type row_a; }; @@ -222,16 +222,16 @@ template Vector inline lower_trisolve(const Matrix& A, const Vector& v) { Vector w(resource(v)); - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); return w; } -/// Solves the lower triangular matrix A with the rhs v +/// Solves the lower triangular matrix A with the rhs v template inline void lower_trisolve(const Matrix& A, const VectorIn& v, VectorOut& w) { - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); } @@ -240,7 +240,7 @@ template Vector inline unit_lower_trisolve(const Matrix& A, const Vector& v) { Vector w(resource(v)); - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); return w; } @@ -249,7 +249,7 @@ Vector inline unit_lower_trisolve(const Matrix& A, const Vector& v) template inline void unit_lower_trisolve(const Matrix& A, const VectorIn& v, VectorOut& w) { - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); } @@ -258,7 +258,7 @@ template Vector inline inverse_lower_trisolve(const Matrix& A, const Vector& v) { Vector w(resource(v)); - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); return w; } @@ -267,7 +267,7 @@ Vector inline inverse_lower_trisolve(const Matrix& A, const Vector& v) template inline void inverse_lower_trisolve(const Matrix& A, const VectorIn& v, VectorOut& w) { - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); } @@ -275,7 +275,7 @@ template Vector inline lower_trisolve(const Matrix& A, const Vector& v, DiaTag) { Vector w(resource(v)); - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); return w; } @@ -283,7 +283,7 @@ Vector inline lower_trisolve(const Matrix& A, const Vector& v, DiaTag) template inline void lower_trisolve(const Matrix& A, const VectorIn& v, VectorOut& w, DiaTag) { - detail::lower_trisolve_t solver(A); + detail::lower_trisolve_t solver(A); solver(v, w); } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lu.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lu.hpp index a80c60f8..0aae4aee 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lu.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/lu.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. // With contributions from Cornelius Steinhardt @@ -45,7 +45,7 @@ void inline lu(Matrix& LU, double eps= 0) MTL_THROW_IF(num_rows(LU) != num_cols(LU), matrix_not_square()); for (std::size_t k= 0; k < num_rows(LU)-1; k++) { - if(abs(LU[k][k]) <= eps) throw matrix_singular(); + if(abs(LU[k][k]) <= eps) throw matrix_singular(); irange r(k+1, imax); // Interval [k+1, n-1] LU[r][k]/= LU[k][k]; LU[r][r]-= LU[r][k] * LU[k][r]; @@ -72,11 +72,11 @@ void inline lu(Matrix& A, PermuationVector& P, double eps= 0) for (size_type i= 0; i < nrows-1; i++) { irange r(i+1, imax), ir(i, i+1); // Intervals [i+1, n-1], [i, i] size_type rmax= max_abs_pos(A[irange(i, imax)][ir]).first + i; - swap_row(A, i, rmax); + swap_row(A, i, rmax); swap_row(P, i, rmax); - + if(abs(A[i][i]) <= eps) throw matrix_singular(); // other gmres test doesn't work - + A[r][i]/= A[i][i]; // Scale column i A[r][r]-= A[r][i] * A[i][r]; // Decrease bottom right block of matrix } @@ -165,7 +165,7 @@ class lu_solver typedef mtl::vector::dense_vector > permutation_type; public: /// Construct from matrix \p A and use optionally threshold \p eps in factorization - explicit lu_solver(const Matrix& A, double eps= 0) + explicit lu_solver(const Matrix& A, double eps= 0) : LU(A), P(num_rows(A)) { lu(LU, P, eps); @@ -190,7 +190,7 @@ class lu_solver }; -}} // namespace mtl::matrix +}} // namespace mtl::matrix diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_sparse.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_sparse.hpp index fef68f3c..1435e15a 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_sparse.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_sparse.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_VECTOR_MAKE_SPARSE_INCLUDE @@ -82,7 +82,7 @@ make_sparse(const SizeVector1& rows, const SizeVector2& cols, const ValueVector& } /// Generates a matrix from the vectors \p rows, \p cols, and \p values. -/** A sparse matrix is created (compressed2D). +/** A sparse matrix is created (compressed2D). The number of rows/columns is one plus the maximum of the entries of \p rows and \p cols. The value type is the same as the element type of the value vector and the size type the same as the entries of the vectors with the row indices. @@ -97,7 +97,7 @@ make_sparse(const SizeVector1& rows, const SizeVector2& cols, const ValueVector& } /// Generates an empty \p m by \p n matrix. -/** A sparse matrix is created (compressed2D). +/** A sparse matrix is created (compressed2D). Same as Matlab's sparse function besides that it is zero-indexed. **/ inline matrix::compressed2D make_sparse(std::size_t m, std::size_t n) diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_tag_vector.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_tag_vector.hpp index b41d2db7..0e65b599 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_tag_vector.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/make_tag_vector.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG, www.simunova.com. +// 2010 SimuNova UG, www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also tools/license/license.mtl.txt in the distribution. #ifndef MTL_MAKE_TAG_VECTOR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_cvec_times_expr.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_cvec_times_expr.hpp index 5eb8d8f8..a5034445 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_cvec_times_expr.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_cvec_times_expr.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_CVEC_TIMES_EXPR_INCLUDE @@ -21,7 +21,7 @@ namespace mtl { template -struct mat_cvec_times_expr +struct mat_cvec_times_expr : public bin_op_expr< E1, E2 >, public mtl::vector::vec_expr< mat_cvec_times_expr > { @@ -31,7 +31,7 @@ struct mat_cvec_times_expr typedef typename Multiplicable::value_type, typename Collection::value_type>::result_type value_type; typedef typename Collection::size_type size_type; - + mat_cvec_times_expr( E1 const& matrix, E2 const& vector ) : base(matrix, vector) {} }; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_vec_mult.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_vec_mult.hpp index 184cd648..43ab7c71 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_vec_mult.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mat_vec_mult.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAT_VEC_MULT_INCLUDE @@ -53,7 +53,7 @@ namespace impl { { Assign::update(w[base::index0], A[base::index0][base::index1] * v[base::index1]); next_t::apply(A, v, w); - } + } }; // need specialization here for not going back to column 0 but column 1 @@ -69,7 +69,7 @@ namespace impl { { Assign::update(w[base::index0], A[base::index0][base::index1] * v[base::index1]); next_t::apply(A, v, w); - } + } }; template @@ -82,7 +82,7 @@ namespace impl { static inline void apply(const Matrix& A, const VectorIn& v, VectorOut& w) { Assign::update(w[base::index0], A[base::index0][base::index1] * v[base::index1]); - } + } }; struct noop @@ -102,15 +102,15 @@ inline void dense_mat_cvec_mult(const Matrix& A, const VectorIn& v, VectorOut& w assert(rows_a > 0 && cols_a > 0); // w= A[all][0] * v[0]; N.B.: 1D is unrolled by the compiler faster (at least on gcc) - for (size_type i= 0; i < rows_a; i++) + for (size_type i= 0; i < rows_a; i++) Assign::first_update(w[i], A[i][0] * v[0]); - + // corresponds to w+= A[all][1:] * v[1:]; if necessary typedef impl::fully_unroll_mat_cvec_mult<1, rows_a, 2, cols_a, Assign> f2; typedef typename boost::mpl::if_c<(cols_a > 1), f2, impl::noop>::type f3; f3::apply(A, v, w); } - + template struct init_ptrs { @@ -159,7 +159,7 @@ struct square_cvec_mult_rows template struct square_cvec_mult_cols -{ +{ template inline static void compute(Tmps& tmps, Ptrs& ptrs, VPtr vp) { @@ -170,21 +170,21 @@ struct square_cvec_mult_cols template struct square_cvec_mult_cols -{ +{ template inline static void compute(Tmps&, Ptrs&, VPtr) {} }; // Dense matrix vector multiplication with run-time matrix size -template inline void square_cvec_mult(const dense2D& A, const mtl::vector::dense_vector& v, VectorOut& w, Assign) { // vampir_trace<3067> tracer; MTL_STATIC_ASSERT((mtl::traits::is_row_major::value), "Only row-major matrices supported in this function."); - typedef typename Collection::value_type value_type; + typedef typename Collection::value_type value_type; multi_tmp tmps(math::zero(w[0])); multi_tmp ptrs; @@ -204,7 +204,7 @@ inline dense_mat_cvec_mult(const dense2D& A, const mtl::vector::d { // vampir_trace<3066> tracer; - using math::zero; + using math::zero; if (mtl::vector::size(w) == 0) return; typedef typename Collection::value_type value_type; @@ -212,7 +212,7 @@ inline dense_mat_cvec_mult(const dense2D& A, const mtl::vector::d typedef typename MPara::size_type size_type; const size_type nr= num_rows(A), nc= num_cols(A); - if (nr == nc && nr <= 8) + if (nr == nc && nr <= 8) switch (nr) { case 1: Assign::first_update(w[0], A[0][0] * v[0]); return; case 2: square_cvec_mult<2>(A, v, w, Assign()); return; @@ -248,7 +248,7 @@ inline dense_mat_cvec_mult(const dense2D& A, const mtl::vector::d for (size_type i= nrb; i < nr; i++) { value_type tmp= z; const ValueIn* vp= &v[0]; - for (const MValue *p0= &A[i][0], *pe= p0 + nc; p0 != pe; ) + for (const MValue *p0= &A[i][0], *pe= p0 + nc; p0 != pe; ) tmp+= *p0++ * *vp++; Assign::first_update(w[i], tmp); } @@ -262,7 +262,7 @@ inline void dense_mat_cvec_mult(const Matrix& A, const VectorIn& v, VectorOut& w vampir_trace<3018> tracer; // Naive implementation, will be moved to a functor and complemented with more efficient ones - using math::zero; + using math::zero; if (mtl::vector::size(w) == 0) return; // std::cout << "Bin in richtiger Funktion\n"; @@ -292,7 +292,7 @@ inline void dense_mat_cvec_mult(const Matrix& A, const VectorIn& v, VectorOut& w for (size_type i= nrb; i < nr; i++) { value_type tmp= z; - for (size_type j= 0; j < nc; j++) + for (size_type j= 0; j < nc; j++) tmp+= A[i][j] * v[j]; Assign::first_update(w[i], tmp); } @@ -389,15 +389,15 @@ template tracer; - using namespace tag; - using mtl::traits::range_generator; + using namespace tag; + using mtl::traits::range_generator; using math::zero; using mtl::vector::set_to_zero; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type a_icur_type; - typename mtl::traits::col::type col_a(A); - typename mtl::traits::const_value::type value_a(A); + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type a_icur_type; + typename mtl::traits::col::type col_a(A); + typename mtl::traits::const_value::type value_a(A); if (Assign::init_to_zero) set_to_zero(w); @@ -405,8 +405,8 @@ inline void smat_cvec_mult(const Matrix& A, const VectorIn& v, VectorOut& w, Ass a_cur_type ac= begin(A), aend= end(A); for (unsigned i= 0; ac != aend; ++ac, ++i) { value_type tmp= zero(w[i]); - for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) - tmp+= value_a(*aic) * v[col_a(*aic)]; + for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) + tmp+= value_a(*aic) * v[col_a(*aic)]; Assign::update(w[i], tmp); } } @@ -419,7 +419,7 @@ inline void vsmat_cvec_mult(const compressed2D& A, const VectorIn using math::zero; typedef compressed2D Matrix; - typedef typename Collection::size_type size_type; + typedef typename Collection::size_type size_type; typedef typename Collection::value_type value_type; if (size(w) == 0) return; @@ -455,11 +455,11 @@ struct crs_cvec_mult_block template void first_update(VectorOut& w, SizeType i, const TBlock& tmp, Assign as) const - { + { Assign::first_update(w[i + Index], tmp.value); sub.first_update(w, i, tmp.sub, as); } - + crs_cvec_mult_block sub; }; @@ -476,7 +476,7 @@ struct crs_cvec_mult_block template void first_update(VectorOut& w, SizeType i, const TBlock& tmp, Assign) const - { + { Assign::first_update(w[i + BSize], tmp.value); } }; @@ -550,19 +550,19 @@ inline adapt_crs_cvec_mult(const compressed2D& A, const VectorIn& assert(!Assign::init_to_zero); typedef compressed2D Matrix; - typedef typename Collection::size_type size_type; + typedef typename Collection::size_type size_type; typedef typename Collection::value_type value_type; const value_type z(math::zero(w[0])); size_type nr= num_rows(A), nrb= nr / 4 * 4, nrb2= nr / 64 * 64; - for (size_type i1= 0; i1 < nrb2; i1+= 64) + for (size_type i1= 0; i1 < nrb2; i1+= 64) if (A.ref_major()[i1] != A.ref_major()[i1 + 64]) for (size_type i2= i1, i2e= i1+64; i2 < i2e; i2+= 16) if (A.ref_major()[i2] != A.ref_major()[i2 + 16]) - for (size_type i= i2, i3e= i2+16; i < i3e; i+= 4) + for (size_type i= i2, i3e= i2+16; i < i3e; i+= 4) if (A.ref_major()[i] != A.ref_major()[i + 4]) { - const size_type cj0= A.ref_major()[i], cj1= A.ref_major()[i+1], cj2= A.ref_major()[i+2], + const size_type cj0= A.ref_major()[i], cj1= A.ref_major()[i+1], cj2= A.ref_major()[i+2], cj3= A.ref_major()[i+3], cj4= A.ref_major()[i+4]; value_type tmp0(z), tmp1(z), tmp2(z), tmp3(z); for (size_type j0= cj0; j0 != cj1; ++j0) @@ -580,9 +580,9 @@ inline adapt_crs_cvec_mult(const compressed2D& A, const VectorIn& Assign::first_update(w[i+3], tmp3); } - for (size_type i= nrb2; i < nrb; i+= 4) + for (size_type i= nrb2; i < nrb; i+= 4) if (A.ref_major()[i] != A.ref_major()[i + 4]) { - const size_type cj0= A.ref_major()[i], cj1= A.ref_major()[i+1], cj2= A.ref_major()[i+2], + const size_type cj0= A.ref_major()[i], cj1= A.ref_major()[i+1], cj2= A.ref_major()[i+2], cj3= A.ref_major()[i+3], cj4= A.ref_major()[i+4]; value_type tmp0(z), tmp1(z), tmp2(z), tmp3(z); for (size_type j0= cj0; j0 != cj1; ++j0) @@ -634,7 +634,7 @@ inline smat_cvec_mult(const compressed2D& A, const VectorIn& v, V if (nr > 10) { size_type nh= nr / 2, nq= nr / 4, nt= nr - nq; if (!as.init_to_zero && - (A.ref_major()[1] == A.ref_major()[0] + (A.ref_major()[1] == A.ref_major()[0] || A.ref_major()[nq] == A.ref_major()[nq+1] || A.ref_major()[nh] == A.ref_major()[nh+1] || A.ref_major()[nt] == A.ref_major()[nt+1] @@ -653,7 +653,7 @@ inline smat_cvec_mult(const compressed2D& A, const VectorIn& v, V # pragma omp for #endif for (size_type i= 0; i < nrb; i+= 4) { - const size_type cj0= A.ref_major()[i], cj1= A.ref_major()[i+1], cj2= A.ref_major()[i+2], + const size_type cj0= A.ref_major()[i], cj1= A.ref_major()[i+1], cj2= A.ref_major()[i+2], cj3= A.ref_major()[i+3], cj4= A.ref_major()[i+4]; value_type tmp0(z), tmp1(z), tmp2(z), tmp3(z); for (size_type j0= cj0; j0 != cj1; ++j0) @@ -750,7 +750,7 @@ inline smat_cvec_mult(const sparse_banded& A, const VectorIn& v, const MValue* Aps= A.ref_data() + (from * nb + begin_pos); - const band_size_type blocked_to= ((to - from) & -4) + from; + const band_size_type blocked_to= ((to - from) & -4) + from; assert((blocked_to - from) % 4 == 0 && blocked_to >= band_size_type(from) && blocked_to <= band_size_type(to)); for (band_size_type r= from; r < blocked_to; r+= 4) { value_type tmp0(z), tmp1(z), tmp2(z), tmp3(z); @@ -776,7 +776,7 @@ inline smat_cvec_mult(const sparse_banded& A, const VectorIn& v, Assign::first_update(w[r], tmp); Aps+= nb; } - + if (begin_pos > 0) { if (begin_rows[begin_pos-1] == to) begin_pos--; @@ -807,20 +807,20 @@ inline void smat_cvec_mult(const Matrix& A, const VectorIn& v, VectorOut& w, Ass { vampir_trace<3023> tracer; using namespace tag; namespace traits = mtl::traits; - using traits::range_generator; + using traits::range_generator; using mtl::vector::set_to_zero; - typedef typename range_generator::type a_cur_type; - typedef typename range_generator::type a_icur_type; + typedef typename range_generator::type a_cur_type; + typedef typename range_generator::type a_icur_type; - typename traits::row::type row_a(A); - typename traits::const_value::type value_a(A); + typename traits::row::type row_a(A); + typename traits::const_value::type value_a(A); if (Assign::init_to_zero) set_to_zero(w); unsigned rv= 0; // traverse all rows of v for (a_cur_type ac= begin(A), aend= end(A); ac != aend; ++ac, ++rv) { - typename Collection::value_type vv= v[rv]; - for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) + typename Collection::value_type vv= v[rv]; + for (a_icur_type aic= begin(ac), aiend= end(ac); aic != aiend; ++aic) Assign::update(w[row_a(*aic)], value_a(*aic) * vv); } } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/matrix_bracket.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/matrix_bracket.hpp index 22648dd8..32d7d87c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/matrix_bracket.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/matrix_bracket.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_BRACKETS_INCLUDE @@ -42,10 +42,10 @@ namespace mtl { namespace operations { template struct my_traits { static const bool value= boost::is_same::value && row_traits::exists; }; template - typename boost::lazy_enable_if_c::value, row_traits>::type - operator[] (const T& col_range) - { - return row_traits::apply(matrix, row, col_range); + typename boost::lazy_enable_if_c::value, row_traits>::type + operator[] (const T& col_range) + { + return row_traits::apply(matrix, row, col_range); } protected: Ref matrix; @@ -71,7 +71,7 @@ namespace mtl { namespace operations { template struct my_traits { static const bool value = boost::is_integral::value && col_traits::exists; }; template - typename boost::lazy_enable_if_c::value, col_traits>::type + typename boost::lazy_enable_if_c::value, col_traits>::type operator[] (T col) { return col_traits::apply(matrix, row_range, col); } protected: diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max.hpp index f5d932be..57e50f99 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAX_INCLUDE @@ -30,7 +30,7 @@ namespace mtl { namespace vector { // Do we really need this for matrices? // Then we need a different dispatching - + template typename Collection::value_type inline max(const Vector& vector, tag::vector) @@ -38,7 +38,7 @@ namespace mtl { namespace vector { typedef typename Collection::value_type result_type; return vector::reduction::apply(vector); } - + } // namespace impl ///Returns maximal entry of %vector v diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_abs_pos.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_abs_pos.hpp index 36863a79..d29995b8 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_abs_pos.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_abs_pos.hpp @@ -22,7 +22,7 @@ #include #include -namespace mtl { +namespace mtl { namespace matrix { ///Returns pair (row, col) from absolut maximal entry of %matrix A @@ -39,21 +39,21 @@ namespace matrix { typename RealMagnitude::type max(abs(A[0][0])); size_type r= 0, c= 0; - typename traits::row::type row(A); - typename traits::col::type col(A); - typename traits::const_value::type value(A); + typename traits::row::type row(A); + typename traits::col::type col(A); + typename traits::const_value::type value(A); typedef typename traits::range_generator::type cursor_type; - + for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) { typedef typename traits::range_generator::type icursor_type; - for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) if (abs(value(*icursor)) > max) { max= abs(value(*icursor)); r= row(*icursor); c= col(*icursor); } } - + return std::make_pair(r, c); } @@ -73,7 +73,7 @@ namespace vector { size_type i= 0; size_type max_col= size(v); value_type max(abs(v[0])); - + for(size_type j= 1; j < max_col; j++) if(abs(v[j]) > max) { max = abs(v[j]); diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_of_sums.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_of_sums.hpp index 5e1f862a..2853410e 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_of_sums.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_of_sums.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MAX_OF_SUMS_INCLUDE @@ -28,7 +28,7 @@ namespace mtl { namespace impl { -// We need property map of the minor index +// We need property map of the minor index template typename RealMagnitude::value_type>::type inline max_of_sums(const Matrix& matrix, bool aligned, MinorIndex minor_index, unsigned dim2) @@ -46,7 +46,7 @@ inline max_of_sums(const Matrix& matrix, bool aligned, MinorIndex minor_index, u typedef typename traits::range_generator::type cursor_type; typedef typename traits::range_generator::type icursor_type; - typename traits::const_value::type value(matrix); + typename traits::const_value::type value(matrix); if (aligned) { real_type maxv= my_zero; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_pos.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_pos.hpp index 3126c668..e592c48c 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_pos.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/max_pos.hpp @@ -30,10 +30,10 @@ -namespace mtl { +namespace mtl { namespace vector { - + template struct max_pos_functor { @@ -42,7 +42,7 @@ namespace mtl { typedef std::pair result_type; // initialize with max value and max position - max_pos_functor() + max_pos_functor() { value.first= math::identity(math::max(), value_type()); // minimal value for comparison value.second= math::identity(math::min(), pos_type()); // maximal position to check if changed @@ -93,21 +93,21 @@ namespace matrix { value_type max(A[0][0]); size_type r= 0, c= 0; - typename traits::row::type row(A); - typename traits::col::type col(A); - typename traits::const_value::type value(A); + typename traits::row::type row(A); + typename traits::col::type col(A); + typename traits::const_value::type value(A); typedef typename traits::range_generator::type cursor_type; - + for (cursor_type cursor = begin(A), cend = end(A); cursor != cend; ++cursor) { typedef typename traits::range_generator::type icursor_type; - for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) + for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) if (value(*icursor) > max) { max= value(*icursor); r= row(*icursor); c= col(*icursor); } } - + return std::make_pair(r, c); } @@ -123,10 +123,10 @@ namespace vector { typedef typename Collection::value_type value_type; size_type i= 0; - + size_type max_col= size(v); value_type max(v[0]); - + for(size_type j= 1;i < max_col; j++) if(v[j] > max) { max = v[j]; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_matrix.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_matrix.hpp index 6b846d1b..86e00d77 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_matrix.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_matrix.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MATRIX_MERGE_COMPLEX_MATRIX_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_vector.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_vector.hpp index efb08f62..3be20303 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_vector.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/merge_complex_vector.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_VECTOR_MERGE_COMPLEX_VECTOR_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min.hpp index 2b2e9e88..1213d9ec 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MIN_INCLUDE @@ -37,10 +37,10 @@ namespace mtl { namespace vector { typedef typename Collection::value_type result_type; return vector::reduction::apply(vector); } - + } // namespace impl -///Returns minimal value of %vector v +///Returns minimal value of %vector v template typename Collection::value_type inline min(const Value& value) @@ -58,7 +58,7 @@ inline min(const Value& value) } // namespace vector using vector::min; - + } // namespace mtl #endif // MTL_MIN_INCLUDE diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min_pos.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min_pos.hpp index 4074dbd8..611a5200 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min_pos.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/min_pos.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MIN_POS_INCLUDE @@ -25,7 +25,7 @@ namespace mtl { namespace vector { - + template struct min_pos_functor { @@ -34,7 +34,7 @@ namespace mtl { typedef std::pair result_type; // initialize with max value and max position - min_pos_functor() : value(math::identity(math::min(), result_type())) {} + min_pos_functor() : value(math::identity(math::min(), result_type())) {} void operator()(const value_type& x, const pos_type& p) { diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/minimal_increase.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/minimal_increase.hpp index 1e6a13e0..4d1005b7 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/minimal_increase.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/minimal_increase.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. +// +// Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. -// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +// 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MINIMAL_INCREASE_INCLUDE @@ -24,8 +24,8 @@ T inline minimal_increase(const T& x) const T factor= T(1) + T(2) * std::numeric_limits::epsilon(); if (x == T(0)) return std::numeric_limits::denorm_min(); - else - return x > T(0) ? x * factor : x / factor; + else + return x > T(0) ? x * factor : x / factor; } diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult.hpp index 7d41425b..5b79fde6 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MULT_INCLUDE @@ -37,7 +37,7 @@ namespace mtl { namespace matrix { -/// Multiplication: mult(a, b, c) computes c= a * b; +/// Multiplication: mult(a, b, c) computes c= a * b; /** The 3 types must be compatible, e.g. all three matrices or b and c are column vectors and a is a matrix. The dimensions are checked at compile time. **/ template @@ -45,7 +45,7 @@ typename mtl::traits::enable_if_matrix::type inline mult(const A& a, const B& b, C& c) { vampir_trace<4010> tracer; - MTL_DEBUG_THROW_IF(static_cast(&a) == static_cast(&c) + MTL_DEBUG_THROW_IF(static_cast(&a) == static_cast(&c) || static_cast(&b) == static_cast(&c), argument_result_conflict()); @@ -56,7 +56,7 @@ inline mult(const A& a, const B& b, C& c) } -/// Multiplication: mult_add(a, b, c) computes c+= a * b; +/// Multiplication: mult_add(a, b, c) computes c+= a * b; /** The 3 types must be compatible, e.g. all three matrices or b and c are column vectors and a is a matrix. The dimensions are checked at compile time. **/ template @@ -71,7 +71,7 @@ inline mult_add(const A& a, const B& b, C& c) } -/// Four term multiplication: mult(a, x, y, z) computes z= a * x + y; +/// Four term multiplication: mult(a, x, y, z) computes z= a * x + y; /** The 4 types must be compatible, i.e. a*x must be assignable to z and z must be incrementable by y. Right now, it is not more efficient than z= a * x; z+= y. For compatibility with MTL2. **/ template @@ -90,9 +90,9 @@ inline void gen_mult(const MatrixA& a, const MatrixB& b, MatrixC& c, Assign, tag vampir_trace<4011> tracer; #if 1 MTL_DEBUG_THROW_IF((const void*)&a == (const void*)&c || (const void*)&b == (const void*)&c, argument_result_conflict()); -#else +#else if ((const void*)&a == (const void*)&c || (const void*)&b == (const void*)&c) { - C tmp(num_rows(c), num_cols(c)); + C tmp(num_rows(c), num_cols(c)); mult(a, b, tmp); swap(C, tmp); return; @@ -108,10 +108,10 @@ inline void gen_mult(const MatrixA& a, const MatrixB& b, MatrixC& c, Assign, tag /// Dense matrix multiplication -/** The function for dense matrix multiplication defines a default multiplication functor. - Alternatively the user can define his own functors for specific triplets of matrix types, +/** The function for dense matrix multiplication defines a default multiplication functor. + Alternatively the user can define his own functors for specific triplets of matrix types, see detail::dmat_dmat_mult_specialize. - The default functor for dense matrix multiplication is: + The default functor for dense matrix multiplication is: -# Use BLAS if available, otherwise -# Recursive multiplication with: -# Platform optimized mult on blocks if available, otherwise @@ -123,7 +123,7 @@ template inline void mat_mat_mult(const MatrixA& A, const MatrixB& b, MatrixC& c, Assign, tag::flat, tag::flat, tag::flat) { vampir_trace<4012> tracer; - using assign::plus_sum; using assign::assign_sum; + using assign::plus_sum; using assign::assign_sum; static const unsigned long tiling1= detail::dmat_dmat_mult_tiling1::value; static const unsigned long tiling2= detail::dmat_dmat_mult_tiling2::value; @@ -137,7 +137,7 @@ inline void mat_mat_mult(const MatrixA& A, const MatrixB& b, MatrixC& c, Assign, typedef fully_unroll_fixed_size_dmat_dmat_mult_t fully_unroll_t; typedef size_switch_dmat_dmat_mult_t fixed_size_t; - static const bool all_static= mtl::traits::is_static::value && mtl::traits::is_static::value + static const bool all_static= mtl::traits::is_static::value && mtl::traits::is_static::value && mtl::traits::is_static::value; typedef static_switch_dmat_dmat_mult_t default_functor_t; @@ -191,15 +191,15 @@ inline void mat_mat_mult(const MatrixA& A, const MatrixB& b, MatrixC& c, Assign, /// Product of sparse times dense matrix /** This function (specialization of mult) is intended to multiply sparse matrices with multiple matrices gathered into a dense matrix. Likewise, the resulting dense matrix corresponds to multiple vectors. - The default functor for this operation is: + The default functor for this operation is: -# Use tiled multiplication if available, otherwise - -# Naive multiplication + -# Naive multiplication **/ template inline void mat_mat_mult(const MatrixA& A, const MatrixB& b, MatrixC& c, Assign, tag::flat, tag::flat, tag::flat) { vampir_trace<4012> tracer; - using assign::plus_sum; using assign::assign_sum; + using assign::plus_sum; using assign::assign_sum; using namespace functor; // static const unsigned long tiling1= detail::dmat_dmat_mult_tiling1::value; @@ -267,7 +267,7 @@ inline void gen_mult(const Matrix& A, const VectorIn& v, VectorOut& w, Assign, t // -> result should be a matrix too // Check if element types are compatible (in contrast to tag dispatching, nesting is considered here) - MTL_STATIC_ASSERT((boost::is_same< typename ashape::mult_op::type, + MTL_STATIC_ASSERT((boost::is_same< typename ashape::mult_op::type, typename ashape::ashape::type >::type, ::mtl::ashape::mat_cvec_mult >::value), @@ -278,7 +278,7 @@ inline void gen_mult(const Matrix& A, const VectorIn& v, VectorOut& w, Assign, t MTL_DEBUG_THROW_IF((void*)&v == (void*)&w, argument_result_conflict()); #else if ((void*)&v == (void*)&w) { - VectorOut tmp(size(w)); + VectorOut tmp(size(w)); mult(A, b, tmp); swap(w, tmp); return; @@ -302,7 +302,7 @@ inline void gen_mult(const VectorIn& v, const Matrix& A, VectorOut& w, Assign, t // -> result should be a matrix too // Check if element types are compatible (in contrast to tag dispatching, nesting is considered here) - MTL_STATIC_ASSERT((boost::is_same< typename ashape::mult_op::type, + MTL_STATIC_ASSERT((boost::is_same< typename ashape::mult_op::type, typename ashape::ashape::type >::type, ::mtl::ashape::rvec_mat_mult >::value), @@ -312,7 +312,7 @@ inline void gen_mult(const VectorIn& v, const Matrix& A, VectorOut& w, Assign, t MTL_DEBUG_THROW_IF((void*)&v == (void*)&w, argument_result_conflict()); #else if ((void*)&v == (void*)&w) { - VectorOut tmp(size(w)); + VectorOut tmp(size(w)); mult(A, b, tmp); swap(w, tmp); return; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_assign_mode.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_assign_mode.hpp index 9e656bc1..571fdc54 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_assign_mode.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_assign_mode.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MULT_ASSIGN_MODE_INCLUDE @@ -27,7 +27,7 @@ namespace detail { typedef Assign type; }; - template<> + template<> struct subm_assign { typedef plus_sum type; @@ -38,14 +38,14 @@ namespace detail { // Set assign_mode of functor 'Mult' to 'Assign' // including assign_mode of backup functors and functors for sub-matrices template -struct mult_assign_mode +struct mult_assign_mode {}; #if 0 // Omit the fully typed functors; they shouldn't be used directly template + typename Assign> struct mult_assign_mode, Assign> { @@ -60,43 +60,43 @@ struct mult_assign_mode typedef no_op type; }; -template +template struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_dmat_dmat_mult_t type; }; -template +template struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_cursor_dmat_dmat_mult_t type; }; -template -struct mult_assign_mode, Assign> +template +struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_tiling_dmat_dmat_mult_t type; }; -template -struct mult_assign_mode, Assign> +template +struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_tiling_44_dmat_dmat_mult_t type; }; -template -struct mult_assign_mode, Assign> +template +struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_tiling_22_dmat_dmat_mult_t type; }; -template -struct mult_assign_mode, Assign> +template +struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; @@ -107,15 +107,15 @@ struct mult_assign_mode type; }; -template -struct mult_assign_mode, Assign> +template +struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_platform_dmat_dmat_mult_t type; }; -template -struct mult_assign_mode, Assign> +template +struct mult_assign_mode, Assign> { typedef typename mult_assign_mode::type backup_type; typedef gen_blas_dmat_dmat_mult_t type; diff --git a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_result.hpp b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_result.hpp index 3c996e62..baf93699 100644 --- a/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_result.hpp +++ b/AMDiS/lib/mtl4/boost/numeric/mtl/operation/mult_result.hpp @@ -1,13 +1,13 @@ // Software License for MTL -// +// // Copyright (c) 2007 The Trustees of Indiana University. // 2008 Dresden University of Technology and the Trustees of Indiana University. // 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. // All rights reserved. // Authors: Peter Gottschling and Andrew Lumsdaine -// +// // This file is part of the Matrix Template Library -// +// // See also license.mtl.txt in the distribution. #ifndef MTL_MULT_RESULT_INCLUDE @@ -32,25 +32,25 @@ template struct vec_mult_result_au //template struct mult_result_if_equal_aux; /// Result type for multiplying arguments of types Op1 and Op2 -/** Can be used in enable-if-style as type is only defined when appropriate. +/** Can be used in enable-if-style as type is only defined when appropriate. This one is used if at least one argument is a matrix. **/ template -struct mult_result - : public mult_result_aux::type, +struct mult_result + : public mult_result_aux::type, typename ashape::ashape::type >::type> -{}; +{}; /// Result type for multiplying arguments of types Op1 and Op2 -/** Can be used in enable-if-style as type is only defined when appropriate. +/** Can be used in enable-if-style as type is only defined when appropriate. This one is used if at least one argument is a vector and none is a matrix. **/ template -struct vec_mult_result - : public vec_mult_result_aux::type, +struct vec_mult_result + : public vec_mult_result_aux::type, typename ashape::ashape::type >::type> -{}; +{}; /// Result type for multiplying arguments of types Op1 and Op2 @@ -60,7 +60,7 @@ struct mult_result_aux {}; /// Scale matrix from left template -struct mult_result_aux +struct mult_result_aux { typedef matrix::scaled_view type; }; @@ -68,28 +68,28 @@ struct mult_result_aux /// Scale matrix from right needs functor for scaling from right template -struct mult_result_aux +struct mult_result_aux { typedef matrix::rscaled_view